繁中 →
visitors

The 52 official Claude Code prompts from Anthropic

Grouped by the 5 stages of development · one click to copy · paste straight into Claude Code

← Home About · Token-saving tips · Threads
Anthropic publishes a Claude Code prompt library. I pulled the 52 prompts out of it, grouped them by the 5 stages of development, and made every one a single click to copy.

How to use it: find the stage you are stuck at, copy the matching prompt, swap the braces { } for your own situation, and paste it into Claude Code. The wording is the official one, so it works as it stands.

Source: Claude Code prompt library (official docs).

Discover, get the lay of the land7 prompts

Just took the project over and cannot see the whole picture? Let it walk you through the codebase first.

give me an overview of this codebase: architecture, key directories, and how the pieces connectgive me an overview of this codebase: architecture, key directories, and how the pieces connect
explain what {path} does and how data flows through it. write it up as {format}explain what {path} does and how data flows through it. write it up as {format}
where do we {behavior}?where do we {behavior}?
what would break if I deleted {target}?what would break if I deleted {target}?
look through the commit history of {path} and summarize how it evolved and whylook through the commit history of {path} and summarize how it evolved and why
which files would I need to touch to {change}?which files would I need to touch to {change}?
I am a {role}. walk me through what happens when a user {action}, from the UI down to the resultI am a {role}. walk me through what happens when a user {action}, from the UI down to the result

Design, plan it first6 prompts

Do not start by writing code. Get the approach, the edges, and the tradeoffs straight first.

plan how to refactor the {target} to {goal}. list the files you would change, but don't edit anything yetplan how to refactor the {target} to {goal}. list the files you would change, but don't edit anything yet
I want to build {feature}. interview me about implementation, UX, edge cases, and tradeoffs until you have enoughI want to build {feature}. interview me about implementation, UX, edge cases, and tradeoffs until you have enough
read {input} and write up the action items, then create a {tracker} ticket for each with acceptance criteriaread {input} and write up the action items, then create a {tracker} ticket for each with acceptance criteria
list the error states, empty states, and edge cases for {feature} that the design needs to coverlist the error states, empty states, and edge cases for {feature} that the design needs to cover
here is a mockup. build a working prototype I can click through, matching the layout and stateshere is a mockup. build a working prototype I can click through, matching the layout and states
implement this design, then take a screenshot of the result, compare it to the original, and fix the differencesimplement this design, then take a screenshot of the result, compare it to the original, and fix the differences

Build, do the work22 prompts

Make it follow the rhythm the project already has, and rein it in once the code is written.

look at how {example} is implemented to understand the pattern, then build {new} the same waylook at how {example} is implemented to understand the pattern, then build {new} the same way
find {scope} without {format} comments and add them, matching the style already used in the filefind {scope} without {format} comments and add them, matching the style already used in the file
add a {endpoint} endpoint that returns {payload}add a {endpoint} endpoint that returns {payload}
create a {tool} using HTML, CSS, and vanilla JavaScript, then open it in my browsercreate a {tool} using HTML, CSS, and vanilla JavaScript, then open it in my browser
read issue #{issue}, implement the fix, and run the testsread issue #{issue}, implement the fix, and run the tests
find every place we say "{copy}" or a close variant, show me each one in context, then update themfind every place we say "{copy}" or a close variant, show me each one in context, then update them
read the {examples} in {folder} to learn the structure and voice, then draft a new one for {topic}read the {examples} in {folder} to learn the structure and voice, then draft a new one for {topic}
write tests for {path}, run them, and fix any failureswrite tests for {path}, run them, and fix any failures
write tests for {feature} first, then implement it until they passwrite tests for {feature} first, then implement it until they pass
read {report} and add tests for the lowest-covered files until each is above {target}%read {report} and add tests for the lowest-covered files until each is above {target}%
migrate everything from {from} to {to}: identify every place that needs to change, then make the changesmigrate everything from {from} to {to}: identify every place that needs to change, then make the changes
port {source} to {target}, keeping the same {keep}port {source} to {target}, keeping the same {keep}
optimize {target} to bring {metric} from {current} down to under {goal}optimize {target} to bring {metric} from {current} down to under {goal}
the {element} extends {amount} beyond the {container} on {viewport}. fix it.the {element} extends {amount} beyond the {container} on {viewport}. fix it.
review my uncommitted changes and flag anything that looks risky before I commitreview my uncommitted changes and flag anything that looks risky before I commit
review PR #{pr} and summarize what changed, then list any concernsreview PR #{pr} and summarize what changed, then list any concerns
here is my Terraform plan output. what is this going to do, and is anything here going to cause problemshere is my Terraform plan output. what is this going to do, and is anything here going to cause problems
use a subagent to review {path} for security issues and report what it findsuse a subagent to review {path} for security issues and report what it finds
review {file} for {concerns} and list anything I should fix before it goes to {reviewer}review {file} for {concerns} and list anything I should fix before it goes to {reviewer}
that is not right: {feedback}. try a different approachthat is not right: {feedback}. try a different approach
that is too much. keep only the changes to {scope} and undo your other editsthat is too much. keep only the changes to {scope} and undo your other edits
you keep {mistake}. add a rule to CLAUDE.md so this stops happeningyou keep {mistake}. add a rule to CLAUDE.md so this stops happening

