Claude prompt engineering to improve any prompt
Use Claude prompt engineering basics to rewrite any prompt with clear structure, XML-tagged context, examples and output checks.
- Published
- Works with
- Claude and ChatGPT
- Level
- Advanced
Claude prompt engineering mostly comes down to clarity: say what the task is and why, separate instructions from material with tags such as
The prompt
You are an expert in prompt engineering for Claude. Improve my prompt.
What the prompt is for:
Current prompt:
<current_prompt>
</current_prompt>
Problems I see in the outputs:
An example of a good output (optional):
<good_example>
</good_example>
Rewrite it so that it:
1. States the goal, the audience and why the task matters, in plain sentences.
2. Puts long inputs in clearly named XML tags and refers to them by name.
3. Gives step-by-step instructions only where order matters.
4. Includes 1–2 short examples of the desired output, if useful.
5. Specifies format, length and what to do when information is missing.
6. Removes vague words ("good", "detailed") in favour of concrete criteria.
Return: the improved prompt in a code block, a table of changes with the reason for each, and 3 test inputs to check it.
How to use it
- Paste your real prompt and describe what goes wrong.
- Test the new version on the 3 test inputs and on a real case.
- Keep both versions and compare outputs side by side.
Tips
- Explaining why a rule exists often helps more than writing it in capitals.
- Check Anthropic's prompt engineering docs for current guidance.
Frequently asked questions
What does this prompt do?
Use Claude prompt engineering basics to rewrite any prompt with clear structure, XML-tagged context, examples and output checks.
Which AI tools does it work with?
It is written for Claude and ChatGPT. It also works in other AI tools that accept text prompts, with small changes.
What do I need to fill in?
4 blanks: task and who uses the output; paste prompt; problems; example. Click each blue blank on the page, type your details and press Copy prompt.
Is this prompt free to use?
Yes. You can copy and use it for personal and commercial work.