BoilerPrompt

Cursor Prompts vs Claude Code Prompts: Why the Same Prompt Fails in Different Tools

By Sidhant Sinha on

Run the same prompt through Cursor's Agent mode and through Claude Code and you will often get noticeably different results, even when both are backed by the same model. The first time it happens it looks like a model quality problem. It almost never is. It is an interface problem. The two tools see your repo differently, take context differently, and show their work differently, so a prompt written for one carries assumptions the other cannot satisfy.

Most prompt collections ignore this and hand you one mega-prompt for every tool, which is backwards. The task stays the same. The phrasing has to change. To make that concrete, here is one task, adding JWT authentication to an Express API, written twice: once as a Cursor Agent prompt and once as a Claude Code prompt. Same requirements, same acceptance criteria, different almost everything else.

Two interfaces, two mental models

Cursor Agent mode lives in your editor. It has your file tree, your open tabs, and an index of the codebase, and it applies changes as diffs you review and accept in place. Its natural unit of work is the edit, and its natural feedback loop is you reading a diff.

Claude Code lives in your terminal. It works the way you would over SSH: it greps, reads files, installs packages, runs the test suite, and reads the output. Its natural unit of work is the command, and its natural feedback loop is exit codes and test results. It can check its own work without you clicking anything.

Both are agentic tools, so both reward the same shape of prompt: short and direct, roughly 60 to 160 words, concrete constraints, and an explicit verification step at the end. What changes between them is how you point at code and what kind of verification you can actually ask for.

One task, two prompts

The repo is the same in both cases: an Express and TypeScript API, routes under src/routes, a users table behind src/lib/db.ts, passwords already bcrypt-hashed by the existing registration flow.

The Cursor Agent version

Add JWT auth to this Express API.

Context: @src/routes/users.ts @src/lib/db.ts @src/middleware

Requirements:
- POST /auth/login: verify email and password against the users
  table with bcrypt, return an HS256 JWT (jsonwebtoken, 15 min
  expiry) in the response body
- requireAuth middleware in src/middleware/auth.ts: verify the
  Bearer token, attach the decoded payload as req.user, respond
  401 on anything invalid
- Apply requireAuth to every route in @src/routes/users.ts
- Secret from process.env.JWT_SECRET, throw at startup if missing

Only new dependency: jsonwebtoken. Do not touch the registration
flow.

Add tests in src/middleware/auth.test.ts covering valid token,
expired token, and missing header. When you finish, list every
file you changed so I can review the diffs.

The Claude Code version

Add JWT auth to the Express API in this repo.

First read src/routes/users.ts and src/lib/db.ts to match the
existing patterns. Then:

1. npm install jsonwebtoken @types/jsonwebtoken
2. POST /auth/login: check email and password against the users
   table with bcrypt, return an HS256 JWT with 15 min expiry.
   Secret from process.env.JWT_SECRET, throw at startup if missing.
3. requireAuth middleware in src/middleware/auth.ts: verify the
   Bearer token, set req.user, 401 on anything invalid. Apply it
   to every route in src/routes/users.ts.
4. Tests in src/middleware/auth.test.ts: valid token, expired
   token, missing header.

Do not touch the registration flow. Run npm test and
npx tsc --noEmit, fix failures until both pass, then paste the
test summary and list the changed files.

Both fit the 60 to 160 word window. Both name exact files, pin the algorithm and expiry, fence off the registration flow, and end with an acceptance check. Everything else diverges, and each divergence maps to a real difference in how the tools work.

Difference 1: editor context vs shell access

Cursor already has a picture of your codebase before you type a word. Its index knows roughly where things live. So the Cursor prompt does not tell the agent to go read anything. Its job is to scope attention: attach the three places that matter and state the requirements. You would install jsonwebtoken yourself, or approve the terminal command Cursor proposes, but installing dependencies is not the center of its loop.

Claude Code starts with a shell prompt and no view of anything. It builds its picture by running commands, which is why the Claude Code version opens with "first read these two files" and why "npm install jsonwebtoken" is literally step one of the plan. Those lines would be dead weight in Cursor. In Claude Code they are the difference between an agent that matches your existing db access patterns and one that invents its own.

Shell access also changes what "done" can mean. Claude Code can run the test suite, read the failures, fix them, and run it again, unprompted, in a loop, before it ever reports back. An editor agent's native loop ends at proposed edits. That single fact drives most of the phrasing differences that follow.

Difference 2: @ mentions vs file paths

In Cursor, @src/routes/users.ts is not decoration. The @ mention is a UI action that pins the actual file contents into the model's context before generation starts. It is the single highest-leverage thing in a Cursor prompt: you are curating exactly what the agent sees. Skip the mentions and you are trusting the index to guess which of your 400 files matter, and it will sometimes guess a stale or lookalike file.

In the Claude Code prompt, the same locations appear as plain paths in prose. They are not attachments, they are pointers. Claude Code dereferences them itself by reading the files off disk, and if a path is slightly wrong it will ls and grep its way to the right one. That makes paths in a terminal prompt more forgiving but also lazier by default: the agent reads what it decides it needs, when it decides it needs it. Naming the files up front, with an explicit "read these first," is how you keep it from writing the login route before it has looked at your db layer.

Same information, opposite mechanics. Cursor mentions push context in. Claude Code paths tell the agent where to go pull context from.

Difference 3: diff review vs command output

Look at the last lines of each prompt. The Cursor version ends with "list every file you changed so I can review the diffs." The Claude Code version ends with "run npm test and npx tsc --noEmit, fix failures until both pass, then paste the test summary."

That is the deepest difference between the two tools. In Cursor, you are the verifier. The deliverable is a set of diffs you will read, and the prompt should make that review easy: enumerate the changed files, keep the change surface small, forbid drive-by edits. Asking Cursor to "make sure all tests pass" is closer to a wish than an instruction, because passing tests is not something its edit-and-review loop demonstrates to you on its own.

In Claude Code, the machine is the first verifier and you audit the transcript. "Fix failures until both pass" is a concrete, executable instruction: the agent will actually cycle on the suite and show you the output. Your review shifts from reading every hunk to checking that the tests it wrote are honest and the summary matches the diff. This is also why we insist on verification steps in every prompt on BoilerPrompt: a prompt that ends at "write the code" produces confident output with no evidence, in either tool.

When to reach for which

Use Cursor when you want to supervise the work edit by edit: changes in code you know well, refactors where taste matters, UI work you want to eyeball, anything where reading the diff is faster than writing the code. The tight review loop is the feature.

Use Claude Code when done is machine-checkable: make the suite pass, migrate every call site, upgrade a dependency and fix the fallout, wire up auth like the example above. If the task involves installing things, running things, and iterating on failures, a terminal agent runs that loop natively instead of asking you to drive it.

If you use both, the skill worth building is writing the tool-native version of a task rather than pasting one prompt everywhere. The same logic extends further: GitHub Copilot Edits is file-scoped inside VS Code and wants even tighter targeting, and Windsurf sits somewhere between Cursor's editor loop and a terminal agent's autonomy. Different interface, different prompt, every time.

Both example prompts above are patterns you can lift directly. For more of them, tested and dated, browse the Cursor prompt library and the Claude Code hub, where each prompt ships tool-native with its own customizer.