Golden rule: write for a brand-new hire
Anthropic’s guidance for writing to Claude is to picture a brilliant new employee who has no context on your MSP, no clue what your PSA looks like, and no sense of what “urgent” means in your world. Every detail you’d tell that person on day one belongs in the prompt — the company terminology, what counts as an outage, which team owns what, and what “good” looks like for the output. If you handed your prompt to a coworker who had never seen the ticket, would they know what to do? If not, Magic AI won’t either.1. Be explicit — tell it what to do, not what not to do
Vague instructions produce generic output. Explicit instructions produce the output you actually want. Less effective- Lead with the action verb. “Summarize”, “Classify”, “Escalate”, “Rewrite” — put it at the front so the intent is unmistakable.
- Tell Magic AI what “good” looks like. Length, tone, structure, what to include, what to omit. Don’t rely on the model to guess.
2. Add context and motivation
Explaining why a rule exists lets Magic AI generalize to cases you didn’t spell out. A rule with reasoning attached holds up better than a bare instruction. Less effective3. Use examples — show, don’t just tell
Examples are one of the most reliable ways to steer Magic AI’s output format, tone, and structure. This is sometimes called few-shot prompting, and it’s especially useful for recap templates, categorization, and title rules where the desired output has a specific shape. Good examples are:- Relevant — they mirror the real tickets you see.
- Diverse — they cover the common edge cases, not just the happy path.
- Structured — wrap each example in tags so Magic AI can tell examples apart from instructions.
4. Structure complex prompts with XML tags
Once a prompt mixes multiple types of content — instructions, background context, examples, ticket data — plain paragraphs get ambiguous. Wrap each type in a descriptive XML tag so Magic AI can parse the boundaries.- Use consistent, descriptive tag names across your prompts.
- Nest tags when content has natural hierarchy (
<examples>wrapping multiple<example>blocks). - Tag names should describe the content, not the format (
<company_context>, not<section_2>).
5. Give step-by-step instructions when order matters
For decisions where the order of checks changes the outcome — triage flows, escalation logic, categorization with fallbacks — write the steps as a numbered list. Magic AI follows structured procedures better than it infers them from prose.6. Ask Magic AI to think before it answers
For decisions that need reasoning — a nuanced priority call, a categorization with overlapping options, a sentiment read — telling Magic AI to reason step by step before committing to an answer measurably improves quality. Anthropic calls this chain-of-thought prompting. Two ways to structure it: Basic — just ask for reasoning:7. Give it permission to say “I don’t know”
Magic AI will try to be helpful even when the ticket doesn’t contain enough information — and that’s when hallucinations creep in (a made-up asset name, an invented user, an assumed office location). Give it an explicit exit:8. Match the style of your prompt to the style you want back
Magic AI’s output tends to mirror the style of the prompt. If you write your prompt in dense paragraphs, expect dense paragraphs back. If you want short, scannable bullets, write the prompt in short, scannable bullets. Practical consequences:- Recap prompts that use markdown produce markdown recaps. If you want a recap in plain sentences, remove the markdown scaffolding from the prompt.
- Title prompts that use ALL CAPS in examples produce ALL-CAPS titles. Match your examples to the casing you actually want.
- Casual prompts produce casual replies; formal prompts produce formal replies. Set the register in the instructions, and reinforce it in your examples.
9. Iterate — the first prompt is never the best one
The best prompts are refined over 5–10 revisions, not written in one shot. A simple loop:Write the shortest version that could work
Test on real tickets from your PSA
Find the failures, not the successes
Target the failure — not general 'be better' language
Retest and repeat
10. Use another AI to help you write prompts
Anthropic explicitly recommends using an assistant (Claude, ChatGPT, or Magic AI itself) as a prompt-writing partner. You describe the goal in plain language and ask it to draft a prompt, generate additional examples, or point out ambiguity in your draft. A good starting query:Common mistakes to avoid
Over-engineering the prompt
Over-engineering the prompt
Telling Magic AI what NOT to do, over and over
Telling Magic AI what NOT to do, over and over
Contradicting your own examples
Contradicting your own examples
Assuming the model will 'just figure out' the context
Assuming the model will 'just figure out' the context
Referencing variable names in the prompt text
Referencing variable names in the prompt text
{{variable_name}}. Variables are substituted with their real values before Magic AI ever sees the prompt — for the full explanation, see Using variables in Magic AI and Magic Agents.Never testing on real tickets
Never testing on real tickets
Where to go next
- Best practices for writing Magic AI prompts — the fundamentals, with worked examples for prioritization, categorization, recaps, and triage.
- Using variables in Magic AI and Magic Agents — how runtime substitution works and why you write prompts in natural language, not with variable names.
- Magic Title rule creation guide — applying these techniques to ticket title generation.
- Getting started with Triage Agent — applying these techniques to conversational triage.