Skip to content

Prompt library

Copy-and-adapt prompts for Claude Code, grouped from discovery through to operations, plus the patterns that make any prompt work better.

These are prompts I actually use, tidied up so you can paste them and swap in your own details. Anything in <angle brackets> is a placeholder. They are grouped by the stage of work they help with, not by job title: product managers, designers and ops engineers get as much out of the "understand" prompts as developers do.

Once a prompt works well for your project, make it repeatable: save it as a skill so the team can run it as a /command, and put whatever Claude had to learn into CLAUDE.md.

Some prompts need extra setup

A few prompts assume Claude can reach something outside the repository:

MarkerWhat it needs
TrackerYour issue tracker connected as a claude.ai connector or an MCP server
GitHubThe gh CLI signed in, or GitHub connected as a connector
BrowserA way to render and screenshot pages: the desktop app preview, Claude in Chrome, or a Playwright MCP server
DataYour warehouse or log store connected as a connector or MCP server

Understand

First look at a repo

walk me through this codebase: what it does, the main folders, and how a request flows through it

Explain one module, in the format you need

explain what <src/sync/conflict-resolver.ts> does and where its inputs come from. present it as <a single HTML page with a sequence diagram, and open it in my browser>

Find where something happens

where do we <decide whether a user can see another team's projects>?

Check the blast radius

if I removed <the legacyPriceFormatter function>, what would break? list every caller and test

Learn the history

read the git history for <lib/rate_limit.rb> and tell me how it got to its current shape and why

Size up a change (handy for PMs and designers)

which files would need to change to <let users export reports as Excel files>? rough effort for each

Follow a user action end to end

I'm a <product designer>. explain in plain language what happens when a user <presses "Archive project">, from the button to the database and back

Plan and design

Plan without touching anything

plan how to <split the notifications service out of the monolith>. list the files you'd change and in what order. don't edit anything yet

Write a spec by interview

I want to build <team-level spending limits>. ask me questions one at a time about behaviour, UX, edge cases and trade-offs until nothing is left open, then write the spec to <docs/specs/spending-limits.md>

Turn notes into tickets (Tracker)

read <@notes/2026-10-02-planning.md>, pull out every action item, and create a ticket in <Linear> for each with acceptance criteria and an owner if one was named

Enumerate the states a design must cover

list every empty, loading, error and edge-case state the design for <the invite-teammates flow> needs to handle

Mockup to clickable prototype

here's a mockup [paste image]. build a clickable prototype that matches the layout and shows each state

Build from a screenshot and self-check (Browser)

implement this design [paste image]. then screenshot your result, compare it with the original and fix the differences until they match

Build

Copy an existing pattern

study how <the Stripe webhook handler> is built, then build <a GoCardless webhook handler> the same way, including tests

Small, well-defined endpoint

add a <GET /api/status> endpoint that returns <the deployed commit SHA and database connectivity>

Work an issue end to end (GitHub)

read issue #<418>, implement a fix, run the relevant tests and tell me what you changed

Quick internal tool

build a <one-page tool that turns a CSV of timesheets into a weekly summary table> using plain HTML, CSS and JavaScript, then open it in my browser

Change copy everywhere, carefully

find every occurrence of "<Book a demo>" or close variants, show me each in context, then change them to "<Talk to sales>". leave tests and the changelog untouched

Draft from existing examples

read the <incident reports> in <docs/incidents/> to learn their structure and tone, then draft one for <yesterday's queue backlog outage>

Add missing docs

find <exported functions in packages/core> without <TSDoc> comments and add them, matching the style already used in each file

Test

Write, run, fix

write tests for <app/services/refunds.py>, run them, and fix any failures. tell me if a failure looks like a real bug rather than a bad test

Tests first

write failing tests for <the password strength meter> first, then implement it until they pass

Raise coverage to a target

read <coverage/coverage-summary.json> and add tests to the least-covered files until each is above <85>%

Refactor and optimise

Codebase-wide migration

migrate everything from <moment.js> to <date-fns>: find every usage first and show me the list, then make the changes and run the tests

Port between languages

port <this Go package> to <TypeScript>, keeping the same <public API and test cases>

Hit a measurable target

get <the dashboard's initial load> from <3.4s> to under <1.5s>. measure before and after, and explain each change

