You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(review): add /cursor:review — read-only diff review by a Cursor model
Adds a code-review command modelled on openai/codex-plugin-cc's
/codex:review, adapted to the Cursor CLI. The plugin collects the git
diff itself (working tree, or a branch vs --base <ref>), embeds it in a
strict review-only prompt, runs cursor-agent over it, and returns the
findings (Blocking / Should-fix / Nits + verdict) verbatim.
- Targets: auto (dirty tree → working-tree, clean → branch vs default),
plus --scope auto|working-tree|branch and --base <ref>.
- --adversarial challenges the design, not only implementation defects.
- Tracked as a normal job: /cursor:status, /cursor:result, /cursor:cancel
all apply; supports --background/--wait, --model, --timeout, focus text.
- Read-only guarantee: a post-flight check marks the job failed if the run
touches the working tree, so a review can never silently become an edit.
- New collectReviewContext helpers in scripts/lib/git.mjs; tests + fixtures.
Docs: README "What you get" + Usage subsection, reworked the old
"no review command" section into "A second opinion", CHANGELOG entry.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
4
4
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
5
5
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
7
+
## Unreleased
8
+
9
+
### Added
10
+
11
+
-**`/cursor:review`** — read-only code review of your git diff by a Cursor model, modelled on `openai/codex-plugin-cc`'s `/codex:review`. The plugin collects the diff itself (working tree, or branch vs a `--base <ref>`), embeds it in a strict review-only prompt, runs `cursor-agent` over it, and returns the findings (Blocking / Should-fix / Nits + verdict) verbatim. Supports `--scope auto|working-tree|branch`, `--adversarial` (challenge the design), `--model`, `--background`/`--wait`, `--timeout`, and free-form focus text. Tracked as a normal job, so `/cursor:status`, `/cursor:result`, and `/cursor:cancel` apply. A post-flight check marks the job `failed` if the run touches the working tree, so a review can never silently become an edit. New `collectReviewContext` helpers in `scripts/lib/git.mjs`.
Copy file name to clipboardExpand all lines: README.md
+35-3Lines changed: 35 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -117,10 +117,11 @@ What lives where after a run:
117
117
118
118
## What you get
119
119
120
-
Nine slash commands under the `cursor:` namespace:
120
+
Ten slash commands under the `cursor:` namespace:
121
121
122
122
-**`/cursor:delegate`** — hand a coding task to Cursor, foreground or background.
123
123
-**`/cursor:from-plan`** — turn a Claude Code plan (from plan mode) into a `tasks/<file>.md` and hand it off to Cursor.
124
+
-**`/cursor:review`** — read-only code review of your git diff by a Cursor model. Reports findings; never edits files.
124
125
-**`/cursor:browser`** — verify a URL / flow in a real browser via Cursor's `chrome-devtools` MCP.
125
126
-**`/cursor:status`** — list recent jobs or inspect a specific one.
126
127
-**`/cursor:result`** — print the final output of a finished job.
@@ -141,9 +142,11 @@ Cursor CLI has its own plan mode and it is fine, but execution is where Cursor r
141
142
142
143
So: Claude plans, Cursor writes, Claude reviews, repeat. Glued together by seven slash commands and one subagent.
143
144
144
-
## Why not just`/codex:review`-style?
145
+
## A second opinion:`/cursor:review`
145
146
146
-
This plugin is built around delegating _execution_ — writing code — to Cursor's Composer 2 for speed. Claude Code stays the orchestrator, planner, and reviewer. There is intentionally **no**`/cursor:review` or `/cursor:adversarial-review` command: Cursor is the "doer" here, not the critic. If you want review, ask Claude to review Cursor's diff in the usual way.
147
+
The core loop stays **Claude plans, Cursor writes, Claude reviews** — that is where Claude Code earns its keep. But sometimes you want a _second_ reviewer on the same diff: a different model with a fresh perspective, or a deeper pass from `gpt`/`opus`/`gemini` while Claude keeps its context for orchestration. That is what `/cursor:review` is for.
148
+
149
+
It is modelled on [`openai/codex-plugin-cc`](https://github.com/openai/codex-plugin-cc)'s `/codex:review`, adapted to the Cursor CLI: the plugin collects the git diff itself (working tree or branch vs a base), hands it to a Cursor model with a strict **review-only** prompt, and returns the findings verbatim. It never edits your files — a post-flight check fails the job if the run touches the working tree, so a review can't quietly turn into an edit. See [`/cursor:review`](#cursorreview-flags-focus) under Usage for flags and examples.
147
150
148
151
## Usage
149
152
@@ -196,6 +199,35 @@ Examples:
196
199
197
200
This is the closest thing to "plan in Claude, execute in Cursor" in one session: Claude does the thinking, Cursor does the typing, and the task file is a durable contract between the two.
198
201
202
+
### `/cursor:review [flags] [focus...]`
203
+
204
+
Read-only code review of your git diff by a Cursor model. The plugin collects the diff itself, embeds it in a strict review-only prompt, runs `cursor-agent` over it, and prints the findings verbatim — grouped Blocking / Should-fix / Nits with a one-line verdict. It does **not** edit files; if the run touches the working tree anyway, a post-flight check marks the job `failed` and flags it. Tracked as a normal job, so `/cursor:status`, `/cursor:result` and `/cursor:cancel` all work on it.
205
+
206
+
By default it picks the target automatically: a dirty working tree is reviewed as-is; a clean tree falls back to a branch diff against the detected default branch. Any trailing text is passed as a reviewer **focus**.
|`--base <ref>`| auto | Review the branch diff `<ref>...HEAD` (merge-base) instead of the working tree. |
211
+
|`--scope auto\|working-tree\|branch`|`auto`| Force the target. `working-tree` = uncommitted changes; `branch` = vs the detected default branch. |
212
+
|`--adversarial`| off | Challenge the design and assumptions, not just implementation defects. |
213
+
|`--model <id>`|`auto`| Same aliases as `/cursor:delegate`. Use `gpt`/`opus`/`gemini` for a deeper review. |
214
+
|`--background`| off | Detach; returns a job id immediately. Read it later with `/cursor:result`. |
215
+
|`--wait`| on | Block until the review finishes (default unless `--background`). |
216
+
|`--timeout <sec>`|`1800`| Kill the review if it exceeds this. |
217
+
|`--no-git-check`| off | Allow running outside a git repo (rarely useful — there is no diff to review). |
218
+
219
+
Examples:
220
+
221
+
```
222
+
/cursor:review # review the current working-tree diff
223
+
/cursor:review --base main # review this branch vs main
224
+
/cursor:review --scope branch --model gpt # branch diff, deeper model
225
+
/cursor:review --adversarial "is the retry/backoff design sound under load?"
226
+
/cursor:review --background --model opus # detach; /cursor:result when ready
227
+
```
228
+
229
+
This is a **second opinion**, not a replacement for Claude reviewing the diff in-session. Reach for it when you want a different model's eyes on the change, or to offload a large review while Claude keeps orchestrating.
230
+
199
231
### `/cursor:browser <url> <what to verify...>`
200
232
201
233
Verify a page or a flow in a **real browser** via Cursor's `chrome-devtools` MCP. This is read-only by design — Cursor navigates, interacts, checks console/network and reports back; it will not modify your source files.
Render the tool output to the user verbatim — it is a code review, do not paraphrase or summarise it, and do not act on the findings yourself. If the job ran in the foreground, present the **Review** section as-is. If it was started in the background, show the returned job id and the `/cursor:status` / `/cursor:result` hints. This command is review-only: never apply the fixes it suggests unless the user explicitly asks in a follow-up.
0 commit comments