Claude Prompt Best Practices

Claude reads instructions more literally than you think — here's how to write for it.

What this covers

Claude follows instructions more literally than most other assistants, which is great when your prompt is precise and frustrating when it is not. This guide is a practitioner’s checklist for writing prompts that get usable output on the first try — structured tags, format specs, examples, and the small wording patterns that actually move the model.

Who this is for

Anyone running Claude daily — writers, engineers, researchers, support leads — who keeps getting “almost right” outputs and is tired of fiddling. If your average prompt is one or two sentences, you will see the biggest jump.

When to reach for it

Whenever output consistency matters: client deliverables, repeatable workflows, code edits, content templates, anything you will quote or ship. Skip the structure for casual brainstorming where surprise is a feature, not a bug.

Before you start

  • Define the exact outcome: a draft, a fix, a summary, a comparison, a JSON object. “Help me think” is not an outcome.
  • Collect the context Claude needs — source files, links, prior drafts, brand voice samples. Drop them in the same chat.
  • Write down two or three success criteria before you write the prompt. If you cannot, the prompt cannot either.
  • Decide the output format up front: paragraph, bullets, table, JSON, code block. Mixed formats cost a rewrite.

Step by step

  1. Wrap structured context in XML-style tags. Claude was trained heavily on this style and respects boundaries cleanly:
<context>
You are reviewing a marketing email for a fintech audience.
Tone: confident, plain English, no jargon.
</context>

<task>
Rewrite the draft below to 180 words. Keep the CTA in the last line.
</task>

<draft>
{paste draft here}
</draft>

<constraints>
- No exclamation marks
- No words longer than 4 syllables
- Subject line must be under 50 characters
</constraints>
  1. State the output format explicitly. “Reply with a single 180-word paragraph” beats “be concise.” For structured output, show the exact shape you want: “Return a JSON array where each item has title, summary, and priority fields.”
  2. Provide one “good output” example. A single high-quality example outperforms paragraphs of abstract description. Pair it with one “bad output” example only if the failure mode is subtle.
  3. Use Custom Instructions for stable preferences (writing voice, code style, “never invent statistics”) so every chat starts from your defaults instead of Anthropic’s.
  4. End with a self-check instruction: “Before returning, verify the word count and that no exclamation marks remain.” Claude does follow these when they are concrete.

First-run exercise

  1. Pick one prompt you ran last week that gave a mediocre result.
  2. Rewrite it with the tag structure above. Add format, constraints, and one example.
  3. Run both versions back-to-back. Save outputs side by side and mark which paragraphs improved.
  4. For the second iteration, change exactly one element — usually the example, since examples have the highest leverage.

Quality check

  • Did the output match the named format and constraints? Constraint violations are usually a Claude misread, not a model failure.
  • Verify facts, numbers, file paths, and any quoted material. Claude paraphrases confidently even when accuracy slips.
  • Note where you needed to override Custom Instructions — those overrides are usually candidates to update the Instructions themselves.

How to reuse this workflow

  • Save each working prompt as a template with named slots (“[audience],” “[draft]”). Replace only the slots next time.
  • Build a one-page “prompt library” for recurring work — email drafts, code reviews, meeting summaries. Five templates cover 80% of daily use.
  • Log every prompt that failed, what you changed, and what worked. The patterns are personal but stable over months.
  • Re-test your library after major Claude model updates — a few prompts will need light tuning.

<context> for background → <task> for the specific ask → <constraints> for non-negotiables → one example → output format → self-check. Run, review, save the winning version.

Common mistakes

  • One-paragraph prompts with no structure. Claude follows instructions in order, so unstructured prompts produce unstructured output.
  • Skipping the format specification. “Be concise” is interpreted differently every run.
  • Zero examples. Examples are the highest-leverage edit in any Claude prompt.
  • Stacking too many constraints (10+ rules). Past five or six, Claude starts dropping the middle ones. Keep constraints tight and ranked.
  • Editing Custom Instructions per-chat instead of in the settings. Per-chat edits do not persist; you will re-type the same rule forever.
  • Asking for “good writing” without naming the audience, length, and tone. Claude defaults to a generic blog voice when those are missing.

FAQ

  • Do XML tags actually help, or is it just a meme?: They help. Anthropic’s own docs and Claude’s training data lean heavily on tagged structure. The model parses tags as boundaries.
  • How long should a Claude prompt be?: Long enough to be unambiguous, short enough that you can read it back. 200-500 words is typical for serious work.
  • Should I say “please” and “thank you”?: Politeness does not measurably help, but it does not hurt. Clarity matters more.
  • Where do I put the source material — top or bottom?: For long documents, put the source first and the task last. Claude’s recent-instruction bias means the final instruction wins ties.

Tags: #Claude #Tutorial