Guide · Updated 2026-10-09
Best Claude Code prompts (2026): work orders, workflow and Cursor versions
These are the Claude Code prompts we'd actually paste in 2026. Start with the work orders for everyday jobs like fixing a failing test, refactoring a module, or reviewing a PR. For bigger changes, run the Explore → Plan → Implement → Verify loop, which works in Cursor too. Below that you'll find CLAUDE.md, AGENTS.md, Cursor rules, and SKILL.md templates that make good prompts the default. Everything here is original and meant to sit alongside Anthropic's official prompt library, not replace it.
Next step: describe your goal and get ranked prompts with quality, match & confidence scores.
Rank coding-agent prompts for my goal →Opens the homepage goal box with a starter query you can edit.
Claude Code work orders
Most good Claude Code prompts in 2026 read like a work order you'd hand a contractor: what to change, what not to touch, the command that proves it worked, and where to stop and check in with you. Each of these jobs comes up every week, so each one has its own page with the full prompt, a few variations, what good output looks like, and the usual ways it goes wrong.
- Fix a failing test: Fix the code behind a red test while the test file stays read-only.
- Refactor one module safely: Restructure one module in small approved steps with tests green after each.
- Write CLAUDE.md for an existing repo: Have Claude read the repo, test the commands, and write a short CLAUDE.md from evidence.
- Review a PR like a senior dev: Read-only review that checks intent, callers, data, security and tests, ranked by severity.
- Add tests to untested code: Pin down what untested code does today, flag likely bugs, and prove the tests can fail.
Every work order uses [brackets] for the parts you fill in, keeps Claude read-only until you approve a plan or a cause, and ends with a report you can check quickly. They work in Cursor's Agent mode too.
Official reference: Anthropic’s Claude Code prompt library
Anthropic publishes an official Claude Code prompt library: around fifty short, copy-paste prompts (52 when we checked on 2026-10-06), tagged by task (onboarding, understanding code, planning, prototyping, implementing, testing, refactoring, review, steering, git, release, debugging, incidents, data, and automation) and by role, each with a note on why the pattern works. It is the authoritative starting point for Claude Code, and we recommend using it alongside this page.
This guide is a companion, not a competitor. It covers what a short-prompt library intentionally leaves out:
- A gated workflow. Longer, structured Explore → Plan → Implement → Verify prompts with explicit stop points and acceptance criteria, for changes too big for a one-liner.
- Cursor wording. Versions tuned for Cursor’s Ask/Plan Mode, Agent mode, @-mentions, and project rules.
- Instruction files. Ready-to-copy CLAUDE.md, AGENTS.md, .cursor/rules, and SKILL.md templates, so a prompt that works once becomes the default.
- Documentation prompts. Detailed prompts for documenting undocumented code and turning git history into release notes.
Rule of thumb: reach for the official library when you want a quick, single-sentence ask; reach for this guide when the change spans several files, needs review gates, or should be encoded into your repo’s agent setup. Everything on this page is original BestPromptFinder content; we are not affiliated with Anthropic or Cursor.
Explore → Plan → Implement → Verify prompts
Replace bracketed fields. Run the stages in order and approve each gate before moving on. The wording works in Claude Code, Cursor, and other coding agents.
Explore only. Do not create, edit, or delete files, and do not run commands that change state. Goal: [one sentence: the feature or bug] Start from: [entry point, failing test, ticket link, or "find it yourself"] Investigate and report: 1. Map: directories, entry points, and modules involved (short tree). 2. Key files: path + one line on why each matters. Cite file:line for anything surprising. 3. Data & interfaces: models, API routes, events, and UI surfaces this goal touches. 4. Existing patterns: the closest similar feature I should copy, and the tests that cover this area. 5. Risks: auth boundaries, migrations, concurrency, flaky tests, generated code, feature flags. 6. Unknowns: questions only I can answer (max 5). Prefer evidence from the repo over assumptions. Label any guess "unverified". Stop after the report and wait for me.
Claude Code: run it in plan mode (Shift+Tab cycles permission modes) so no edits can happen. Cursor: see the Ask/Plan Mode version below.
Using the Explore report above, write an implementation plan. Still no edits. Change goal: [feature / bugfix] Constraints: [e.g. no new dependencies, keep the public API stable, ship behind a flag] The plan must include: 1. Summary: 3 to 5 sentences on the approach and why it beats the main alternative. 2. Steps: numbered, each small enough to review as one diff. For every step: files to touch, the change, and the exact check that proves it works (test name, command, or manual step). 3. Non-goals: what we will deliberately not change. 4. Risk & rollback: flag, migration reversal, or revert plan for anything risky. 5. Acceptance criteria: testable bullets I can tick off. 6. Blocking questions: only if the plan cannot proceed without an answer. If I say "save", write the plan to [docs/plans/<short-name>.md]; otherwise print it. Wait for my approval before implementing anything.
Saving the plan to a file gives later sessions (and the Verify step) a single source of truth for the acceptance criteria.
Implement step [N] of the approved plan, and only that step. Rules: - Follow the patterns in [reference file] and the conventions in CLAUDE.md / AGENTS.md. - Smallest diff that satisfies the step. No drive-by refactors, renames, or formatting churn. - Add or update the tests this step calls for, then run them: [test command]. - If a test fails, fix the cause rather than the test. If the test itself is wrong, say why. - If the plan turns out to be wrong for the current code, stop and propose an amended step instead of improvising a larger rewrite. When done, report: files changed, what each change does, the commands you ran and their results, and anything deferred to later steps.
Giving the agent a command to run in the same prompt lets it iterate on failures instead of stopping after the first attempt.
Verify the work against the acceptance criteria. Act as a skeptical reviewer, not the author. Acceptance criteria: [paste, or point to docs/plans/<short-name>.md] Scope: [step N | the whole branch compared with main] Do this: 1. Run the checks: [lint, typecheck, test, build commands]. Report pass/fail with the relevant output lines. 2. Criteria checklist: each criterion: PASS / FAIL / UNTESTED, with evidence (test name, command output, or file:line). 3. Review the diff for bugs, unhandled edge cases, security issues (input validation, authorization, secrets), and performance regressions. Rate each high / medium / low. 4. Regression risk: what else calls the changed code, and is it covered by tests? 5. Ship decision: Ready, or Needs fixes with a short ordered fix list. Do not rewrite the feature. Only fix things yourself if I reply "fix".
Run Verify in a fresh session (or a subagent) so the reviewer is not anchored on the author’s reasoning.
Run Explore → Plan → Implement → Verify for this goal. Pause for my approval after Explore and again after Plan. Do not edit files before I approve the plan. Goal: [what to build or fix] Repo context: [stack, important paths, constraints] Definition of done: [acceptance criteria] Checks to run: [test / lint / typecheck commands] Stage rules: - Explore: read-only, evidence-based map, existing patterns, risks, questions. - Plan: ordered diff-sized steps, a verification check per step, non-goals, acceptance criteria. - Implement: one approved step per turn, minimal diff, run the checks after each step. - Verify: criteria checklist with evidence, review findings by severity, ship decision. Start with Explore only.
Help me reproduce and isolate a bug before we plan a fix. Don't fix anything yet. Reported issue: [symptoms, error message, or log excerpt] Environment: [OS, runtime version, branch, config] Already tried: [list] 1. Write a minimal reproduction: exact steps, or better, a failing test that shows the bug. 2. Give 3 root-cause hypotheses ranked by likelihood, each with the file/function to inspect. 3. For each hypothesis, suggest the smallest probe (log line, assertion, or test) that would confirm or rule it out, and run the probes you can run safely. 4. Ask me only for facts that block diagnosis. Output as ## Reproduction, ## Hypotheses, ## Probe results, ## Questions. Once one hypothesis is confirmed, stop and wait; we'll plan the fix with the loop above.
Cursor versions of the key prompts
Same loop, worded for Cursor’s Agent panel. Use Ask or Plan Mode (Shift+Tab rotates modes) for Explore and Plan, and Agent mode for Implement and Verify. Replace the @[…] placeholders with real @-mentions of files, folders, plan files, or rules.
@[folder or entry file] @[related test file] Read-only pass: don't edit files or run terminal commands that change state. I want to [goal]. Search the codebase and tell me: - which files and symbols are involved (link each one), - the closest existing feature I should copy, - which tests cover this area and the command to run them, - risks or unknowns I should decide on before we plan. Keep it under 300 words and end with up to 5 questions for me.
Create an implementation plan for: [goal] Context: @[files or notes from the Explore pass] @[relevant rule, e.g. @tests] Constraints: [no new dependencies / keep the API stable / etc.] - Ask me clarifying questions first if anything is ambiguous. - Ordered steps, each reviewable as a single diff, each with a verification check. - Non-goals, plus a rollback note for any risky step. - Finish with testable acceptance criteria. Don't build yet. I'll review and edit the plan first.
Use “Save to workspace” on the plan so it lives in the repo and can be @-mentioned by later chats.
Implement step [N] from @[plan file], and only that step. - Match the patterns in @[reference file] and follow the project rules. - Minimal diff: no unrelated refactors, renames, or reformatting. - After the change, run [test command] in the terminal and fix failures your change caused. - If the plan doesn't fit the code, stop and propose an amendment instead. Summarize the files changed and the test results when you're done.
Review the changes on this branch as a strict reviewer. Don't edit anything yet. Acceptance criteria: see the "Acceptance criteria" section of @[plan file] Run in the terminal: [lint] && [typecheck] && [tests] Report: 1. Each criterion: PASS / FAIL / UNTESTED, with evidence. 2. Bugs, edge cases, security and performance issues: high / medium / low, with file:line. 3. Ship decision: Ready, or an ordered fix list.
Starting a new chat for Verify keeps the review independent of the implementation conversation.
You've [mistake, e.g. "used default exports in components"] more than once. Create a project rule in .cursor/rules/ that prevents it: - Pick the narrowest scope: globs for the affected files, or a description so the rule is applied intelligently only when relevant. - Under 15 lines, written as direct instructions, with one short example. - Don't duplicate anything already in AGENTS.md or an existing rule. Show me the .mdc file before saving it.
Cursor’s built-in /create-rule command handles the file plumbing; this prompt adds the scoping and brevity constraints.
CLAUDE.md, AGENTS.md & Cursor rules templates
A prompt that works once becomes a habit when its conventions live in an instruction file the agent reads every session. A setup that works for teams using both tools: keep shared conventions in AGENTS.md, keep CLAUDE.md short and import AGENTS.md into it, and use .cursor/rules/*.mdc only for Cursor-specific or file-scoped rules.
# CLAUDE.md ## Project [One paragraph: what this repo is, who uses it, the main stack.] Shared conventions for all coding agents live in AGENTS.md: @AGENTS.md ## Commands - Install: `[pnpm install]` - Dev server: `[pnpm dev]` - Test one file: `[pnpm test path/to/file.test.ts]` - Test everything: `[pnpm test]` - Lint + typecheck: `[pnpm lint && pnpm typecheck]` ## How to work in this repo - For changes touching more than [3] files: explore and plan first, then wait for my approval. - Implement one plan step at a time and run the relevant tests after each step. - While iterating, run a single test file instead of the whole suite. - Never edit generated files: [src/gen/**, dist/**]. - Ask before adding a dependency, changing a public API, or writing a migration. ## Gotchas - [e.g. Integration tests need `docker compose up db` first.] - [e.g. Timestamps are stored in UTC; format them only in the UI layer.] ## Definition of done - Lint, typecheck, and tests pass locally. - New behavior has a test; bug fixes include a regression test. - Your summary lists files changed and anything I must verify by hand.
Keep it short. Anthropic’s docs suggest staying under about 200 lines per CLAUDE.md. Remove the @AGENTS.md line if you don’t use AGENTS.md. Running /init in Claude Code generates a first draft you can trim to this shape.
# AGENTS.md Instructions for AI coding agents working in this repository. ## Overview [What the project does, in 2 to 3 sentences.] Stack: [language, framework, database, test runner]. ## Layout - `[src/api/]`: [HTTP handlers; keep thin, call services] - `[src/services/]`: [business logic; most changes land here] - `[src/db/]`: [schema and migrations; ask before changing] - `[tests/]`: [mirrors src/; one test file per module] ## Commands - Setup: `[command]` - Test one file: `[command] <path>` - Full check before handing work back: `[lint] && [typecheck] && [test]` ## Conventions - Follow the nearest existing example. New endpoints copy `[src/api/example.ts]`. - [Naming, error-handling, and logging rules a linter doesn't already enforce.] - Keep diffs focused on the task; no unrelated refactors. ## Workflow 1. Explore read-only and summarize what you found. 2. For non-trivial work, propose a plan (steps, checks, acceptance criteria) and wait for approval. 3. Implement one step at a time; run the relevant tests after each. 4. Verify against the acceptance criteria and report results honestly, including anything untested. ## Boundaries - Never commit secrets or edit `.env*` files. - Don't modify `[generated/]` or `[vendor/]`. - Ask before: new dependencies, schema migrations, public API changes, deleting files.
Cursor reads AGENTS.md from the project root and subdirectories. Recent Claude Code versions read AGENTS.md on their own only when there is no CLAUDE.md, so importing it from CLAUDE.md (above) is the version-proof option.
--- alwaysApply: true --- - Project conventions live in AGENTS.md (loaded automatically). This rule only adds workflow. - For tasks touching more than 3 files, write a plan first and wait for approval. - Implement one plan step per turn, then run the relevant test command in the terminal. - Never edit generated files in dist/ or src/gen/. - If you are unsure how something behaves, read the source before guessing, and say what you could not verify.
--- globs: src/**/*.test.ts, src/**/*.spec.ts, tests/** alwaysApply: false --- - Test behavior through the public interface, not private helpers. - One behavior per test; name tests "does X when Y". - Use the factories in tests/factories/ instead of hand-built fixtures. - Bug fixes start with a failing regression test. - Never weaken or delete an assertion to make a test pass without explaining why.
--- alwaysApply: false --- When this rule is mentioned, run the task as four gated stages: 1. Explore: read-only. Report key files, existing patterns to copy, relevant tests, risks, and up to 5 questions. Stop. 2. Plan: ordered diff-sized steps, each with a verification check; non-goals; rollback notes; acceptance criteria. Stop for approval. 3. Implement: one approved step per turn, minimal diff, run the tests afterwards. 4. Verify: run lint/typecheck/tests, check every acceptance criterion with evidence, and finish with a ship decision.
With no description and no globs, the rule is applied only when you @-mention it: “@explore-plan add CSV export to the reports page”.
Claude Code skill templates (SKILL.md)
Claude Code skills turn a prompt you keep retyping into a /command. Each skill is a folder with a SKILL.md file: YAML frontmatter (name, description, optional fields) followed by instructions. Save project skills to .claude/skills/<name>/SKILL.md and commit them so your team gets them too.
--- name: plan-first description: Explore the codebase read-only and write an implementation plan before any code changes. Use when the user asks to plan, scope, or estimate a change, or before multi-file features and risky refactors. argument-hint: "[goal]" --- # Plan first Goal: $ARGUMENTS ## 1. Explore (read-only) - Do not edit source files or run commands that change state. - Find the entry points, the modules involved, the closest existing feature to copy, and the tests that cover this area. - Note risks: auth, migrations, concurrency, generated code, feature flags. ## 2. Write the plan Create `docs/plans/<short-kebab-name>.md` (the only file you write) with: - Summary: 3 to 5 sentences, including the main alternative you rejected - Steps: each diff-sized, with files, change, and the check that proves it works - Non-goals - Risks and rollback - Acceptance criteria: testable bullets - Open questions ## 3. Stop Reply with a 5-line summary and the plan path, then wait. Do not implement anything until the user approves a specific step.
Usage: /plan-first add CSV export to the reports page. Because the description says when to use it, Claude can also load it automatically for planning requests.
--- name: ship-check description: Check whether the current branch is ready to merge by running the project checks and reviewing the diff against its acceptance criteria. Use before opening a pull request. disable-model-invocation: true argument-hint: "[base-branch]" allowed-tools: Bash(git status *) Bash(git diff *) Bash(git log *) --- # Ship check Base branch: $ARGUMENTS (use main if empty) 1. Run `git status` and `git diff <base>...HEAD --stat` to scope the change. 2. Run the project checks listed in CLAUDE.md (lint, typecheck, tests). Report each as pass/fail with the key output lines. 3. Find the acceptance criteria in the matching docs/plans/ file or the PR description. If there are none, ask for them. Mark each PASS / FAIL / UNTESTED with evidence. 4. Review the diff for bugs, edge cases, security (input validation, authorization, secrets), and performance. Rate findings high / medium / low with file:line. 5. Look for leftovers: debug logging, new TODOs, commented-out code, new behavior without tests. 6. Finish with "Ready to ship" or "Needs fixes" plus an ordered fix list. Do not change code unless the user asks.
disable-model-invocation: true means it only runs when you type /ship-check. allowed-tools pre-approves the read-only git commands for that turn; test and lint commands still go through your normal permission settings.
Documentation prompts
Two original prompts for documentation work that agents handle well when the instructions are specific.
Document [path/to/module or directory], which currently has little or no documentation. Do not change behavior. First read the code, its call sites, and its tests. Then: 1. Add doc comments in the project's existing style ([JSDoc / Google-style docstrings / rustdoc / godoc]) to every public function, class, and type: purpose, parameters, return value, errors raised, and side effects (I/O, network, global state). 2. Add inline comments only where the "why" isn't obvious: workarounds, invariants, ordering constraints, performance tricks. Don't narrate what the code plainly does. 3. Write or update [README.md in that directory]: what the module is for, how it fits into the system, a minimal usage example based on a real call site, the config or environment variables it reads, and known limitations. 4. Anything you can't determine from the code (unclear intent, possibly dead code, suspicious behavior) goes in a "Questions for maintainers" list in your reply. don't guess in the docs. Rules: no renames, reformatting, or refactors; only comments and documentation files may change. Afterwards run [lint / typecheck / docs build] to confirm nothing broke, then summarize what you documented and list the open questions.
Works in both tools. In Cursor, @-mention the folder; in Claude Code, name the path and let it find the call sites. Open in the library →
Draft release notes for [version] covering [previous tag, e.g. v1.4.0]..[HEAD or new tag]. Gather facts first (read-only): - git log [from]..[to] --no-merges --pretty=format:"%h %s%n%b" - Merged PR titles and descriptions if available, e.g. gh pr list --state merged --search "merged:>=[YYYY-MM-DD]" --limit 200 - The diff for anything that looks breaking: migrations, config, public API, CLI flags. Then write notes for [audience: end users / API consumers / internal team]: 1. Highlights: 2 to 4 user-visible changes in plain language, most important first. 2. Breaking changes: what changed, who is affected, exact upgrade steps. If none, say "None". 3. New features, Improvements, Bug fixes: one line each, phrased as the user benefit, with the PR number or short commit hash. 4. Deprecations and security fixes, if any. 5. Skip internal-only work (CI, refactors, tests, dependency bumps with no user impact) unless I ask for a full changelog. Rules: every line must trace to a commit or PR. Don't invent features or impact. Put commits you couldn't classify in a separate "Needs review" list. Output Markdown ready to paste into [CHANGELOG.md / the GitHub release]. Don't create tags, push, or publish.
Conventional-commit prefixes (feat:, fix:, BREAKING CHANGE) make the grouping more reliable, but the prompt works without them. Open in the library →
Why BestPromptFinder (not just another template list)
Most prompt sites are static lists or marketplaces. BestPromptFinder is a free prompt decision engine: describe your coding goal and it ranks prompts with quality, match, and confidence scores so you know why a prompt is recommended before you run it in Cursor or Claude Code.
Related guides & categories
FAQ
What makes a good Claude Code prompt in 2026?
Write it like a work order. Say what outcome you want, which files are in scope and which are off limits, the command that proves the change works, and where Claude should stop and wait for you. The work-order pages on this guide follow that shape for failing tests, refactors, CLAUDE.md, PR review, and adding tests.
How does this guide relate to Anthropic’s Claude Code prompt library?
Anthropic’s prompt library on code.claude.com is the official collection of short Claude Code prompts, organized by task and role. This guide is an independent companion: it adds a gated Explore → Plan → Implement → Verify workflow, Cursor-specific wording, CLAUDE.md, AGENTS.md, Cursor rules and SKILL.md templates, and detailed documentation prompts. Use the official library for quick asks and this guide for multi-step changes and repo setup.
Do these prompts work in both Cursor and Claude Code?
Yes. The workflow prompts are tool-agnostic, and the Cursor section rewords them for Ask/Plan Mode, Agent mode, and @-mentions. In Claude Code, use plan mode for Explore and Plan; in Cursor, use Ask or Plan Mode. In both, pause after Explore and after Plan before any files are edited.
Should I use CLAUDE.md, AGENTS.md, or Cursor rules?
Put shared conventions in AGENTS.md, which Cursor reads and recent Claude Code versions can also read. Keep a short CLAUDE.md that imports it with @AGENTS.md and adds Claude-specific notes, and use .cursor/rules/*.mdc only for Cursor-specific or file-scoped rules. Turn prompts you repeat into Claude Code skills (SKILL.md).
How do I find more coding prompts ranked for my goal?
Open BestPromptFinder, describe your goal (for example “refactor auth middleware with tests”), and compare quality, match, and confidence scores before you copy a prompt into your editor.
Ready to go beyond templates? Tell BestPromptFinder what you need.
Rank coding-agent prompts for my goal →