How to write a good prompt
In brief
Most prompt problems aren't caused by bad AI — they're caused by the same three things: no role, no context, no constraint. Here's how to fix all three in under two minutes.
Contents
Writing a good prompt is not a skill you need to study for months. It is mostly about being specific. Most AI outputs that feel unhelpful are the result of vague inputs — not a limitation of the tool.
This guide gives you a repeatable approach. After reading it, you will get noticeably better results from Claude starting today.
The core idea: treat Claude like a smart new colleague
Imagine you have just hired a smart, capable person who is starting their first day. They do not know your company, your preferences, your context, or what good looks like for you. If you hand them a task with three words — "write the email" — they will produce something generic.
If you give them proper context — who this email is to, what you want them to feel after reading it, what to include and what to leave out, what format you want — they will produce something useful.
Claude works the same way.
The five-part prompt framework
You do not need to use all five parts every time. But knowing them lets you diagnose why a response fell short.
1. Role — who should Claude be?
Telling Claude to act as a specific kind of person sharpens the tone and perspective of the response.
Examples:
- "You are a senior customer success manager who has handled hundreds of renewal conversations."
- "You are a direct, no-fluff editor who cuts anything that is not essential."
- "You are a first-year lawyer reviewing this contract for someone without a legal background."
You do not need to always include a role. But when you are getting responses that feel too generic, adding a role often fixes it.
2. Context — what does Claude need to know?
The more relevant context you share, the better. Do not make Claude guess at things you already know.
Include:
- Who the output is for (your audience)
- What the situation is
- What has already happened (if relevant)
- Any constraints, rules, or things to avoid
Example: Instead of "write a response to this complaint," try "write a response to this customer complaint. The customer bought a premium subscription last month and the discount they were promised was not applied. Tone should be warm and direct. We will apply the discount immediately — just confirm it and apologize without being overly apologetic."
3. Task — what exactly should Claude do?
Be specific about what you want. "Help me with this" is not a task. "Summarize this in three bullet points for a busy executive" is a task.
If the output needs a specific format, say so:
- "List this as numbered steps."
- "Keep the whole response under 150 words."
- "Use headers and short paragraphs."
4. Examples — show Claude what good looks like
If you have a sense of what the output should look like, show it. Even one example of the tone, length, or structure you want will improve the result significantly.
"Here is an example of the kind of email we usually send: [paste example]. Match this tone."
5. Constraints — what should Claude avoid?
It is often easier to say what you do not want than to describe perfection.
Common constraints:
- "Do not use bullet points."
- "Do not suggest anything that requires a legal team to approve."
- "Do not use the phrase 'leverage' or 'synergy.'"
- "Keep it short — two paragraphs maximum."
A worked example
Before: "Write me an email to reschedule a meeting."
After: "Write a short email rescheduling a one-on-one with my manager. The original time was Tuesday at 2pm. I need to move it because I have a conflict with a client call that just came up. Suggest Thursday at the same time as an alternative. Tone should be professional but not overly formal. Two short paragraphs maximum."
The second prompt takes 30 more seconds to write. The output will be five times more useful.
When to iterate rather than rewrite
If Claude gives you something that is 60% right, do not start over. Keep going:
- "Make the tone warmer."
- "Cut this down by half."
- "Add a section at the end with next steps."
- "The third paragraph isn't quite right — make it more direct."
You are having a conversation, not submitting a form. Each response carries context from everything before it.
What good prompting is not
Good prompting is not about using magic words or memorizing templates. It is about communicating clearly — the same skill that makes you good at briefing a colleague, writing a good brief, or asking a useful question in a meeting.
If the output is not what you wanted, ask yourself: what did I leave out? Start there.
Try this right now: Take the last prompt you sent Claude that gave you a mediocre result. Rewrite it using the role–context–constraint frame from this article. Send both versions and compare the outputs. The difference will be obvious.
Further reading
- Best practices for prompt engineering — Anthropic's own prompt engineering guide
- Prompt engineering documentation — the full technical reference