Tool · 19 prompts

Claude Code prompts you can copy and paste

Claude Code is Anthropic's coding agent. It works inside your project: it reads files, runs commands and tests, and makes changes you approve. These prompts are written for agent work: setting up a CLAUDE.md, giving a clear task brief with a "done means" list, planning before coding, fixing failing tests without cheating, and refactoring in small safe steps. Most also work in Cursor.

This page lists prompts for Claude Code's agent work (project rules, task briefs with a finish line, reviews) plus coding prompts written for Claude that Claude Code can run inside your project.

Last updated · How to prompt Claude Code ↓

All 19 prompts

Example result: Resolve a Git merge conflict safely Text & chat1 blank to fillResolve a Git merge conflict safelyClaude · ChatGPT · Claude Code Example result: Review a pull request diff before you merge Text & chat2 blanks to fillReview a pull request diff before you mergeClaude · ChatGPT · Claude Code Example result: Find dead code and safe things to delete Text & chat1 blank to fillFind dead code and safe things to deleteClaude · ChatGPT · Claude Code Example result: Write the tests first for a new feature Text & chat2 blanks to fillWrite the tests first for a new featureClaude · ChatGPT · Claude Code Example result: Write an end-to-end test for a user journey Text & chat3 blanks to fillWrite an end-to-end test for a user journeyClaude · ChatGPT · Claude Code Example result: Turn a fixed bug into a regression test Text & chat2 blanks to fillTurn a fixed bug into a regression testClaude · ChatGPT · Claude Code Example result: Turn a user story into working code Text & chat5 blanks to fillTurn a user story into working codeClaude · ChatGPT · Claude Code Example result: Understand a new codebase fast Text & chat3 blanks to fillUnderstand a new codebase fastClaude · ChatGPT · Claude Code Example result: Plan a feature before writing any code Text & chat2 blanks to fillPlan a feature before writing any codeClaude · ChatGPT · Claude Code Example result: Write a pull request description reviewers love Text & chat3 blanks to fillWrite a pull request description reviewers loveClaude · ChatGPT · Claude Code Example result: Write a CLAUDE.md file for your project Text & chat2 blanks to fillWrite a CLAUDE.md file for your projectClaude Code · Cursor Example result: Write Cursor project rules for your codebase Text & chatReady to copyWrite Cursor project rules for your codebaseClaude Code · Cursor Example result: Give an AI coding agent a clear task brief Text & chat2 blanks to fillGive an AI coding agent a clear task briefClaude Code · Cursor Example result: Let an AI agent fix failing tests properly Text & chat1 blank to fillLet an AI agent fix failing tests properlyClaude Code · Cursor Example result: Do a large refactor in small safe steps Text & chat2 blanks to fillDo a large refactor in small safe stepsClaude Code · Cursor Example result: Review code written by an AI before you trust it Text & chat2 blanks to fillReview code written by an AI before you trust itClaude · ChatGPT · Claude Code Example result: Fix a layout bug from a screenshot Text & chat1 blank to fillFix a layout bug from a screenshotClaude · ChatGPT · Claude Code Example result: Write a Dockerfile for your app Text & chat1 blank to fillWrite a Dockerfile for your appClaude · ChatGPT · Claude Code Example result: Upgrade a library to a new major version Text & chat3 blanks to fillUpgrade a library to a new major versionClaude · ChatGPT · Claude Code

How to prompt Claude Code

Claude Code is Anthropic's coding agent. It works inside your project in the terminal, IDE or browser: it reads files, runs commands and tests, and makes changes you approve.

Best for
Multi-file changes and refactors · Fixing failing tests and bugs · Exploring and explaining a new codebase · Repeatable project rules in CLAUDE.md
Prompt formula
Goal + context (files, constraints) + done means + how to check

Tips that make the biggest difference

  • Write a CLAUDE.md. Put build and test commands, code style and "never do" rules in a CLAUDE.md file at the project root. It is read at the start of each session.
  • Say what "done" means. End every task with a checklist: "Done means: tests pass, no new warnings, only files in src/auth changed."
  • Plan before big changes. Ask for a plan first and approve it before any code is written. It is cheaper to fix a plan than a large diff.
  • Ban the shortcuts. Say "do not delete, skip or weaken tests to make them pass". Agents under pressure sometimes take that route.

Weak vs strong prompt

Weak

Fix the login bug.

Strong

Users get logged out after 5 minutes instead of 24 hours. Find the cause, starting with src/auth/session.ts. Explain the cause before you change anything. Then fix it and add a test that fails before the fix. Done means: npm test passes, only auth files changed, no tests skipped.

Common mistakes

  • Huge tasks with no finish line
  • No test command, so nothing checks the change
  • Accepting a large diff without reading it

Guide checked against the current Claude Code release in .

Claude Code features these prompts use

  • CLAUDE.md. Run /init and Claude Code drafts a CLAUDE.md from your project. It is read at the start of every session, so rules there apply without repeating them.
  • Plan mode. Press Shift+Tab to switch to plan mode: Claude Code reads and plans but does not edit until you approve the plan.
  • @ file mentions. Type @ and a path to bring a file into the conversation, so the agent starts from the right place.
  • /clear and /compact. Use /clear between unrelated tasks, and /compact to shrink a long session to a summary.

If Claude Code gets it wrong

  • It changed files you did not mention. Say which folders it may touch, and put the rule in CLAUDE.md so every session follows it.
  • It says the tests pass when they do not. Give the exact test command, ask it to show the output, and ban skipping or deleting tests.
  • It forgets your rules in a long session. Lasting rules belong in CLAUDE.md, not the chat. Start new tasks with /clear.
  • It heads in the wrong direction. Press Esc to stop it, say what was wrong, and ask for a plan first next time.
FAQ

Questions, answered

Claude Code or the Claude chat for coding?

Use the chat to explain or review code you paste in. Use Claude Code when the work spans many files and needs commands or tests run.

Do these prompts work in other coding agents?

Mostly. The briefs are plain English with a goal and a finish line. Put the rules in the file your agent reads instead of CLAUDE.md, such as AGENTS.md or Cursor rules.

Will it run commands without asking?

By default Claude Code asks before it edits files or runs commands, unless you change its permission settings. Read each change before you accept it.

Need something that isn’t here?

Describe it in one line and get a Claude Code prompt built for you.

Build my prompt

Related prompts and tools