Tool · 5 prompts
Cursor prompts you can copy and paste
Cursor is an AI code editor with a built-in agent that can edit many files at once. These prompts help you write project rules, brief the agent with a clear goal and finish line, fix failing tests properly and refactor safely. Most also work in Claude Code.
These prompts are for Cursor's agent: rule files, tasks scoped with @ mentions, and refactors done one checked step at a time.
Last updated · How to prompt Cursor ↓
All 5 prompts
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
No prompts match that search. Build your own in the builder →
How to prompt Cursor
Cursor is an AI code editor. Its agent can plan and edit many files at once, and project rules tell it how your codebase works.
- Best for
- Editing across many files · Quick inline changes while you code · Project rules for consistent style · Refactors with a clear plan
- Prompt formula
- Goal + files to touch (@mention them) + rules + done means
Tips that make the biggest difference
- Point at the right files. Use @ to add the files or folders that matter. The agent does better with the right context than with the whole repo.
- Keep rules in the project. Save conventions (framework, naming, testing) as project rules so you do not repeat them in every prompt.
- Ask for small steps. For a refactor, ask for step 1 only, check it runs, then continue. Smaller diffs are easier to review.
- Give a finish line. End with "Done means ..." so the agent knows when to stop.
Weak vs strong prompt
Weak
Clean up this component.
Strong
Refactor @src/components/Cart.tsx: split it into CartList and CartSummary in the same folder, keep all props and behaviour the same, and follow our project rules. Do not touch other files. Done means: the app builds, existing tests pass, and Cart.tsx is under 80 lines.
Common mistakes
- No files mentioned, so it edits the wrong place
- Rules repeated in every prompt instead of saved once
- Letting it change unrelated files
Guide checked against the current Cursor release in .
Cursor features these prompts use
- Project rules. Rules live in .cursor/rules as .mdc files with a short header. A rule can apply always, only to matching files, or when the agent decides it is relevant.
- AGENTS.md. Cursor also reads an AGENTS.md file, so one set of instructions can serve Cursor and other coding agents.
- Plan Mode. Press Shift+Tab in the agent input and Cursor researches the code and writes a plan for you to approve before it edits.
- Checkpoints. Cursor saves checkpoints as the agent works, so you can roll back a change that went wrong.
If Cursor gets it wrong
- It ignores your rules. Check the rule is an .mdc file in .cursor/rules (the old .cursorrules file is deprecated) and that its type covers the files you are editing.
- It edits the wrong file. @-mention the exact files and add "do not touch other files".
- A big refactor breaks the build. Restore the last checkpoint, ask for step 1 only, and run the build before step 2.
- It loops on the same error. Stop it, paste the full error yourself, and ask it to explain the cause before it writes a fix.
Questions, answered
Cursor or Claude Code?
Cursor is an editor with an agent built in, good when you want to watch and steer edits as you code. Claude Code suits longer tasks you hand over with a finish line. The briefs on both pages work in either.
Which model should I pick in Cursor?
Cursor lets you choose among several models. The prompts here are plain English and work with any of them.
Where do I paste these prompts?
Rule prompts go into a file in .cursor/rules. Task prompts go into the agent chat.
Need something that isn’t here?
Describe it in one line and get a Cursor prompt built for you.