AIExplore
How to Write Better Prompts for Claude
A practical Claude prompting framework: structure, context, constraints, and verification — with Bad/Better/Best examples you can copy.
Claude responds well to structured prompts. Not because it needs magic words, but because clear structure removes the guesswork about what you want. The difference between a vague ask and a useful reply is usually three or four extra lines of context.
This guide gives you a framework that works for writing, coding, analysis, and research tasks. Use as much of it as the task needs — simple questions need less, complex briefs need more.
The four-part framework
- Context — who you are, what you are working on, and who the result is for
- Task — one clear action verb and a definition of done
- Constraints — rules about length, tone, format, and what to avoid
- Verification — how Claude should check its own work before replying
Context: tell Claude what it cannot guess
Context includes your role, the project, the audience, and any facts Claude should treat as given. One or two sentences usually covers it. Without context, Claude fills gaps with generic assumptions.
Bad
Write a product description.
Better
Write a product description for a portable Bluetooth speaker. Audience: outdoor enthusiasts shopping on Amazon. Tone: casual but trustworthy.
Best
I sell outdoor gear on Amazon. Write a product description for our portable Bluetooth speaker (model: TrailSound X2, 20-hour battery, IPX7 waterproof). Audience: hikers and campers comparing 3-4 options. Tone: casual but trustworthy. No hype words like "revolutionary." Include: battery life, water rating, weight (340g), and one use-case scenario. Max 100 words.
The best version works because Claude has the product specs, the buyer mindset, tone guardrails, required facts, and a length limit. It does not need to invent or guess.
Task: one verb, one deliverable
State the task as a single action. 'Rewrite,' 'Compare,' 'Summarize,' 'Debug.' When you combine three verbs in one prompt, Claude tries to address all of them and each part gets less attention.
Constraints: set hard rules, not suggestions
Constraints work best when they are specific and non-negotiable. 'Keep it short' is a suggestion. 'Max 80 words' is a constraint. Claude follows hard rules more reliably than vague preferences.
- Word or sentence limits
- Sections to include or exclude
- Format: bullets, table, numbered steps, or prose
- Things to avoid: no greetings, no disclaimers, no invented stats
Verification: ask Claude to check before replying
For tasks where accuracy matters, add a verification step at the end of your prompt. This catches errors before you see the reply.
Before answering: 1. List any claims you made that are not in the source text. 2. Confirm the word count is under 100. 3. Flag anything you are unsure about.
Structuring prompts with sections
Claude handles structured input well. Use markdown headings, XML-style tags, or simple labels to separate instructions from source material. This is especially useful when you paste a document and want Claude to work from it.
# Instructions Summarize the key decisions from the meeting notes below. Output: numbered list, max 5 items, one sentence each. Do not add recommendations — just decisions that were made. # Meeting notes [PASTE NOTES HERE]
Common prompting mistakes
- Writing a long message with no structure — Claude guesses your priorities
- Setting contradictory constraints like 'be thorough but keep it under 30 words'
- Burying the real question under three paragraphs of background
- Using soft language ('maybe include...') when you need hard rules
- Not stating the output format and then reformatting the reply by hand
Quick reference by task type
- Writing: context about audience and tone, word limit, one example of the style you want
- Coding: language, file scope, failing behavior, definition of done
- Research: topic, what counts as a source, uncertainty labels, output format
- Analysis: paste the source, state what to look for, ask for quotes not paraphrases
Related reading: /blog/getting-more-accurate-answers-from-claude for grounding techniques and /blog/how-to-write-better-content-with-claude for writing-specific prompts.

explore