Ship it5 prompts

Know exactly what you changed before you ship, and keep the delivery clean.

resolve the merge conflicts in this branch and explain what you kept from each sideresolve the merge conflicts in this branch and explain what you kept from each side
commit these changes with a message that summarizes what I didcommit these changes with a message that summarizes what I did
find the {tracker} ticket about {topic} and open a PR that implements itfind the {tracker} ticket about {topic} and open a PR that implements it
compare {from} to {to} and draft release notes grouped by feature, fix, and breaking changecompare {from} to {to} and draft release notes grouped by feature, fix, and breaking change
write a GitHub Actions workflow that {steps} on every push to {branch}write a GitHub Actions workflow that {steps} on every push to {branch}

Operate, run it and debug it12 prompts

Once it is live, treat it as your repair tech: diagnose, debug, and turn what you learn into rules.

the {test} test is failing, find out why and fix itthe {test} test is failing, find out why and fix it
users are seeing {symptom} on {where}. investigate and tell me what is going onusers are seeing {symptom} on {where}. investigate and tell me what is going on
here is a build error. fix the root cause and verify the build succeedshere is a build error. fix the root cause and verify the build succeeds
{symptom}. check the logs, recent deploys, and config changes, then tell me the most likely cause{symptom}. check the logs, recent deploys, and config changes, then tell me the most likely cause
here is a screenshot of {console}. walk me through why {resource} is failing and give me the exact fixhere is a screenshot of {console}. walk me through why {resource} is failing and give me the exact fix
show me all {events} for {scope} over {timeframe}. write the query, run it, and tell me what stands outshow me all {events} for {scope} over {timeframe}. write the query, run it, and tell me what stands out
read {file}, summarize the key patterns, and write the results to {output}read {file}, summarize the key patterns, and write the results to {output}
read {file}, find the underperforming {items}, and generate {n} new variations that stay under the limitread {file}, find the underperforming {items}, and generate {n} new variations that stay under the limit
create a /{name} skill for this project that {steps}create a /{name} skill for this project that {steps}
write a hook that {action} after every {event}write a hook that {action} after every {event}
set up the {server} MCP server so you can read my {data} directlyset up the {server} MCP server so you can read my {data} directly
summarize what we did this session and suggest what to add to CLAUDE.mdsummarize what we did this session and suggest what to add to CLAUDE.md

Just getting started with Claude Code?

Start with my notes on saving tokens and automating the work, no coding needed

Read the Claude Code token-saving guide →

Want to go deeper? My other guides

Want to learn AI alongside other people?

Join my free LINE learning community: build notes, questions and answers, and the tools and resources I keep dropping in

Join the Leo AI learning community →

Found this useful? Cite it and pass it on