Prompt Engineering Index (official docs)
The Anthropic prompt-engineering overview now consolidates everything into a single canonical reference: "Prompting best practices".
Pre-work (before prompt engineering)
The official guidance assumes you have:
- Clear definition of success criteria for your use case.
- Empirical tests against those criteria.
- A first-draft prompt to improve.
"Not every success criteria or failing eval is best solved by prompt engineering. For example, latency and cost can be sometimes more easily improved by selecting a different model."
Canonical references
- Prompting best practices —
/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices. The living, model-specific reference. Read this before the exam. - Prompting tools —
/docs/en/build-with-claude/prompt-engineering/prompting-tools— prompt generator, templates and variables, prompt improver in the Console. - Interactive tutorial (GitHub) — https://github.com/anthropics/prompt-eng-interactive-tutorial
- Interactive tutorial (Google Sheets) — https://docs.google.com/spreadsheets/d/19jzLgRruG9kjUQNKtCg1ZjdD6l6weA6qRXG5zLIAhC8
Techniques (in order)
Anthropic's canonical order for applying techniques:
- Be clear and direct.
- Use examples (multishot / few-shot).
- Let Claude think (chain of thought, extended thinking).
- Use XML tags.
- Give Claude a role (system prompts).
- Prefill Claude's response.
- Chain prompts.
Apply in this order. Each subsequent technique is more invasive.
URL change note
The main API docs moved from docs.claude.com → platform.claude.com/docs/*. Old URLs 302 to the new location.