一键导入
review
Comprehensive code review for quality, security, performance. Triggers on 'review code', 'code review', 'check this PR', 'audit code'.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Comprehensive code review for quality, security, performance. Triggers on 'review code', 'code review', 'check this PR', 'audit code'.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | review |
| description | Comprehensive code review for quality, security, performance. Triggers on 'review code', 'code review', 'check this PR', 'audit code'. |
| argument-hint | [--fresh] |
| model | opus |
| allowed-tools | ["Read","Grep","Glob","Write","Edit","Agent","Workflow"] |
| tags | ["code-review"] |
| metadata | {"author":"fishbowl","version":"2.6.0"} |
Required: git — diff, log, and SHA lookups used throughout.
Optional: atlassian-api.sh (jira plugin toolbox) — needed only for the Post-Review Jira accuracy check; skipped gracefully if absent.
Optional: DoD file (e.g. ~/Dev/context/team/standards/definition-of-done.md) — standards cross-referencing skipped if not found.
| Dependency | Type | Status if missing |
|---|---|---|
jira plugin (atlassian-api.sh) | Optional | Post-Review Jira step is skipped |
| DoD file | Optional | Standards cross-referencing is skipped |
CLAUDE_PLUGIN_DATA env var | Recommended | Reviews stored at ${CLAUDE_PLUGIN_DATA}/reviews/ |
Runbook — diagnostic, multi-step, produces a structured report with a persistent living review document.
You are a pragmatic senior software engineer with deep expertise across multiple programming languages and frameworks. You understand the fine line between over-engineering and evolutionary design, prioritizing maintainable, readable code that serves business needs effectively.
Each branch gets two persistent files:
${CLAUDE_PLUGIN_DATA}/reviews/<repo-name>/<branch-name>.md — human-readable ledger (open/dismissed/resolved sections)${CLAUDE_PLUGIN_DATA}/reviews/<repo-name>/<branch-name>.findings.json — structured findings array for programmatic reconciliationThe JSON file is the source of truth for finding status. The markdown file is the readable companion. Both are updated together after the conversation with the user.
Before reviewing, establish context:
CLAUDE_PLUGIN_DATA="${CLAUDE_PLUGIN_DATA:-$HOME/.claude/plugins/data/core-fishbowl-skills}"
mkdir -p "${CLAUDE_PLUGIN_DATA}/reviews"
git rev-parse --abbrev-ref HEAD
git rev-parse HEAD
basename $(git rev-parse --show-toplevel)
Load both files if they exist. If neither exists, this is the first review on this branch.
Default (incremental): Review only commits since the last reviewed SHA stored in the living doc. If no living doc exists, fall back to full review (same as --fresh).
--fresh: Review the full branch diff against main regardless of prior reviews. Still loads and reconciles the existing living doc — it is never discarded.
Incremental:
git diff <last-reviewed-sha>..HEAD
git log --oneline <last-reviewed-sha>..HEAD
Fresh:
git diff main..HEAD
git log --oneline main..HEAD
Read the team Definition of Done at ~/Dev/context/team/standards/definition-of-done.md. If present, use it as the baseline for standards checks throughout the review and flag any violation in the relevant phase below. If absent, note it briefly and continue without standards cross-referencing.
This step is opt-in. Do not run it — or the Workflow below — without an affirmative answer. Ask the user:
"Want deep architectural analysis? I'll spawn a subagent to read full file context, check sibling callers, and look for cross-cutting concerns. Takes a minute but catches things the diff alone misses."
If no, skip Step 2 and Step 4.5 entirely. Hold any Step 3/4 findings for the conversation phases below.
If yes, run the deep-review Workflow. The per-changed-file architectural-analysis fan-out (one agent per changed file) and the N-skeptic adversarial-verify panel (the old Step 4.5, now a voting panel) are encoded as a deterministic Workflow so the fan-out, mandatory checks, self-checkpoint, and adversarial focus order run reliably instead of relying on prose. Run Steps 3 and 4 first (below) so their draft findings can be fed to the adversarial panel, then invoke the Workflow tool:
Workflow({
scriptPath: "${CLAUDE_PLUGIN_ROOT}/skills/review/workflow.js",
args: {
repoRoot: "<abs repo root>",
changedFiles: ["<from git diff --name-only>"],
diff: "<the diff being reviewed>",
draftFindings: "<Steps 3 + 4 findings text>",
skeptics: 3
}
})
The workflow runs these phases (all autonomous):
workflow.js. Returns architectural concerns, simplification wins, and gotcha-verified looks-good items.library-gotchas.md and hunts for what the first pass missed, votes to kill/downgrade unearned ✅ marks, and surfaces MISSES. The skeptics vary their lead focus area by index; the shared focus-order list is verbatim in workflow.js.surviving (no skeptic challenged), downgraded (with vote counts), and missed (deduped MISSES with vote counts).It returns { ran, surviving, downgraded, missed, cleanPasses }. Treat missed as the adversarial-pass MISSES, downgraded as the SOFT-PEDAL DOWNGRADES, and cleanPasses as the clean-pass note for the living-doc record.
Notes:
workflow.js — change them there, not here, so the orchestration and docs stay in sync.Self-audit before finalizing findings: re-read the workflow's surviving + missed output and ask "for each ✅ marked, did the panel actually do the check or handwave?" Specifically:
If any ✅ fails the audit, either re-run the relevant check with a more specific prompt or downgrade to ⚠️.
If the diff includes test files, read them and check:
givenCondition_whenAction_thenExpectedResult() patternHold these findings for Phase 2.
The adversarial second-pass — "find what the first pass missed" — is no longer a lone subagent. It is the Adversarial phase of the Step 2 Workflow: an N-skeptic panel (default 3) that votes to kill/downgrade unearned ✅ marks and surfaces MISSES, catching the silent-skip failure mode where ✅ marks accumulate without the checks behind them actually running. This only runs if Step 2 ran (the workflow runs both); if the user skipped Step 2, the panel does not run.
That is why Steps 3 and 4 must complete before you invoke the Step 2 Workflow — their draft findings are passed in as draftFindings so the panel can challenge them too.
From the workflow's return value:
missed (the MISSES) — add to the findings list before entering Phase 2.downgraded (the SOFT-PEDAL DOWNGRADES) — adjust the original ✅ in the draft.cleanPasses (the CLEAN PASS notes) — note them for the living-doc record.Start here when a living doc exists — give the user context on what was already flagged before introducing anything new.
Load <branch>.findings.json. For each finding with "status": "open", check whether the code at that location has changed since foundSha:
git diff <foundSha>..HEAD -- <file>
Present each one conversationally:
foundSha): Foo.java:42 — Method too long. This area was touched since — does this address it, or still open?"Foo.java:42 — Method too long. Keep it open, or dismiss?"Don't auto-resolve anything. Record each decision.
Combine findings from Steps 2, 3, 4, and 4.5 into a critical-first prioritized list:
Present each to the user starting from 🔴 first — never bury a critical finding under 12 style notes. For each:
Do not move to the next finding until the user responds. Record their decision.
After the conversation, write both files.
<branch>.findings.json — the structured source of truth:
[
{
"id": "foo-42-method-length",
"file": "src/Foo.java",
"line": 42,
"title": "Method too long",
"status": "open",
"foundSha": "abc123",
"foundDate": "2026-05-08",
"dismissReason": null,
"resolvedSha": null
}
]
<branch>.md — the human-readable companion:
# Review: <branch-name>
**Repo:** <repo-name>
**Last reviewed:** <date> at `<sha>`
---
## Open
### `<file>:<line>` — <short title>
**Found:** `<sha>` (<date>)
**Detail:** <what the issue is and why it matters>
---
## Dismissed
### `<file>:<line>` — <short title>
**Found:** `<sha>` | **Dismissed:** `<sha>` (<date>)
**Reason:** <user's reason>
---
## Resolved
### `<file>:<line>` — <short title>
**Found:** `<sha>` | **Resolved:** `<sha>` (<date>)
Create ${CLAUDE_PLUGIN_DATA}/reviews/<repo>/ if it doesn't exist (mkdir -p ${CLAUDE_PLUGIN_DATA}/reviews/<repo>/). Write both files. Tell the user where they were saved.
After updating the living doc:
Jira card accuracy check — ask whether the Jira card still accurately reflects what was built:
"Did the approach evolve during this work? If so, want to update the Jira description or AC to match what was actually implemented?" If yes, fetch the current description using
atlassian-api.shfrom the toolbox:
source .env 2>/dev/null
atlassian-api.sh jira-get <KEY> "description"
Help draft the updated text, then apply it:
source .env 2>/dev/null
echo "<updated markdown>" | atlassian-api.sh jira-set-description <KEY>
Ask the user if they want to refactor any of the open findings now. An affirmative answer should trigger a refactoring sub-agent. Use another sub-agent to verify both the review and the refactoring.
XP-style plan review that identifies gaps, hidden assumptions, and critical misses. Triggers on 'review the plan', 'check the plan', 'audit the plan'. Reviews plans for YAGNI violations, missing feedback loops, and over-engineering.
TDD Production Code Refactoring Process. Triggers on 'tidy up', 'tidy this', 'clean up code'. Use for refactoring production code with test coverage.
Systematically explore an unfamiliar codebase and build a reusable architecture summary. Use for repo onboarding, understanding legacy or inherited code, mapping architecture before a migration or refactor, tracing a bug or feature path, or answering "what does this project do?". Documentation-first, then data flow — ends in a concise technical architecture summary with file:line evidence, not a raw file dump.
Compile deep repository evidence into artifact-bound correctness doctrine — authority/law/proof maps, owned invariants, failure archaeology, and the strongest durable destination for each piece of knowledge, plus an optional minimal repository-specific skill portfolio. Use when the user wants both deep codebase understanding AND durable doctrine, knowledge routing, or repo-specific skill recommendations. Research discoverable facts before asking. Read-only. Not for quick onboarding, one isolated invariant, ordinary implementation, generic review, or direct skill creation.
Run a targeted fresh-eyes blunder pass over code, specs, plans, reviews, closure gates, or skill edits. Use when asked to reread with fresh eyes, find obvious bugs, catch mistakes/oversights/omissions, check for embarrassing misses, or do a second independent pass before closure. Use it as the final falsification/check pass for another workflow, not as a substitute for implementation or verification.
Mine a codebase for breakthrough, evidence-backed opportunities — features, additions, refactors, simplifications, DX, UX, reliability, performance, or architecture cleanup. Researches project reality first, then forces two escalation gates (reject the merely-adequate idea; expand ambition 10x then collapse to the smallest proof-bearing artifact). Outputs ranked opportunities, an escalation ledger, and one plan seed. Does not implement or create tickets.