# Claude prompt templates

Each template turns one everyday task into a structured prompt. Pick the one that matches what you need, fill in a few fields, and copy the result.

## Code

- [Code review prompt](https://awesomeclaudeprompts.com/prompts/code-review/): Ask Claude to review a diff for supported issues, ordered by severity, with a location, impact and suggested fix for each finding.
  You'll need: Diff or code change
- [Debug an error](https://awesomeclaudeprompts.com/prompts/debug-error/): Turn an error message and the code around it into a ranked list of likely causes, a check for each, and a fix you can try.
  You'll need: Error message or stack trace, What you expected to happen
- [Write unit tests](https://awesomeclaudeprompts.com/prompts/write-unit-tests/): Get unit tests for a function or module in your framework, covering normal cases, edge cases and errors, with each test explained.
  You'll need: Code to cover, Test framework

## Writing

- [Edit a draft for clarity](https://awesomeclaudeprompts.com/prompts/edit-for-clarity/): Make a draft clearer for a named reader while keeping your meaning and voice, with a short list of what changed and why.
  You'll need: Your draft, Who will read it
- [Reply to an email](https://awesomeclaudeprompts.com/prompts/reply-to-email/): Draft a reply that addresses each question in an email, aims at your goal in the tone you choose, and flags what you still need to decide.
  You'll need: The email you are replying to, What you want the reply to achieve
- [Summarize a document](https://awesomeclaudeprompts.com/prompts/summarize-document/): Turn a long document into a faithful summary: main point first, key points by importance, then decisions and open questions.
  You'll need: Document

## Analysis

- [Analyze customer feedback](https://awesomeclaudeprompts.com/prompts/analyze-customer-feedback/): Group raw customer comments into themes, priorities or feature requests, with counts and quotes that show where each finding comes from.
  You'll need: Customer feedback
- [Compare options and recommend one](https://awesomeclaudeprompts.com/prompts/compare-options/): Weigh two or more options against your criteria and hard limits, see the trade-offs side by side, and get a recommendation when the facts support one.
  You'll need: The decision, The options
- [Extract data to JSON](https://awesomeclaudeprompts.com/prompts/extract-data-to-json/): Pull specific fields out of messy text into JSON that matches your field list, with clear rules for missing or ambiguous values.
  You'll need: Source text, Fields to extract

## Work & learning

- [Critique an argument](https://awesomeclaudeprompts.com/prompts/critique-argument/): Test an argument before you rely on it: its main claim, hidden assumptions, weak links and the strongest objection, with fixes.
  You'll need: The argument
- [Explain a concept](https://awesomeclaudeprompts.com/prompts/explain-concept/): Get a concept explained at your level, in the format that helps you most, with a quick self-check and the common misconceptions.
  You'll need: Concept
- [Turn meeting notes into action items](https://awesomeclaudeprompts.com/prompts/meeting-notes-to-action-items/): Turn rough meeting notes into a clear list of action items with owners and due dates, plus decisions made and questions left open.
  You'll need: Meeting notes

## Claude Code: understand code

Paste into: **Claude Code**, started in your project folder

- [Ask the codebase a product question](https://awesomeclaudeprompts.com/prompts/ask-codebase-product-question/): Say your role and a user action, and Claude Code walks you through what the product does from the interface down to the result, from the source.
  You'll need: Your role, What the user does
- [Check what breaks before you delete code](https://awesomeclaudeprompts.com/prompts/check-what-breaks/): Before you remove a function, file or setting, have Claude Code list its callers and downstream effects, and say whether removal is safe.
  You'll need: What you want to delete
- [Explain unfamiliar code and its data flow](https://awesomeclaudeprompts.com/prompts/explain-unfamiliar-code/): Ask Claude Code to explain what one file or module does and how data moves through it, written up in the format you learn from best.
  You'll need: File, folder or module to explain
- [Find where something happens in the code](https://awesomeclaudeprompts.com/prompts/find-where-code-happens/): Describe a behavior and let Claude Code find the code that does it, with file paths, the path that leads there and any duplicate implementations.
  You'll need: The behavior you are looking for
- [Get oriented in a new codebase](https://awesomeclaudeprompts.com/prompts/codebase-overview/): Ask Claude Code to map an unfamiliar repository: its architecture, key directories, how the parts connect, and where to start for your task.
  You'll need: What you need to do in this codebase
- [Scope a change before you start](https://awesomeclaudeprompts.com/prompts/scope-a-change/): Ask Claude Code which files a change would touch and how big it is, so you can size the work before it goes on a roadmap or into a sprint.
  You'll need: The change you are considering
- [Trace how code evolved through its history](https://awesomeclaudeprompts.com/prompts/trace-code-history/): Have Claude Code read the commit history of a file and explain how it reached its current shape and why, with commits cited as evidence.
  You'll need: File, folder or function

## Claude Code: plan and design

Paste into: **Claude Code**, started in your project folder

- [Implement from a screenshot and self-check](https://awesomeclaudeprompts.com/prompts/implement-from-screenshot/): Give Claude Code a design image; it builds the UI, screenshots the result, compares the two and fixes differences for a set number of rounds.
  You'll need: Where the design goes
- [Map edge cases before building](https://awesomeclaudeprompts.com/prompts/map-edge-cases/): Ask Claude Code to list the error states, empty states and edge cases a feature must handle, so the design covers them before anyone builds it.
  You'll need: Feature or flow
- [Plan a code change before editing](https://awesomeclaudeprompts.com/prompts/plan-code-change/): Have Claude Code read the relevant code and propose a file-by-file plan for a multi-file change, without editing anything until you approve it.
  You'll need: The change you want
- [Turn a meeting into tickets](https://awesomeclaudeprompts.com/prompts/turn-meeting-into-tickets/): Have Claude Code read meeting notes, draft the action items as tickets with acceptance criteria, and create them in your tracker through MCP.
  You'll need: Meeting notes or transcript, Tracker and project
- [Turn a mockup into a working prototype](https://awesomeclaudeprompts.com/prompts/mockup-to-prototype/): Attach a mockup image in Claude Code and get a clickable prototype that follows its layout and states, built in its own folder with fake data.
  You'll need: What the screen or flow is for
- [Write a spec by interview](https://awesomeclaudeprompts.com/prompts/spec-by-interview/): Let Claude Code interview you about a feature, covering implementation, UX, edge cases and tradeoffs, then write a self-contained spec to a file.
  You'll need: The feature, in a sentence or two

## Claude Code: build

Paste into: **Claude Code**, started in your project folder

- [Add a small, well-defined feature](https://awesomeclaudeprompts.com/prompts/add-small-feature/): State the endpoint and what it returns; Claude Code finds where similar endpoints live, adds yours alongside them with tests, and runs the suite.
  You'll need: Endpoint path, What it returns
- [Build a small internal tool from scratch](https://awesomeclaudeprompts.com/prompts/build-internal-tool/): Describe a small tool and Claude Code builds it as plain HTML, CSS and JavaScript files with no framework or build step, then opens it for you.
  You'll need: Tool to build
- [Build something new from an existing pattern](https://awesomeclaudeprompts.com/prompts/follow-code-pattern/): Point Claude Code at code that already works the way you want, so the new feature matches its structure, naming, tests and error handling.
  You'll need: Existing code to follow, What to build
- [Draft a document from past examples](https://awesomeclaudeprompts.com/prompts/draft-from-past-examples/): Point Claude Code at a folder of finished documents so it learns their structure and voice, then drafts a new one with gaps marked instead of invented.
  You'll need: Kind of document, Folder with past examples, The new one is for
- [Find and update copy across the codebase](https://awesomeclaudeprompts.com/prompts/update-copy-across-codebase/): Have Claude Code find a phrase and its near variants across the project, show each one in context, then change the wording while leaving tests alone.
  You'll need: Current wording, New wording
- [Generate docs for undocumented code](https://awesomeclaudeprompts.com/prompts/generate-code-docs/): Have Claude Code find functions or classes without doc comments and add them in the format and style the file already uses, changing no code.
  You'll need: What to document, Comment format
- [Work an issue end to end](https://awesomeclaudeprompts.com/prompts/work-an-issue/): Give Claude Code an issue number; it reads the full issue on GitHub, finds the cause, implements a fix with a test and runs the suite before reporting.
  You'll need: Issue number

## Claude Code: test and refactor

Paste into: **Claude Code**, started in your project folder

- [Fill gaps from a coverage report](https://awesomeclaudeprompts.com/prompts/fill-coverage-gaps/): Point Claude Code at your coverage report and a target percentage; it adds tests to the lowest-covered files and shows the before and after numbers.
  You'll need: Coverage report, Target coverage per file, in percent
- [Fix a precise visual bug](https://awesomeclaudeprompts.com/prompts/fix-visual-bug/): Describe the element, the measurement and the viewport, and Claude Code finds the cause of a layout bug, fixes it and checks other widths.
  You'll need: Element that is wrong, By how much, What it extends beyond, Where it happens
- [Migrate a pattern across a codebase](https://awesomeclaudeprompts.com/prompts/migrate-code-pattern/): Move every use of an old API, library or pattern to its replacement: Claude Code lists each place first, then changes them in checked batches.
  You'll need: Old pattern or API, Replacement
- [Optimize code to a measurable target](https://awesomeclaudeprompts.com/prompts/optimize-to-target/): Give Claude Code a metric and a target value, so it measures first, changes one thing at a time and stops when the number is reached.
  You'll need: What to optimize, Metric, Target value
- [Port code to another language](https://awesomeclaudeprompts.com/prompts/port-code-language/): Have Claude Code port a module to another language while keeping the API and behavior you name, with the tests ported and run against the new code.
  You'll need: Code to port, Target language, What must stay the same
- [Write tests first, then implement](https://awesomeclaudeprompts.com/prompts/test-first-feature/): Have Claude Code write tests that describe a feature before any implementation, confirm they fail, then write code until they all pass.
  You'll need: Feature or behavior to build
- [Write tests, run them, fix failures](https://awesomeclaudeprompts.com/prompts/write-and-run-tests/): Ask Claude Code to write tests for a file, run them and work through the failures in one go, without weakening a test just to make it pass.
  You'll need: Code to test

## Claude Code: review and steer

Paste into: **Claude Code**, started in your project folder

- [Catch issues before a formal review](https://awesomeclaudeprompts.com/prompts/review-before-formal-review/): Before a draft goes to legal, compliance or an editor, have Claude Code check it for the concerns you name and list what to fix, each with a risk level.
  You'll need: File to review, What to check for, Who reviews it next
- [Course-correct a wrong approach](https://awesomeclaudeprompts.com/prompts/course-correct-claude/): When Claude Code heads the wrong way, name the constraint it missed and ask for a different approach, with a check that shows the retry meets it.
  You'll need: What is wrong, and the constraint Claude missed
- [Narrow the scope of a change](https://awesomeclaudeprompts.com/prompts/narrow-change-scope/): When Claude Code changed more than you asked for, keep the part you want and have it undo the rest, file by file, then show the remaining diff.
  You'll need: The changes to keep
- [Review a Terraform plan before applying](https://awesomeclaudeprompts.com/prompts/review-infrastructure-plan/): Paste Terraform plan output into Claude Code and get a plain-language account of what will change and what could break, before you run apply.
  You'll need: Terraform plan output
- [Review a pull request](https://awesomeclaudeprompts.com/prompts/review-pull-request/): Give Claude Code a pull request number; it reads the diff and the code around it, summarizes what changed and lists concerns, without posting anything.
  You'll need: Pull request number
- [Review your changes before you commit](https://awesomeclaudeprompts.com/prompts/review-before-commit/): Have Claude Code review uncommitted changes against their intent and flag risks by severity, asking before any check that could change files.
  You'll need: What the change is meant to do
- [Run a security review with a subagent](https://awesomeclaudeprompts.com/prompts/security-review-subagent/): Have Claude Code hand a security review of one directory to a subagent, so the reading stays out of your session and you get a ranked list of findings.
  You'll need: Directory or file to review
- [Turn a repeated correction into a CLAUDE.md rule](https://awesomeclaudeprompts.com/prompts/correction-to-claude-md/): When Claude Code keeps making the same mistake, have it write one short, checkable rule into CLAUDE.md, so later sessions start with the correction.
  You'll need: What Claude keeps doing

## Claude Code: git and release

Paste into: **Claude Code**, started in your project folder

- [Commit changes with a generated message](https://awesomeclaudeprompts.com/prompts/commit-with-message/): Have Claude Code read the diff, check for files that should not go in, and commit with a message that says what changed and why. It does not push.
  You'll need: Changes to commit
- [Draft release notes from git history](https://awesomeclaudeprompts.com/prompts/release-notes-from-git/): Have Claude Code compare two git tags or branches and draft release notes grouped into breaking changes, features and improvements for your readers.
  You'll need: Previous release (tag, branch or commit), New release (tag, branch or commit)
- [Open a pull request from a ticket](https://awesomeclaudeprompts.com/prompts/pull-request-from-ticket/): Point Claude Code at a ticket in your connected tracker; it reads it, implements the change on a new branch, runs the tests and prepares the pull request.
  You'll need: What the ticket is about, Where the ticket lives
- [Resolve merge conflicts and explain the result](https://awesomeclaudeprompts.com/prompts/resolve-merge-conflicts/): Tell Claude Code what each branch was meant to do; it resolves the conflicts, runs your checks and explains what it kept from each side.
  You'll need: What each side was meant to do
- [Write a GitHub Actions CI workflow](https://awesomeclaudeprompts.com/prompts/write-ci-workflow/): Have Claude Code write a GitHub Actions workflow from your project's own build and test commands, with secrets referenced by name and nothing pushed.
  You'll need: What the workflow should do, Branch whose pushes trigger it

## Claude Code: debug and operate

Paste into: **Claude Code**, started in your project folder

- [Diagnose a failure from a console screenshot](https://awesomeclaudeprompts.com/prompts/diagnose-console-screenshot/): Attach a dashboard screenshot in Claude Code; it explains why the resource is failing and lists the exact commands to fix it, each with a check.
  You'll need: What is failing, What the screenshot shows
- [Find and fix a failing test](https://awesomeclaudeprompts.com/prompts/fix-failing-test/): Name the failing test; Claude Code runs it, traces the failure into the source, explains the cause, fixes it and shows the passing test output.
  You'll need: Failing test (name or file)
- [Fix a build error at the root cause](https://awesomeclaudeprompts.com/prompts/fix-build-error/): Paste a build error; Claude Code reproduces it, fixes the root cause without suppressing the error, and shows the build and tests passing again.
  You'll need: Build error output
- [Investigate a production incident](https://awesomeclaudeprompts.com/prompts/investigate-incident/): Give Claude Code the symptom and when it started; it checks logs, recent deploys and config changes, then names the most likely cause with evidence.
  You'll need: What is going wrong
- [Investigate an error users report](https://awesomeclaudeprompts.com/prompts/investigate-reported-error/): Give Claude Code the symptom and where users see it; it traces the code path, read-only, and explains the likely cause with evidence and a proposed fix.
  You'll need: What users are seeing, Where they see it
- [Query logs in plain English](https://awesomeclaudeprompts.com/prompts/query-logs-plain-english/): Ask Claude Code a question about your logs; it writes a read-only query, runs it, and shows the query, the results and what stands out.
  You'll need: What to look for, Which system or service, Time range

## Claude Code: data and automation

Paste into: **Claude Code**, started in your project folder

- [Add a hook for repeat behavior](https://awesomeclaudeprompts.com/prompts/add-claude-code-hook/): Describe an action and when it should run; Claude Code writes the hook into your settings, tries it once and shows you how to check or remove it.
  You'll need: What should happen, After what
- [Analyze a data file and report the patterns](https://awesomeclaudeprompts.com/prompts/analyze-data-file/): Point Claude Code at a CSV or other data file; it checks the data, computes the key patterns with code and writes them to a report file.
  You'll need: Data file
- [Capture what to remember for next time](https://awesomeclaudeprompts.com/prompts/capture-session-learnings/): At the end of a session, have Claude Code summarize the work and propose short CLAUDE.md lines, each with a reason, before anything is edited.
  You'll need: What the session was about
- [Connect a tool to Claude Code with MCP](https://awesomeclaudeprompts.com/prompts/connect-tool-mcp/): Name a tool and the data you need; Claude Code finds a trustworthy MCP server, shows the add command first, connects it and checks it with one read.
  You'll need: Tool to connect, What Claude should read from it
- [Generate ad variations from performance data](https://awesomeclaudeprompts.com/prompts/generate-ad-variations/): Have Claude Code read your ad performance export, find the weakest headlines and write new variations that fit your character limit.
  You'll need: Performance data file, What to rewrite, How many new variations, Character limit
- [Turn a repeated task into a skill](https://awesomeclaudeprompts.com/prompts/turn-task-into-skill/): Describe a workflow you repeat and have Claude Code save it as a skill, so you or your team can run it later as a slash command.
  You'll need: Skill name, What the skill should do

## How to choose a template

- Start from the task, not the wording. If you need a shorter version of something long, use a summary template; if you need fields pulled into a fixed format, use the extraction template.
- Each card lists the fields you must fill in. Optional fields make the prompt more specific, but every template produces a usable prompt with only the required ones.
- Templates that take long source material put it first inside a named tag, followed by the instructions; the concept template starts with your topic and level instead. Every template page explains why it is built that way.
- Templates in the Claude Code groups are for Claude Code, which reads the files in your project and can edit them and run commands. Start Claude Code in the project folder and paste the prompt there; a chat that cannot see your files cannot follow them.

---

Awesome Claude Prompts is an independent project. It is not affiliated with, endorsed by, or sponsored by Anthropic. Claude is a trademark of Anthropic, PBC.
