Cursor

Verified against Cursor · 2026-07-29

Run a major dependency upgrade through Cursor's Agent mode in triage-migrate-verify stages

A staged upgrade brief that requires triage of every affected API usage against a stated breaking-changes list before any file changes, so the blast radius gets reviewed as a plan rather than discovered after the fact spread across dozens of already-applied edits.

Cursor 2.26 fillable variables

The prompt

Ready to copy — highlighted parts are example details you can swap.

Upgrade react-router-dom from 6.22.0 to 7.1.0 across this codebase. Do this in three explicit stages and stop between each for confirmation before continuing to the next — do not collapse these into one pass even if the changes look small.

STAGE 1 — TRIAGE
Search the codebase for every usage of react-router-dom's APIs. Cross-reference against these known breaking changes and report which usages are affected, and which are not, before changing anything:
useNavigate's replace option moved into a NavigateOptions object; <Switch> was removed in favor of nested <Routes>; loader/action data APIs changed shape.

STAGE 2 — MIGRATE
Only after triage is confirmed: update the dependency version and migrate each affected usage found in Stage 1. Do not touch files that only import the package without using an affected API, even if you notice something you'd personally write differently while you're in there.

STAGE 3 — VERIFY
Run the build, typecheck, and test suite: npm run build, npm run typecheck, npm test -- --run. If anything fails that Stage 1 did not predict, stop and report it as a gap in the triage rather than silently patching around it — a failure the triage missed is information about what the breaking-changes list was missing, not just a bug to fix and move past.

ROLLBACK PLAN IF STAGE 3 FAILS BADLY
Revert the dependency version bump and all Stage 2 file changes via git, leave a note in the PR describing what failed, and stop rather than attempting a partial upgrade.

Do not upgrade any other dependency as a side effect, even a peer dependency the package manager suggests bumping, without naming it and asking first.

Customize

Optional — swap in your own details for the highlighted parts above.

Why this works

An unscoped "upgrade this package" request in Agent mode tends to bump the version number and then start editing whatever breaks at typecheck time, which quietly conflates two very different categories of change: code the migration guide says must change, and code that merely needs a type assertion or a cast to compile without actually being correct against the new API's real behavior. Forcing a triage-then-confirm gate before any file is touched means the blast radius gets reviewed while it's still a list of usages with a stated affected/not-affected verdict, not after it's already a diff applied across dozens of files under the pressure of "the build is currently broken, let's just fix it" — a pressure that reliably produces the second category of change, the compiles-but-wrong kind, because fixing a type error is a different and easier task than correctly implementing a changed API contract. Treating a Stage 3 failure the triage didn't predict as a reportable gap, rather than something to patch around silently, catches breaking changes that weren't in BREAKING_CHANGES_NOTES in the first place — a real and common risk, since migration-guide breaking-changes lists are routinely incomplete for edge-case APIs or interactions between two changed features, and an agent whose only instruction is "make the error go away" will hide exactly the case you most needed to know about by patching it invisibly during Stage 2 review. VERIFICATION_COMMANDS stated explicitly, rather than "run the tests," matters because a vague verification instruction lets the model choose the scope of what counts as passing — running only the affected test files instead of the full suite, for instance — which quietly narrows what "verified" means without anyone deciding that on purpose.

What you get back

STAGE 1 — TRIAGE Found 14 usages of react-router-dom across 9 files. - 3 usages of useNavigate with a { replace: true } second argument — AFFECTED (API shape changed). - 1 usage of <Switch> in src/App.tsx — AFFECTED (removed in v7, needs <Routes>). - 10 usages of <Link>/<Route> with no changed props — NOT AFFECTED. Awaiting confirmation before Stage 2.

Verified against

Cursor 2.2 · 2026-07-29

Changelog

  • 2026-07-29 Initial publish, verified against Cursor 2.2 Agent mode on a react-router-dom v6-to-v7 upgrade.

Need this built into your business?

If a prompt isn't enough — custom software, built and maintained for you — that's Scult's day job.

EXPLORE CUSTOM SOFTWARE
Brief Cursor's Agent mode to build a multi-file feature without wandering into untouched filesA Composer/Agent-mode brief that names the files in scope, the data contract between them, the codebase's existing conventions, and what to leave alone, plus a forced pre-edit plan, so an autonomous multi-file build stays inside the feature you actually asked for instead of expanding into whatever the semantic index surfaces as related.Cursor 2.22026-08-05Force Cmd+K to change only the highlighted lines, not the whole block around themA Cmd+K inline-edit instruction that states the transformation, an explicit byte-identical preserve list, and a fallback rule for when the transformation can't be done cleanly, tuned for the selection-scoped inline editor rather than a whole-file Agent pass.Cursor 2.22026-07-22Point Cursor BugBot at the actual risk in a PR instead of a generic pass over the diffA PR description written for BugBot, Cursor's automated PR-review agent, that states risk areas and known trade-offs up front and defines exactly how findings must be classified and cited, so its comment thread concentrates on real logic and security risk instead of restating the diff or re-litigating a deliberate choice.Cursor BugBotCursor 2.22026-07-30Write a Background Agent brief that survives running with nobody watchingA self-contained task brief for Cursor's Background Agents — the async, remote-run agent mode — with success criteria, a conservative-default policy for ambiguity, and a reviewable-PR requirement, since no one answers follow-up questions while it works in an isolated container.Cursor Background AgentsCursor 2.22026-08-02
All Cursor prompts

Check your AI visibility

One URL in, a 0–100 score and the exact fixes out.

RUN THE CHECK

Browse all the tools

15 tools across six categories
13 of them never send your data anywhere

Free · No signup · No trial clock

SEE THE DIRECTORY