Cursor代码审查
cursor-review
运行 Cursor Composer 审查作为建议性的第二意见,同时将主要审查结论保留在主机主控(host brain)手中。当用户调用 cursor:review、要求 Cursor 审查,或希望 composer 对 diff 进行健全性检查时使用。Cursor 绝不拥有 APPROVE/REQUEST_CHANGES 权限。
- License 许可
- MIT
- 最近更新
- 2026-11-11
- Stars
- ★ 3.2k
- Forks
- 306
01 前言 Front Matter
- name
- cursor-review
- description
- Run a Cursor Composer review as an advisory second opinion while keeping the primary review verdict on the host brain. Use when user invokes cursor:review, asks Cursor to review, or wants composer to sanity-check a diff. Cursor never owns APPROVE/REQUEST_CHANGES.
03 SKILL.md 正文
cursor:review - Advisory Cursor Review
Cursor Composer (composer-2.5-fast) を read-only second opinion として使う review skill。primary verdict は host brain (Opus / Claude role) が出す。
Quick Reference
cursor:review --base origin/main
cursor:review "Phase 88.5 command namespace diff"
Rules
-
Cursor review is advisory. The final verdict must come from the host reviewer.
-
Do not pass
--writetocursor-companion.sh. -
Use resolver/model routing, not direct env checks:
bash scripts/resolve-impl-backend.sh --backend cursor --role reviewer bash scripts/model-routing.sh --host cursor --role worker --field model -
Prefer the existing
harness-reviewcontract when a full review is requested. This command exists for users who explicitly ask for the Cursor lane.
Flow
-
Resolve the Harness helper root:
HARNESS_PLUGIN_ROOT="${HARNESS_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}" if [ -z "$HARNESS_PLUGIN_ROOT" ] && [ -n "${CLAUDE_SKILL_DIR:-}" ]; then probe="$(cd "${CLAUDE_SKILL_DIR}" && pwd)" while [ "$probe" != "/" ] && [ ! -d "$probe/scripts" ]; do probe="$(cd "$probe/.." && pwd)" done [ -d "$probe/scripts" ] && HARNESS_PLUGIN_ROOT="$probe" fi if [ -z "$HARNESS_PLUGIN_ROOT" ]; then echo "ERROR: HARNESS_PLUGIN_ROOT is not set and could not be derived from CLAUDE_PLUGIN_ROOT or CLAUDE_SKILL_DIR" >&2 exit 2 fi -
Determine review scope:
BASE_REF="${TASK_BASE_REF:-origin/main}" REVIEW_SCOPE="${ARGUMENTS:-}" if [ -n "${REVIEW_SCOPE}" ]; then set -- ${REVIEW_SCOPE} while [ "$#" -gt 0 ]; do case "$1" in --base) BASE_REF="${2:?--base requires a ref}" shift 2 ;; --base=*) BASE_REF="${1#--base=}" shift ;; *) shift ;; esac done fi DIFF_STAT="$(git diff --stat "${BASE_REF}..HEAD")" DIFF_TEXT="$(git diff "${BASE_REF}..HEAD")" -
Ask Cursor in read-only mode:
PROMPT="$(cat <<EOF
Review this diff as an advisory second opinion. Base ref: ${BASE_REF} Requested scope: ${ARGUMENTS:-full diff} Requirement, purpose and DoD: <original request and completion criteria> Spec and validation evidence: <relevant paths and observed results>
Focus on bugs, regressions, missing tests, and unsafe assumptions. Do not propose broad refactors. Use the supplied requirement, DoD, spec and validation evidence to assess the requested scope; inspect missing context read-only. For each finding, state its location, trigger, impact and checkable evidence. Separate hypotheses from observed defects; do not invent findings to fill a quota. Return an assessment only. Do not implement changes or treat the implementation worker's self-report as verification.
Diff stat: ${DIFF_STAT}
Diff: ${DIFF_TEXT} EOF )" bash "${HARNESS_PLUGIN_ROOT}/scripts/cursor-companion.sh" task "${PROMPT}"
4. Host reads Cursor's output and performs the primary review:
- Findings first, ordered by severity.
- Mark Cursor-originated points as advisory when used.
- `APPROVE` / `REQUEST_CHANGES` must be the host decision, not a copied Cursor verdict.
## Output
Use the standard review shape:
- findings
- open questions
- validation run
- final host verdict
04 同仓库更多 Skills
技能退出与切换
escape-skill
暂无简介
空内容审查与复核
zz-review-empty
暂无简介
跨会话消息通知与交接
session-send
当用户要求通知其他会话、请求会话交接、说'告诉其他智能体',或需要跨会话传递消息时使用此技能。
记忆与 SSOT 管理
memory
管理 SSOT(单一事实来源)、记忆及跨工具记忆搜索。负责维护 decisions.md 和 patterns.md。当用户提到 memory、SSOT、decisions.md、patterns.md、合并、迁移、SSOT 提升、同步记忆、保存经验、记忆搜索、harness-mem、过往决策或记录此事时使用。请勿在以下场景加载:实现工作、评审、临时笔记或会话内日志记录。
文件清理与归档
maintenance
文件清理与归档。整理臃肿的 Plans.md、session-log.md、旧日志和状态文件。触发词:/maintenance、cleanup、archive、organize、split session-log。请勿在以下场景加载:实现、评审、发布、新功能开发。
日文写作规则提案起草
japanese-writing-drafter
检测操作员是否在对话中途纠正了智能体的日文措辞(重写句子、指出风格问题、说'这个措辞不好,改成 X 这样'),并将一条待定写作规则提案起草到 ~/.claude/writing-lint/proposals.jsonl 中,供人工后续审阅。本技能是 proposals.jsonl 的唯一写入者——它从不编辑 rules.jsonl,也从不将 status 设置为 pending 以外的任何值。将规则提升到 rules.jsonl 仅通过人工运行 scripts/writing-rule-approve.sh 完成。当用户提到 writing-rule proposal、表現を直して、文体を直して、その言い方はNG、writing lint 提案、指摘をルール化して时使用。不要为以下场景加载:批准或拒绝提案(使用 scripts/writing-rule-approve.sh)、列出资定提案(使用 scripts/writing-rule-list.sh)、或依据现有词典扫描文本(由 writinglint 引擎 / PostToolUse hook 完成)。