Agent skill

Anthropic Prompt Engineer

by jamesrochabrun in jamesrochabrun/skills

Master Anthropic's prompt engineering techniques to generate new prompts or improve existing ones using best practices for Claude AI models.

MITAuto-check passedAI & LLM Engineering

Install Anthropic Prompt Engineer

skills CLI
$ npx skills add jamesrochabrun/skills --skill anthropic-prompt-engineer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jamesrochabrun/skills anthropic-prompt-engineer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jamesrochabrun/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/anthropic-prompt-engineer .claude/skills/anthropic-prompt-engineer && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
anthropic-prompt-engineer
GitHub stars
216
Token cost
~1.1k tokens
SKILL.md length
450 words
Files
6 (incl. references)
Skills in repo
23
Repo updated
First seen
Licence
MIT

At a glance

Master Anthropic's prompt engineering techniques to generate new prompts or improve existing ones using best practices for Claude AI models.

  • Works in 6 steps: Be Clear and Direct → Use XML Tags for Structure → Chain of Thought (CoT) → …
  • Tasks that involve Prompt engineering
  • SKILL.md covers What This Skill Does, Why Prompt Engineering Matters, Quick Start and Core Techniques Summary, plus 5 more sections
  • Calls make

What it does

Anthropic Prompt Engineer is an agent skill from jamesrochabrun/skills. Master Anthropic's prompt engineering techniques to generate new prompts or improve existing ones using best practices for Claude AI models.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `references/advanced_techniques.md`, `references/claude_4_best_practices.md` and `references/common_mistakes.md`).

It sits in AI & LLM Engineering, covering Prompt engineering. The licence is MIT.

When your agent uses it

  • Tasks that involve Prompt engineering

Example prompts

  • “/anthropic-prompt-engineer”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Be Clear and Direct
  2. Use XML Tags for Structure
  3. Chain of Thought (CoT)
  4. Prefilling
  5. Few-Shot Examples
  6. Role Assignment

What it can do on your machine

Read from SKILL.md and the folder at commit 2482c17. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • make

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Anthropic Prompt Engineer loads about 1.1k tokens when it runs, and up to ~7.2k if it reads all its reference files. Until then it costs about 42 tokens; SKILL.md has 450 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~42
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~7.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jamesrochabrun/skills at commit 2482c17, republished under its MIT licence (© jamesrochabrun). 450 words, ~1,071 tokens.

Download SKILL.mdSave it as .claude/skills/anthropic-prompt-engineer/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
anthropic-prompt-engineer
description
Master Anthropic's prompt engineering techniques to generate new prompts or improve existing ones using best practices for Claude AI models.

Anthropic Prompt Engineer

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
Show full SKILL.md (170 more words)Show less

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.

© jamesrochabrun, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (references) in skills/anthropic-prompt-engineer of jamesrochabrun/skills.

  • SKILL.md
  • references/advanced_techniques.md
  • references/claude_4_best_practices.md
  • references/common_mistakes.md
  • references/core_techniques.md
  • references/prompt_templates.md

Open the folder on GitHubat commit 2482c17

Compare with similar skills

Anthropic Prompt Engineer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Anthropic Prompt Engineer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Anthropic Prompt Engineer this skilljamesrochabrun/skills216—~1.1kAutomated safety check: PassMIT
Prompt Improverseverity1/claude-code-prompt-improver1.9k1 repos~1.7kAutomated safety check: PassMIT
Prompt Engineering Patternsynulihao/AgentSkillOS61814 repos~1.7kAutomated safety check: PassNone
Patch CreationPiebald-AI/tweakcc2.5k—~1.6kAutomated safety check: PassMIT
Senior Prompt Engineermaslennikov-ig/claude-code-orchestrator-kit2603 repos~1.4kAutomated safety check: PassCustom licence
Codex Fable5baskduf/FableCodex437—~1.6kAutomated safety check: PassAGPL-3.0

Similar skills

  • Prompt Improver

    severity1/claude-code-prompt-improver

    This skill enriches vague prompts with targeted research and clarification before execution.

    1.9k GitHub starsUsed in 1 repo~1.7k tokens
    AI & LLM EngineeringAuto-check passed
  • Prompt Engineering Patterns

    ynulihao/AgentSkillOS

    Master advanced prompt engineering techniques to maximize LLM performance, reliability, and controllability in production.

    618 GitHub starsUsed in 14 repos~1.7k tokens
    AI & LLM EngineeringAuto-check passed
  • Patch Creation

    Piebald-AI/tweakcc

    Create and register new patches for tweakcc. An agent skill from Piebald-AI/tweakcc.

    2.5k GitHub stars~1.6k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Senior Prompt Engineer

    maslennikov-ig/claude-code-orchestrator-kit

    Provides reference guides and Python scripts for prompt optimization, RAG evaluation, and agent orchestration when building or tuning LLM systems.

    260 GitHub starsUsed in 3 repos~1.4k tokens
    AI & LLM EngineeringAuto-check passed
  • Codex Fable5

    baskduf/FableCodex

    Apply a Claude Fable 5 inspired operating style inside Codex.

    437 GitHub stars~1.6k tokensUpdated 2 mo ago
    AI & LLM EngineeringAuto-check passed
  • Reference for designing and tuning production LLM prompts: few-shot examples, chain-of-thought, structured outputs, templates and system prompts.

    40k GitHub stars~1.3k tokensUpdated 5 days ago
    AI & LLM EngineeringAuto-check passed

