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
Resolve a Git merge conflict safelyClaude · ChatGPT · Claude Code
Review a pull request diff before you mergeClaude · ChatGPT · Claude Code
Find dead code and safe things to deleteClaude · ChatGPT · Claude Code
Write the tests first for a new featureClaude · ChatGPT · Claude Code
Write an end-to-end test for a user journeyClaude · ChatGPT · Claude Code
Turn a fixed bug into a regression testClaude · ChatGPT · Claude Code
Turn a user story into working codeClaude · ChatGPT · Claude Code
Understand a new codebase fastClaude · ChatGPT · Claude Code
Plan a feature before writing any codeClaude · ChatGPT · Claude Code
Write a pull request description reviewers loveClaude · ChatGPT · Claude Code
Write a CLAUDE.md file for your projectClaude Code · Cursor
Write Cursor project rules for your codebaseClaude Code · Cursor
Give an AI coding agent a clear task briefClaude Code · Cursor
Let an AI agent fix failing tests properlyClaude Code · Cursor
Do a large refactor in small safe stepsClaude Code · Cursor
Review code written by an AI before you trust itClaude · ChatGPT · Claude Code
Fix a layout bug from a screenshotClaude · ChatGPT · Claude Code
Write a Dockerfile for your appClaude · ChatGPT · Claude Code
Upgrade a library to a new major versionClaude · ChatGPT · Claude Code
No prompts match that search. Build your own in the builder →
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.
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.