一键导入
speckit-review
Analyze a feature branch diff against baseline and project-specific review packs; optionally remediate the auto-fixable findings in severity order.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Analyze a feature branch diff against baseline and project-specific review packs; optionally remediate the auto-fixable findings in severity order.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Orchestrate iterative spec clarification and remediation (Homer loop) on spec.md until all findings are resolved.
Orchestrate iterative cross-artifact analysis and remediation (Lisa loop) on spec.md, plan.md, and tasks.md until all findings are resolved.
Orchestrate iterative code review and remediation (Marge loop) over the feature branch diff until all findings are resolved.
Orchestrate the full SpecKit pipeline (reconcile, specify, homer, phase, plan, tasks, lisa, split, ralph, marge) from feature description to reviewed implementation.
Post a PR review with inline comments for findings requiring human judgment — one-way doors, concurrency risks, architectural decisions, and project-specific patterns.
Challenge and refine a vague idea into a well-formed feature description through adversarial questioning. Produces output ready for /speckit-specify or /speckit-pipeline.
| name | speckit-review |
| description | Analyze a feature branch diff against baseline and project-specific review packs; optionally remediate the auto-fixable findings in severity order. |
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty).
This command has two modes:
$ARGUMENTS contains natural-language text like "Remediate all auto-fixable findings" (case-insensitive), analyze AND apply fixes to every finding not tagged NEEDS_HUMAN, in severity order, then exit. The invocation may also carry a known-findings exclusion list (file + rule + summary per entry, e.g. findings that reappeared after being fixed): report matching findings, but do NOT remediate them.Marge's loop agent invokes this in remediate-all mode (with exclusions from its ledger). Humans typically invoke it in report mode.
git diff $(git merge-base HEAD origin/main 2>/dev/null || git merge-base HEAD main)...HEAD. This is the feature branch's diff against its merge base with main.$ARGUMENTS contains a token matching pr:<number> or a GitHub PR URL, fetch via gh pr diff <number> instead.Capture the diff AND the list of modified files.
If $ARGUMENTS contains a spec-dir token (path matching specs/), read spec.md, plan.md, tasks.md from that directory for context only — they inform what the diff was supposed to accomplish but are not themselves reviewed.
Before running packs, read these authoritative sources (if present):
.specify/memory/constitution.md — project principles. Packs may reference it.CLAUDE.md at repo root — project guidelines.These are not rewritten; they are context the packs use to calibrate findings.
Read and follow .claude/skills/speckit-review/reference/pack-execution.md — the shared engine that discovers packs, runs them sequentially with corroborate/refute, runs script packs, and aggregates. Provide it:
SPECKIT_STAGE=review SPECKIT_REPO_ROOT="$(pwd)" SPECKIT_BASE_REF="<the merge-base ref from Step 1>". For PR scope (pr:<number> in Step 1), the diff is not local git state — substitute the literal PR number and base branch captured in Step 1 and additionally pass the changed files: SPECKIT_STAGE=review SPECKIT_REPO_ROOT="$(pwd)" SPECKIT_BASE_REF="<PR base branch>" SPECKIT_DIFF_FILES="$(gh pr diff <number> --name-only)"confidence < 70 unless $ARGUMENTS contains --strictNEEDS_HUMAN AND not matching the invocation's known-findings exclusion list (same file + rule + equivalent summary).fix one at a time, in that order. Stay inside each finding's blast radius — no opportunistic refactoring beyond the listed fixes.Print a single markdown report to stdout:
## Code Review — <branch-name> (<N> files changed, <M> findings)
### Critical (<count>)
- `<file>:<line>` — <issue>
Fix: <suggestion>
Source: <pack> · confidence <n>[ · NEEDS_HUMAN]
### High (<count>)
...
### Medium (<count>)
...
### Low (<count>) — collapsed
<N> low-severity findings hidden. Pass `--show low` to expand.
Rules:
--show low appears in $ARGUMENTS.--strict is set.In remediate-all mode, additionally print which findings were remediated (the full list, in the order applied), which findings were skipped as excluded, and which files were edited, so the calling agent (Marge) can validate.
gh pr comment / gh pr review..specify/marge/baseline/ is missing or empty, abort with a helpful error./speckit-review — Report mode, default scope (feature branch vs main)/speckit-review specs/001-feat-auth — Report mode with feature-artifact cross-reference/speckit-review pr:123 — Report mode against PR #123/speckit-review --strict — Report mode, include low-confidence findings/speckit-review --show low — Report mode, expand the Low bucket/speckit-review Remediate all auto-fixable findings in severity order without asking for confirmation — Remediate-all mode (used by the Marge loop agent)