Author production-grade prompts for Claude by applying Anthropic's canonical prompt-engineering best practices in impact order: clarity, examples, chain-of-thought, XML tags, system roles, prefilling, prompt chaining, and long-context tips.
Works with
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionwrite-promptExecute the skills CLI command in your project's root directory to begin installation:
Fetches write-prompt from platform.claude.com/write-prompt-guide-0j5xu3 and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate write-prompt. Access via /write-prompt in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
0
total installs
0
this week
0
upvotes
Run in your terminal
0
installs
0
this week
—
stars
| name | write-prompt |
| title | Write Prompts for Claude |
| description | >- Author production-grade prompts for Claude by applying Anthropic's canonical prompt-engineering best practices in impact order: clarity, examples, chain-of-thought, XML tags, system roles, prefilling, prompt chaining, and long-context tips. |
| website | platform.claude.com |
| category | prompt-engineering |
| tags | - prompt-engineering - claude - best-practices - system-prompt - few-shot |
| source | 'browserbase: agent-runtime 2026-05-19' |
| updated | '2026-05-19' |
| recommended_method | cli |
| alternative_methods | - method: url-param rationale: >- Read the two upstream Anthropic docs pages directly — they're the source of truth and version with the model. This skill distills them but does not replace them. |
| verified | false |
| proxies | false |
Author production-grade prompts for Claude (claude-* models via the Messages API, Claude Code, or the Agent SDK) by applying Anthropic's canonical prompt-engineering best practices in the order that matters. Returns a single artifact: the prompt itself (system prompt, user turn, optional assistant prefill, optional XML scaffolding) plus the rationale for each technique used. Read-only with respect to any external system; this skill produces text.
## Workflow step 9 as a rubric.The two canonical sources of truth — Anthropic's Prompt engineering overview and Claude prompting best practices — define eight techniques, in roughly decreasing order of impact-per-effort. Apply them in that order. Do not jump to XML tags or chain-of-thought before you've nailed step 1 (clarity); diminishing returns are real.
Skip this and you'll iterate forever. Required artifacts:
The golden rule of clear prompting: show your prompt to a colleague with no context about the task. If they're confused about what to do, Claude will be too.
Be explicit about all of:
Anti-pattern: "Help the user with their question." Concrete: "You are a tier-2 support agent for Acme Cloud. Diagnose the user's billing issue by asking up to 3 clarifying questions, then propose one of {refund, credit, escalation}. Do not propose a fix you cannot verify against the account data in <account_data>."
Single most effective technique after step 1. The model learns the shape of a good output from examples faster than from any description of it.
<example> tags — both the input and the desired output. Group them under <examples>...</examples>. Claude is trained to attend to these tags.<example> blocks" is more reliable than hoping Claude infers it.For tasks with non-trivial reasoning — math, multi-step inference, ambiguous classification, multi-document synthesis — give Claude space to think out loud before answering. Three escalating levels:
"Think step by step before answering.""First, identify the parties involved. Second, list the obligations of each. Third, flag any ambiguity in the obligations. Then write your final answer."<thinking>...</thinking> blocks followed by an <answer>...</answer> block. You can parse the answer block and discard the thinking, or surface the thinking for debugging.Critical rule: the thinking must be output, not silent. "Think step by step but don't show your work" gives you the worst of both worlds — extra latency and zero quality lift. If you don't want to display the reasoning to the end user, capture it in a tagged block and strip it server-side.
For modern Claude models (Sonnet 4.5, Opus 4 / 4.5), prefer extended thinking (thinking: { type: "enabled", budget_tokens: 8000 } in the API) over manual CoT scaffolding for hard reasoning tasks. Extended thinking is essentially CoT with a dedicated reasoning channel and is dramatically more effective per token. Reserve manual CoT for cases where extended thinking is unavailable (older models, certain features) or where you need guided reasoning steps the model would otherwise skip.
Claude is post-trained to pay close attention to XML tags. Use them to separate the parts of your prompt that mean different things.
<user_input>, <document>, <transcript>, etc. Then reference it: "Summarize the article in <document>." This makes the prompt resistant to prompt injection from data.<instructions>, <context>, <examples> / <example>, <format>, <thinking>, <answer>, <documents> / <document> (with nested <source> and <document_content>).<input> in one place, don't call it <query> two paragraphs later. Pick a name and reuse it.<examples><example><input>...</input><output>...</output></example></examples> is more parseable than a flat blob.<billing_policy>, <known_issues>, <allowed_actions>: all fine. What matters is that you reference them by the same name in the instructions.Put role/persona/identity in the system parameter, not the first user turn. The system prompt is where Claude looks for "who am I, what are my constraints, what knowledge do I have."
Pass an assistant message with the start of the response. Claude continues from there. Use sparingly but powerfully:
{ to lock JSON output, <answer> to lock an XML wrapper, Step 1: to lock a numbered structure. Eliminates preamble drift entirely.Here's the JSON:\n and Claude won't say "Sure, here's the JSON:" first.[CharacterName]: to prevent breakage.When one prompt is doing too much (>3 distinct subtasks, conflicting objectives, mixed output formats), split it into a chain. Each link does one thing well; outputs become inputs.
<draft>...</draft>, link 2 takes that as input wrapped in the same tag. Easy to parse, easy to debug.When you're packing in documents, transcripts, or large datasets:
<documents>
<document index="1">
<source>filename_or_url</source>
<document_content>...full text...</document_content>
</document>
<document index="2">
<source>...</source>
<document_content>...</document_content>
</document>
</documents>
Then refer to documents by index in the instructions ("Cite the document index for each claim").<documents> into a <quotes> block, then write your answer in an <answer> block citing the quote indices." This dramatically reduces hallucination and gives you a debuggable trail.<example> you provide opens with "Sure!" and ends with an em-dash, expect Claude to do the same. Curate example style, not just content.prefill_invalid or similar — easy to miss in batch jobs.platform.claude.com directly (network restricted to browse.sh), so content was reconstructed from the model author's training knowledge of those pages. If the upstream docs have changed materially since 2026-05, re-derive — the URLs remain the source of truth.Invoking this skill produces a structured prompt-design artifact, not a runtime response. Shape:
{
"system_prompt": "You are a {specific_role}. Your job is to {task}. Constraints: {bullets}. When the user asks {edge_case}, {behavior}.",
"user_turn_template": "<documents>{docs}</documents>\n\n<instructions>{specific_instructions}</instructions>\n\n<question>{user_query}</question>",
"assistant_prefill": "<thinking>",
"examples_used": [
{ "input": "...", "output": "...", "purpose": "covers empty-input edge case" },
{ "input": "...", "output": "...", "purpose": "covers ambiguous classification" },
{ "input": "...", "output": "...", "purpose": "covers the happy path" }
],
"techniques_applied": [
{ "technique": "clear-direct-detailed", "where": "system_prompt", "rationale": "..." },
{ "technique": "multi-shot", "where": "user_turn_template", "rationale": "..." },
{ "technique": "xml-tags", "where": "user_turn_template", "rationale": "..." },
{ "technique": "prefill", "where": "assistant_prefill", "rationale": "..." }
],
"eval_cases_needed": [
"happy path: ...",
"empty input: ...",
"off-topic refusal: ...",
"ambiguity handling: ..."
],
"open_questions": [
"Does the production model support extended thinking? If yes, replace manual CoT in step 3 with thinking budget."
]
}
Alternative outcome when the skill is used as a review rubric on a peer's prompt:
{
"verdict": "needs-revision",
"checklist_results": {
"clarity": { "pass": true, "notes": "Role and task are concrete." },
"examples": { "pass": false, "notes": "Only 1 example; needs 2 more covering edge cases X and Y." },
"reasoning_space": { "pass": false, "notes": "Asks Claude to 'think carefully' but provides no tagged block or step structure." },
"xml_structure": { "pass": true, "notes": "Documents wrapped correctly." },
"role_in_system": { "pass": true, "notes": "Role lives in system param." },
"format_pinned": { "pass": false, "notes": "Output format described in prose; recommend a schema or prefill." },
"should_chain": { "pass": true, "notes": "Single-task prompt; no chain needed." },
"long_context_order":{ "pass": "n/a", "notes": "Prompt is < 4K tokens." },
"guardrails_tested": { "pass": false, "notes": "Two guardrails in prompt, zero eval cases test them." }
},
"priority_fixes": [
"Add 2 more examples covering empty-input and ambiguous-input cases.",
"Wrap reasoning in <thinking>...</thinking>; require an <answer> block.",
"Pin output format via assistant prefill of `{`.",
"Add eval cases for each guardrail in the system prompt."
]
}
Alternative outcome when the prompt is genuinely fine and shouldn't be touched:
{
"verdict": "ship-it",
"notes": "All checklist items pass. Eval pass rate on current model is N/M. Re-run evals after any model upgrade before further changes."
}
Prerequisites
Time Estimate
15-45 minutes depending on use case complexity
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
JuliusBrussee/caveman
JuliusBrussee/caveman
whyashthakker/agent-skills-marketing
JuliusBrussee/caveman
aradotso/trending-skills
anthropics/skills
I recommend write-prompt for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
Solid pick for teams standardizing on skills: write-prompt is focused, and the summary matches what you get after install.
Registry listing for write-prompt matched our evaluation — installs cleanly and behaves as described in the markdown.
write-prompt reduced setup friction for our internal harness; good balance of opinion and flexibility.
write-prompt is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
write-prompt reduced setup friction for our internal harness; good balance of opinion and flexibility.
We added write-prompt from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
Useful defaults in write-prompt — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
write-prompt fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
I recommend write-prompt for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
showing 1-10 of 53