More from jamesrochabrun/skills

All 23 skills in this repo
  • Prd Generator

    jamesrochabrun/skills

    Generate comprehensive Product Requirements Documents (PRDs) for product managers.

    216 GitHub starsUsed in 2 repos~3.8k tokens
    Auto-check passed
  • Technical Launch Planner

    jamesrochabrun/skills

    Plan and execute technical product launches for developer tools, APIs, and technical products.

    216 GitHub starsUsed in 1 repo~3.8k tokens
    Auto-check passed
  • Design Brief Generator

    jamesrochabrun/skills

    Generate comprehensive design briefs for design projects. An agent skill from jamesrochabrun/skills.

    216 GitHub stars~3.3k tokensUpdated 8 mo ago
    Auto-check passed
  • Git Worktrees

    jamesrochabrun/skills

    Manage Git worktrees for parallel Claude Code development. An agent skill from jamesrochabrun/skills.

    216 GitHub stars~4.2k tokensUpdated 8 mo ago
    Auto-check passed
  • Content Brief Generator

    jamesrochabrun/skills

    Generate comprehensive content briefs for writers, ensuring clarity, alignment, and strategic content creation across all formats.

    216 GitHub starsUsed in 1 repo~2.9k tokens
    Auto-check passed
  • LLM Router

    jamesrochabrun/skills

    This skill should be used when users want to route LLM requests to different AI providers (OpenAI, Grok/xAI, Groq, DeepSeek, OpenRouter) using SwiftOpenAI-CLI.

    216 GitHub stars~3.3k tokensUpdated 8 mo ago
    Auto-check passed

Questions about Anthropic Prompt Engineer

What does Anthropic Prompt Engineer do?

Master Anthropic's prompt engineering techniques to generate new prompts or improve existing ones using best practices for Claude AI models. Anthropic Prompt Engineer is an agent skill from jamesrochabrun/skills. Master Anthropic's prompt engineering techniques to generate new prompts or improve existing ones using best practices for Claude AI models.

When should I use Anthropic Prompt Engineer?

Anthropic Prompt Engineer fits situations like: tasks that involve Prompt engineering.

How do I install Anthropic Prompt Engineer in Claude Code?

Run `npx skills add jamesrochabrun/skills --skill anthropic-prompt-engineer -a claude-code`. Or copy the skill folder (skills/anthropic-prompt-engineer in jamesrochabrun/skills) into .claude/skills/anthropic-prompt-engineer in your project. Claude Code loads it when a task matches its description.

How do I install Anthropic Prompt Engineer in Codex?

Run `npx skills add jamesrochabrun/skills --skill anthropic-prompt-engineer -a codex`. Or copy the skill folder (skills/anthropic-prompt-engineer in jamesrochabrun/skills) into .agents/skills/anthropic-prompt-engineer in your project. Codex loads it when a task matches its description.

Can I use Anthropic Prompt Engineer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jamesrochabrun/skills --skill anthropic-prompt-engineer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/anthropic-prompt-engineer, .gemini/skills/anthropic-prompt-engineer, .github/skills/anthropic-prompt-engineer and .opencode/skills/anthropic-prompt-engineer in your project.

What does Anthropic Prompt Engineer need to run?

Going by SKILL.md and its folder, Anthropic Prompt Engineer needs the command-line tools its instructions call (make).

Does Anthropic Prompt Engineer access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Anthropic Prompt Engineer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Anthropic Prompt Engineer use?

Anthropic Prompt Engineer is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Anthropic Prompt Engineer use?

About 1.1k tokens (SKILL.md is roughly 4.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 6.2k tokens, read only when the agent opens those files.

What are the alternatives to Anthropic Prompt Engineer?

Skills that share tags, products or a category with Anthropic Prompt Engineer: Prompt Improver (severity1/claude-code-prompt-improver, 1.9k stars), Prompt Engineering Patterns (ynulihao/AgentSkillOS, 618 stars), Patch Creation (Piebald-AI/tweakcc, 2.5k stars) and Senior Prompt Engineer (maslennikov-ig/claude-code-orchestrator-kit, 260 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Anthropic Prompt Engineer?

jamesrochabrun (a GitHub user) maintains it in jamesrochabrun/skills, which has 216 GitHub stars. The repository holds 23 skills in this directory. The repository was last updated on January 14, 2026.

Source: jamesrochabrun/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.