Cursor CLI
Announcement: Begin with: "I'm using the cursor-cli skill for cross-AI validation with Cursor."
Use this wrapper for a one-shot Cursor review or approach validation. Read the
shared lifecycle in ../codex-cli/references/cross-ai-run.md first.
Provider adapter
Check command -v agent, agent --version, and agent --help. Verify the
binary is Cursor Agent and supports --print, --mode ask, and
--output-format json. cursor-agent may be an installation alias; do not
substitute the Cursor editor executable.
When the caller requests a particular model or an independent model family,
inspect agent models and select an exact listed slug. Otherwise omit the
model override. Cursor supports multiple providers; auto and an unreported
default do not establish model-level independence. Record the requested slug
separately from any model identity actually reported by the provider.
Resolve the loaded skill directory and run the adapter from the target
repository root with Python 3.10+:
CURSOR_SKILL_DIR="/absolute/path/to/loaded/cursor-cli"
python3 "$CURSOR_SKILL_DIR/scripts/review.py" \
--prompt-file /tmp/cursor-prompt.md \
--file path/to/file.py \
--timeout 120 \
--output-dir /tmp/cursor-review-unique
Set CURSOR_SKILL_DIR to the directory containing this loaded skill, not a
path relative to the reviewed repository. --file is repeatable and pre-reads
verified UTF-8 files into the prompt. The combined input limit is 96 KiB;
narrow larger reviews explicitly. Add --model '<exact listed slug>' only
when selected. Each invocation requires a fresh output directory.
Inspect receipt.json, stdout.json, stderr.log, version.stderr.log, and
response.txt on success. A completed JSON result requires exit 0,
type: result, subtype: success, is_error: false, and a non-empty string
result. An error envelope, timeout, malformed output, trust rejection, or
empty answer is incomplete. Also read the answer for blocked reads, omitted
scope, or other visible limitations: a valid envelope alone does not prove
the review was completed. Return the shared receipt and evidence gaps.
The adapter always uses agent -p --mode ask --output-format json. Print mode
alone can use write and shell tools; keep the explicit read-only mode. Workspace
trust is a separate prerequisite: the adapter preserves a trust rejection and
stops. It does not pass --trust, force/yolo, automatic MCP approval, or sandbox
bypass flags, retry, authenticate, update the CLI, or modify settings. Resolve
missing capabilities or trust through a separate user-authorized action.
Prompt requirements
Include the repository root, task/requirements path when task-attached, changed
files or diff scope, and concrete questions. Cursor starts without this
conversation's context. Resolve task evidence through
../setup/references/task-context.md; standalone calls do not create a task.
When not to use
- The caller did not explicitly choose Cursor
- The request needs interactive refinement
- The primary review workflow already answers the request
References
../codex-cli/references/cross-ai-run.md — shared lifecycle
reference.md — native output contract, trust boundary, and official sources
templates.md — prompt shapes; resolve placeholders before execution
1---2name: cursor-cli3description: >-4 Run Cursor CLI for one-shot cross-AI code review when a Cursor perspective is5 explicitly wanted. Invoke ONLY when the user asks ('cursor review', 'ask6 cursor', 'run cursor'), or another skill explicitly delegates to Cursor. Do7 not invoke it implicitly for a generic review. Not for interactive conversations.8allowed-tools:9 - Bash10 - Read11metadata:12 source: https://skillmd.com/skills/alexandrbasis/cursor-cli13---1415# Cursor CLI1617> **Announcement**: Begin with: "I'm using the **cursor-cli** skill for cross-AI validation with Cursor."1819Use this wrapper for a one-shot Cursor review or approach validation. Read the20shared lifecycle in `../codex-cli/references/cross-ai-run.md` first.2122## Provider adapter23241. Check `command -v agent`, `agent --version`, and `agent --help`. Verify the25 binary is Cursor Agent and supports `--print`, `--mode ask`, and26 `--output-format json`. `cursor-agent` may be an installation alias; do not27 substitute the Cursor editor executable.282. When the caller requests a particular model or an independent model family,29 inspect `agent models` and select an exact listed slug. Otherwise omit the30 model override. Cursor supports multiple providers; `auto` and an unreported31 default do not establish model-level independence. Record the requested slug32 separately from any model identity actually reported by the provider.333. Resolve the loaded skill directory and run the adapter from the target34 repository root with Python 3.10+:3536 ```bash37 CURSOR_SKILL_DIR="/absolute/path/to/loaded/cursor-cli"38 python3 "$CURSOR_SKILL_DIR/scripts/review.py" \39 --prompt-file /tmp/cursor-prompt.md \40 --file path/to/file.py \41 --timeout 120 \42 --output-dir /tmp/cursor-review-unique43 ```4445 Set `CURSOR_SKILL_DIR` to the directory containing this loaded skill, not a46 path relative to the reviewed repository. `--file` is repeatable and pre-reads47 verified UTF-8 files into the prompt. The combined input limit is 96 KiB;48 narrow larger reviews explicitly. Add `--model '<exact listed slug>'` only49 when selected. Each invocation requires a fresh output directory.504. Inspect `receipt.json`, `stdout.json`, `stderr.log`, `version.stderr.log`, and51 `response.txt` on success. A completed JSON result requires exit 0,52 `type: result`, `subtype: success`, `is_error: false`, and a non-empty string53 `result`. An error envelope, timeout, malformed output, trust rejection, or54 empty answer is incomplete. Also read the answer for blocked reads, omitted55 scope, or other visible limitations: a valid envelope alone does not prove56 the review was completed. Return the shared receipt and evidence gaps.5758The adapter always uses `agent -p --mode ask --output-format json`. Print mode59alone can use write and shell tools; keep the explicit read-only mode. Workspace60trust is a separate prerequisite: the adapter preserves a trust rejection and61stops. It does not pass `--trust`, force/yolo, automatic MCP approval, or sandbox62bypass flags, retry, authenticate, update the CLI, or modify settings. Resolve63missing capabilities or trust through a separate user-authorized action.6465## Prompt requirements6667Include the repository root, task/requirements path when task-attached, changed68files or diff scope, and concrete questions. Cursor starts without this69conversation's context. Resolve task evidence through70`../setup/references/task-context.md`; standalone calls do not create a task.7172## When not to use7374- The caller did not explicitly choose Cursor75- The request needs interactive refinement76- The primary review workflow already answers the request7778## References7980- `../codex-cli/references/cross-ai-run.md` — shared lifecycle81- `reference.md` — native output contract, trust boundary, and official sources82- `templates.md` — prompt shapes; resolve placeholders before execution