API endpoint from pattern
Add a route that matches your backend conventions, with tests.
Add a <METHOD> <route> endpoint following the pattern in @<router-file>. Validate the input, return typed responses, and add one happy-path test plus one error-case test.
Official basis Reference existing patterns and give Claude a check it can run. docs ↗
Build to a verifiable check
Build against a concrete, runnable check.
Implement <function>. Example cases: <input → output>, <input → output>. After implementing, run the tests and show me they pass — show the output, don't just assert that it works.
Official basis Give Claude a way to verify its work — show evidence, don't assert success. docs ↗
Component clone
Spin up a new component that matches an existing one.
Create a new component like @<existing> but for <use case>. Reuse its props style, file structure, and styling approach — don't invent new conventions.
Official basis Reference existing patterns so Claude matches your conventions. docs ↗
Feature from spec
Implement one feature that fits the file's existing conventions.
Implement <feature> in @<file>. Match the existing patterns in this file. Add types, handle the error cases, and stop after the minimal working version — no extra abstractions.
Official basis Tell Claude what to do (not just suggest) and give specific context. docs ↗
Go above and beyond
Get an ambitious first version instead of a bare minimum.
Build <thing>. Include as many relevant features and interactions as you can think of — go beyond the basics to create a fully-featured version, not a minimal one.
Official basis Explicitly request "above and beyond" behavior when you want it. docs ↗
Mockup to code
Recreate a design and self-check it visually.
[paste screenshot] Build this component in <framework>. Then take a screenshot of your result, compare it against the mockup, and list the visual differences you still need to fix.
Official basis Provide rich content (images) plus a visual check to verify the result. docs ↗
Package a workflow as a Skill
Turn a repeated workflow into a reusable Skill.
We keep repeating <workflow>. Create a Claude Skill for it: a SKILL.md with YAML frontmatter (a name, and a description that says both what it does AND when to use it), plus any helper scripts. Keep the body concise.
Official basis Package repeatable workflows as Skills; the description drives auto-triggering. docs ↗
Plan-first scaffold
Get an agreed plan before a single line is written.
Before writing any code, outline a short plan for <feature>: the files you'll create or touch, the key functions, and the data flow between them. Wait for my OK, then implement.
Official basis Explore first, then plan, then code — separate research from implementation. docs ↗
Scaffold with TDD
Lock behavior with tests before writing the implementation.
Write failing tests for <behavior> first and show them to me. Once I confirm, implement until they pass. Don't modify the tests without asking.
Official basis Give Claude a way to verify its work — tests it can run. docs ↗
Spec-first interview
Turn a fuzzy feature idea into a written spec.
I want to build <feature>. Before writing any code, interview me one question at a time — cover the implementation approach, UX, edge cases, and tradeoffs. When we're done, write the agreed decisions to SPEC.md and stop.
Official basis Let Claude interview you, then write a spec to execute in a fresh session. docs ↗
Describe the symptom
Hand Claude a well-scoped bug it can act on immediately.
Bug: <what users actually see>. It most likely lives in <area or files>. A correct fix means <observable success>. Write a failing test that reproduces it first, then fix the root cause.
Official basis Describe the symptom — what's wrong, where it lives, and what fixed looks like. docs ↗
Investigate with a subagent
Explore a subsystem without bloating your main context.
Use a subagent to investigate how <system or flow> works across the codebase and report back a concise summary. Don't change anything yet — just map it out.
Official basis Delegate research to subagents to keep the main context focused. docs ↗
Pipe logs to Claude
Triage a log file without leaving the terminal.
tail -n 200 <logfile> | claude -p "Flag any anomalies or errors in these logs and name the most likely root cause."
Official basis Pipe data straight in and use non-interactive (headless) mode. docs ↗
Print-debug plan
Instrument a hard-to-see bug, then clean up after.
Add targeted logging to narrow down <issue>. Tell me exactly what output to look for and what each value would mean. Once we've found the cause, remove the logs.
Official basis Give Claude a check it can run and have it show evidence. docs ↗
Read before you claim
Stop confident-but-wrong answers about unread code.
Read <file> in full before you answer. Never speculate about code you haven't opened — if you need another file to be sure, open it first, then explain what's wrong.
Official basis Minimize hallucinations — you MUST read the file before answering. docs ↗
Regression bisect
Pin a regression to the exact change that introduced it.
This worked before my recent changes. Review the diff in @<files> and identify which specific change most likely caused <symptom>. Explain the mechanism.
Official basis Point Claude to sources — the recent diff or git history. docs ↗
Reproduce then fix
Turn a bug into a permanent regression test.
Write a minimal failing test that reproduces this bug and confirm it fails. Then fix the underlying cause and show the same test passing.
Official basis Fix bugs efficiently — reproduce first, then fix and verify. docs ↗
Root-cause first
Understand a bug before touching any code.
Here's the error: <paste>. Don't fix anything yet — trace the root cause, list the top 2 hypotheses ranked by likelihood, and tell me which files to look at.
Official basis Address root causes, not symptoms. docs ↗
Screenshot diagnosis
Diagnose a visual or UI bug straight from an image.
[paste screenshot of the error or broken UI] What's causing this? Trace it to the responsible code and explain the mechanism before proposing a fix.
Official basis Use images to give Claude context it can't get from text alone. docs ↗
Stack-trace triage
Get a fast, precise read on where a crash originates.
Given this stack trace <paste>, point to the exact line responsible and explain in 2 sentences what is null/undefined/throwing and why.
Official basis Provide the stack trace and describe the symptom precisely. docs ↗
Extract & dedupe
Remove duplication without altering behavior.
@<file> has repeated logic in <functions>. Extract a shared helper without changing behavior. Keep the public API identical, and run the tests to confirm nothing broke.
Official basis Give Claude a way to verify its work — run the tests after. docs ↗
Fan out a migration
Plan a repetitive change across many files.
List every file that needs the <X → Y> migration, and for each one describe the exact change. I'll then run you over each file with a scoped, tightly-permissioned command — for now, just produce that per-file plan.
Official basis Fan out across files for large, mechanical migrations. docs ↗
Find deprecated usage first
Map the blast radius before starting a migration.
Find all usages of <deprecated API or pattern> across the codebase and list them with file paths. Then propose a refactor plan in small, testable steps — don't change anything yet.
Official basis Refactor step one — locate the deprecated usage, then plan the change. docs ↗
General solution, not test-gaming
Prevent solutions that only satisfy the test cases.
Fix <function> so it works correctly for all valid inputs. Implement the real logic that generalizes — do not hard-code values or special-case the tests just to make them pass.
Official basis Don't focus on passing tests or hard-coding — solve the general case. docs ↗
No over-engineering
Keep a refactor tight and scoped to what was asked.
Refactor <target>. Only make changes that are directly requested or clearly necessary — no new abstractions, no extra config, and no defensive code for cases that can't actually happen.
Official basis Avoid overeagerness — only make changes directly requested or clearly necessary. docs ↗
Rename safely
Rename a symbol everywhere without collateral edits.
Rename <old> to <new> across the codebase. Update all references and imports, and don't touch any unrelated code. Show me the list of files changed.
Official basis Scope the task — only make changes directly requested. docs ↗
Simplify function
Make a gnarly function readable without changing what it does.
Refactor <function> in @<file> for readability — early returns, clearer names, fewer nested branches. Behavior must stay identical; show me a before/after of the tricky parts.
Official basis Refactor in small, testable increments. docs ↗
Split a large file
Break up a sprawling file into focused modules.
@<file> is too large. Propose a split into cohesive modules with concrete names and responsibilities. Wait for my OK, then move the code and fix all imports.
Official basis Plan before editing — propose the split, then execute. docs ↗
Type-tighten
Firm up weak types and surface hidden bugs.
Replace any/loose types in @<file> with precise types inferred from how the values are actually used. Don't change runtime behavior, and flag anything that reveals a real bug.
Official basis Give Claude a way to verify — keep behavior identical, run the type-checker. docs ↗
Understand git history first
Learn the context behind code before you change it.
Look through the git history of <file> and summarize how its API evolved and why, before we refactor it. Flag any change that looks like it was made to fix a specific bug.
Official basis Point Claude to sources — including git history — for context. docs ↗
Diff review
A focused correctness pass on the change you just made.
Review my current diff for correctness bugs and edge cases only. List findings by severity (high/medium/low). Skip style nits and formatting.
Official basis Add an adversarial review step — flag only correctness/requirement gaps. docs ↗
Edge-case hunt
Find the tests you forgot to write.
Analyze these code paths and list the tests I'm missing — error conditions, boundary values, and unexpected inputs I haven't covered. Don't write them yet, just enumerate the gaps.
Official basis Ask Claude to identify edge cases you might have missed. docs ↗
Explain-back
Understand unfamiliar code and catch surprises in it.
Explain what @<file> does in plain language, step by step. Then flag anything that looks unintentional or inconsistent with the rest of the module.
Official basis Ask codebase questions like a senior engineer; chain into self-correction. docs ↗
Fresh-context adversarial review
An unbiased review that won't rubber-stamp your own code.
In a fresh context, review this diff and report only gaps that affect correctness or the stated requirements — ignore style. For each finding give the file, the risk, and a concrete fix.
Official basis Add an adversarial review step in fresh context; flag only real gaps. docs ↗
Performance sniff
Catch scaling problems before they hit production.
Scan @<file> for performance issues that matter at scale — N+1 queries, needless allocations in hot paths, blocking calls in async code. Only flag things with real impact, and estimate the cost of each.
Official basis Ask Claude the questions you'd ask a senior engineer. docs ↗
PR-ready check
Self-review a PR the way a demanding reviewer would.
Act as a strict reviewer. Does this change actually do what the PR description claims? Call out untested paths, missing error handling, and anything that would block approval.
Official basis Review the generated PR for risks before submitting. docs ↗
Review against the plan
Verify the change actually matches the agreed plan.
Review the diff against PLAN.md: is every requirement implemented, are the listed edge cases tested, and did anything change that was out of scope? List gaps and scope creep separately.
Official basis Review the work against the plan or spec, not just in the abstract. docs ↗
Security pass
A targeted security review of sensitive code.
Audit @<file> for injection, auth, and secret-handling issues. For each finding give the concrete risk, a reproduction path, and a specific fix. Ignore theoretical issues that can't happen given how it's called.
Official basis Use a focused (sub)agent for a dedicated security review pass. docs ↗
Structured review rubric
Get a review you can parse by concern.
Review this diff and structure your findings with XML tags — <correctness>, <security>, <performance>, <style> — so I can scan each category separately. Put the most serious issues first within each.
Official basis Structure prompts and outputs with XML tags for unambiguous parsing. docs ↗
Writer / Reviewer split
Get reviewer eyes that aren't biased toward the author.
You didn't write this code. Review <file> for edge cases, race conditions, and consistency with our existing patterns. Be skeptical and assume there's at least one problem.
Official basis Fresh context improves review — Claude won't defend code it just wrote. docs ↗