anthropic-prompt-engineer
Master Anthropic's prompt engineering techniques to generate new prompts or improve existing ones using best practices for Claude AI models.
Best use case
anthropic-prompt-engineer is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Master Anthropic's prompt engineering techniques to generate new prompts or improve existing ones using best practices for Claude AI models.
Teams using anthropic-prompt-engineer should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/anthropic-prompt-engineer/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How anthropic-prompt-engineer Compares
| Feature / Agent | anthropic-prompt-engineer | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Master Anthropic's prompt engineering techniques to generate new prompts or improve existing ones using best practices for Claude AI models.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Anthropic Prompt Engineer ## Trigger Phrases Activate when user says: - "improve this prompt", "optimize my prompt", "make this prompt better" - "write a prompt for", "create a prompt that", "generate a prompt" - "prompt engineering", "prompt best practices" - "help me with prompting", "how should I prompt this" - "fix my prompt", "debug this prompt", "my prompt isn't working" - "using anthropic techniques", "Claude prompt tips" Master the art and science of prompt engineering with Anthropic's proven techniques. Generate new prompts from scratch or improve existing ones using best practices for Claude AI models (Claude 4.x, Sonnet, Opus, Haiku). ## What This Skill Does Helps you create and optimize prompts for Claude AI using Anthropic's official techniques: - **Generate new prompts** - Build effective prompts from requirements - **Improve existing prompts** - Optimize prompts for better results - **Apply best practices** - Use proven techniques from Anthropic - **Avoid common mistakes** - Prevent hallucinations and unclear outputs - **Optimize for Claude 4.x** - Leverage latest model capabilities - **Structure complex prompts** - Build multi-step, production-ready prompts ## Why Prompt Engineering Matters **Without proper prompting:** - Inconsistent or incorrect outputs - Hallucinations and made-up information - Unclear or verbose responses - Wasted tokens and API calls - Poor performance on complex tasks - Difficulty reproducing results **With engineered prompts:** - Precise, reliable outputs - Factual, grounded responses - Clear, formatted results - Efficient token usage - Excellent complex task performance - Reproducible, production-ready results ## Quick Start ### Generate a New Prompt ``` Using the anthropic-prompt-engineer skill, create a prompt that: - Extracts structured data from customer emails - Returns JSON format - Handles missing information gracefully - Includes 2 examples ``` ### Improve an Existing Prompt ``` Using the anthropic-prompt-engineer skill, improve this prompt: "Analyze this code and tell me if there are bugs" Make it more effective using Anthropic's best practices. ``` ## Core Techniques Summary ### 1. Be Clear and Direct Provide explicit, unambiguous instructions. Claude 4.x excels with precise direction. ### 2. Use XML Tags for Structure Organize prompts with semantic tags like `<instructions>`, `<example>`, `<context>`. ### 3. Chain of Thought (CoT) Ask Claude to think step-by-step for complex reasoning. ### 4. Prefilling Start Claude's response to guide format and style. ### 5. Few-Shot Examples Provide 2-5 diverse examples showing the pattern you want. ### 6. Role Assignment Give Claude a specific role or persona for appropriate context. ## Reference Materials All techniques, examples, and templates are available in the `references/` directory: - **core_techniques.md** - Essential techniques with examples - **advanced_techniques.md** - Advanced methods and optimization - **common_mistakes.md** - Pitfalls to avoid - **claude_4_best_practices.md** - Claude 4.x specific guidance - **prompt_templates.md** - Ready-to-use templates ## Usage Examples ### Example 1: Generate a Data Extraction Prompt Create a prompt that extracts names, emails, and phone numbers from business cards. ### Example 2: Improve a Vague Prompt Transform "Write about machine learning" into a structured, effective prompt. ### Example 3: Debug a Failing Prompt Fix inconsistent outputs by adding structure, examples, and format specification. ## Best Practices Checklist - [ ] Instructions are clear and specific - [ ] Output format is explicitly defined - [ ] Examples align with desired behavior - [ ] XML tags separate different sections - [ ] Context is minimal but sufficient - [ ] Edge cases are addressed - [ ] Tested on diverse inputs - [ ] Token usage is optimized ## Key Principles 1. **Empirical Approach** - Test, measure, iterate 2. **Context as Resource** - Every token counts 3. **Clarity Over Cleverness** - Explicit instructions work best 4. **Examples Teach Best** - Show, don't just tell 5. **Structure Helps** - Organization reduces confusion 6. **Iteration Improves** - Refine based on results ## Summary Master prompt engineering to create: - Reliable and consistent outputs - Production-ready prompts - Token-efficient solutions - Easy to maintain systems Apply Anthropic's proven techniques for best results. --- **Remember:** Good prompts are engineered, not guessed.
Related Skills
ml-engineer
Build production ML systems with PyTorch 2.x, TensorFlow, and modern ML frameworks. Implements model serving, feature engineering, A/B testing, and monitoring. Use PROACTIVELY for ML model deployment, inference optimization, or production ML infrastructure.
llm-application-dev-ai-engineer
Build production-ready LLM applications, advanced RAG systems, and intelligent agents. Implements vector search, multimodal AI, agent orchestration, and enterprise AI integrations. Use PROACTIVELY for LLM features, chatbots, AI agents, or AI-powered applications. Use when: the task directly matches ai engineer responsibilities within plugin llm-application-dev. Do not use when: a more specific framework or task-focused skill is clearly a better match.
flow-engineer-rule
Guide for creating persistent AI rules (coding standards, project conventions, file-specific patterns). Use when users want to create a rule, add coding standards, set up project conventions, configure file-specific patterns, or ask about rules placement. Works across IDEs (Cursor, Claude Code, Antigravity, OpenAI Codex, OpenCode).
data-engineering-data-pipeline
You are a data pipeline architecture expert specializing in scalable, reliable, and cost-effective data pipelines for batch and streaming data processing.
data-engineer
Build scalable data pipelines, modern data warehouses, and real-time streaming architectures. Implements Apache Spark, dbt, Airflow, and cloud-native data platforms. Use PROACTIVELY for data pipeline design, analytics infrastructure, or modern data stack implementation.
create-prompt
Expert prompt engineering for creating effective prompts for Claude, GPT, and other LLMs. Use when writing system prompts, user prompts, few-shot examples, or optimizing existing prompts for better performance.
create-custom-prompt
Prompt for creating custom prompt files
context-engineering
Use when designing agent system prompts, optimizing RAG retrieval, or when context is too expensive or slow. Reduces tokens while maintaining quality through strategic positioning and attention-aware design.
Build Your Data Engineering Skill
Create your LLMOps data engineering skill in one prompt, then learn to improve it throughout the chapter
anthropic-token-refresh
Automatically refresh Anthropic Claude setup-token before expiration using browser automation. Use when: (1) Setting up auto token refresh for Claude Max/Pro subscription, (2) Token keeps expiring and causing OpenClaw to stop responding, (3) Want to maintain continuous Claude API access without manual intervention.
ai-engineering-skill
Practical guide for building production ML systems based on Chip Huyen's AI Engineering book. Use when users ask about model evaluation, deployment strategies, monitoring, data pipelines, feature engineering, cost optimization, or MLOps. Covers metrics, A/B testing, serving patterns, drift detection, and production best practices.
ai-engineer
Build production-ready LLM applications, advanced RAG systems, and