Precise visual fix

on <a 390px wide screen>, the <price badge> overflows the <product card> by about <12px>. fix it without changing the desktop layout

Review

Before you commit

review my uncommitted changes and flag anything risky, untested or inconsistent with the rest of the codebase

A teammate's pull request (GitHub)

review PR #<1093>: summarise what it changes, then list concerns ordered by severity

Infrastructure plans

here's my <terraform plan> output [paste]. explain in plain English what will change and flag anything destructive or surprising

Security pass in isolation

use a subagent to review <services/auth/> for security problems and report only findings with a concrete exploit path

Content before it goes out

review <press-release.md> for <claims we can't back up, missing attributions and off-brand wording> and list what to fix before it goes to <legal>

Steer

Redirect

that's not what I need: <the public method signatures must not change>. try a different approach

Narrow the scope

too much. keep only the changes to <the CSV parser> and revert everything else you edited

Make a correction stick

you keep <adding default exports when this project uses named exports>. add a rule to CLAUDE.md so it stops happening

Ship

Merge conflicts

resolve the merge conflicts on this branch and explain, file by file, what you kept from each side

Commit

commit this with a message that explains why the change was needed, not just what changed

Ticket to pull request (Tracker)

find the ticket about <bulk-deleting archived invoices> in <Jira> and open a pull request that implements it

Release notes

compare <v3.8.0> with <main> and draft release notes grouped into features, fixes and breaking changes, written for customers

CI workflow

write a GitHub Actions workflow that <runs lint, type checks and tests, then builds the Docker image> on every push to <main>

Operate

Failing test

<test_invoice_totals_with_vat> is failing. find out why and fix the cause

Reported problem

customers are reporting <duplicate confirmation emails> on <the checkout flow>. investigate and tell me what's happening before changing anything

Build error

here's the build error [paste]. fix the root cause and confirm the build passes

Incident triage

<API error rate jumped to 8% at 14:20>. check the logs, recent deploys and config changes, then give me the most likely cause and how sure you are

Console screenshot

this is a screenshot of <the AWS ECS console> [paste]. explain why <the worker service> keeps restarting and give me the exact commands to fix it

Plain-English log queries (Data)

show me every <failed login> for <the acme tenant> over <the last 48 hours>. write the query, run it and tell me what looks unusual

Analyse a data file

read <@exports/churn-q3.csv>, summarise the main patterns and write the findings to <reports/churn-q3.md>

Generate variations from performance data

read <@ads/october.csv>, find the worst-performing <headlines> and write <8> new options under <40> characters each

Automate

Recurring task to skill

create a /<prepare-release> skill for this project that <bumps the version, updates CHANGELOG.md from merged PRs and opens a release PR>

Hook

write a hook that <runs ruff format on the file> after every <edit or write>

Connect a system

connect <our Sentry project> through MCP so you can read <issues and stack traces> directly

Capture what was learned

summarise what we did this session and suggest what should go into CLAUDE.md

Why these prompts work

Every prompt above leans on a handful of habits. Learn them and you can adapt anything here.

Describe the result, not the route. Say what you want and let Claude find the files.

add request logging with correlation IDs to every API route and keep the existing tests green

Build in a check. Words like run, test, compare and verify make Claude iterate instead of stopping at its first attempt. To check a finished change against the running app, use /verify (see skills).

write the migration, apply it to the local database and confirm the table looks right

Point at an example. Naming an existing file or pattern keeps new code consistent with old.

build the billing settings page with the same layout and form components as the profile page

Give a number. For performance, size or coverage goals, state the metric and the threshold so "done" is unambiguous.

cut the JavaScript bundle below 250 KB and list what you removed

Hand over the evidence. Paste errors, logs, screenshots and plan output, or reference a file with @. Claude reads the real thing rather than your summary.

why did the deploy fail? @logs/deploy-2026-10-07.txt

Say how you want the answer. Format, length and audience all matter. If you always want the same shape, set an output style.

explain how session refresh works as a one-page HTML explainer with a diagram, aimed at a new backend developer

Best practices goes deeper on each of these. For risky or wide-reaching changes, start in plan mode (permission modes) so you see the file list before anything is edited. If you are rolling Claude Code out across a team, admin setup and costs are the next stops.