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

Writing

Analysis

Work & learning

Claude Code

Paste into: Claude Code, started in your project folder

Claude Code: understand code

  • Ask the codebase a 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

    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

    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

    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

    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

    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

    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

  • Implement from a screenshot and self-check

    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

    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

    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

    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

    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

    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

  • Add a small, well-defined 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

    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

    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

    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

    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

    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

    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

  • Fill gaps from a coverage report

    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

    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

    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

    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

    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

    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

    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

  • Catch issues before a 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

    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

    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

    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

    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

    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

    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

    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

  • Commit changes with a generated 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

    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

    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

    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

    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

  • Diagnose a failure from a 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

    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

    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

    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

    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

    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

  • Add a hook for repeat behavior

    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

    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

    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

    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

    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

    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

Open the prompt builder to switch between 12 tasks on one page.