ワンクリックで
review-code
Adaptive code review orchestrator — classifies diff and invokes structural, security, QA, test, and CodeRabbit sub-skills
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Adaptive code review orchestrator — classifies diff and invokes structural, security, QA, test, and CodeRabbit sub-skills
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Config-driven visible plan-to-PR workflow for Workbench engineering work. Use for agent-flow, full lifecycle, visible agents, Helix-style implementation, cross-repo context, HTML plans, PR breakdowns, small or stacked PRs, reviewer packets, review from packet, Claude/Codex pairing, worktrees, Jira/PR handoffs, continuation handoffs, or approved bypass of detailed PR slicing.
Freeform ideation and structured shortlisting. Generates 8-10 approaches including wild cards, then converges on 2-4 viable options with tradeoffs. Use before /forge or standalone for any creative exploration.
Read Outlook Web calendar via Chrome and extract meeting data for capacity planning. Writes to context/active/calendar.md so other skills use real numbers.
Show remaining capacity today and this week by reading daily and weekly plans. Flags overcommitment. Use when checking if there's room for more work.
Read and critically summarize a Confluence document. Surfaces key decisions, gaps, open questions, and suggests review questions.
Create a release branch and managed _release worktree in a Workbench repo using canonical Python worktree tooling. Use when the user wants to cut a release, create a release branch, start a release process, preview the next release branch name, or keep release work out of main/develop.
| name | review-code |
| description | Adaptive code review orchestrator — classifies diff and invokes structural, security, QA, test, and CodeRabbit sub-skills |
| metadata | {"workbench.argument-hint":"[--quick] [--security-only] [--no-security] [--qa-only] [--no-qa] [--no-cr] [--cr-rules <file>] [--cr-only]"} |
Path resolution: This skill may run from any repo. All
context/andconfig.yamlpaths are relative to the workbench root, not the current working directory. Read~/.codex/workbench-rootor~/.claude/workbench-rootto get the absolute workbench path, then prepend it to allcontext/andconfig.yamlreferences. See PATHS.md.
One command, comprehensive review. Reads the diff, classifies the change, and invokes the right combination of review sub-skills automatically.
| Temptation | Reality |
|---|---|
| "This is a simple change, no review needed" | Simple changes cause the most insidious bugs — they skip scrutiny |
| "I wrote this code, I know it's correct" | Author blindness is the #1 source of missed bugs |
| "It's just a refactor, nothing changed" | Refactors are where subtle behavioral changes hide |
| "Tests are passing, so it's fine" | Tests verify what you thought to test, not what you didn't |
| "This is urgent, no time for review" | Urgent code that ships broken creates more urgency |
| "The diff is too large for meaningful review" | Large diffs need MORE review, not less — break it down |
Always use AskUserQuestion when you need user input — classification overrides, which findings to address, whether to re-run after fixes. Never guess at the user's intent. Present clear options with context.
/review-code # Adaptive — classifies diff, runs sub-skills + CodeRabbit
/review-code --quick # Structural review only (quick mode) — for trivial changes
/review-code --security-only # Security scan only
/review-code --no-security # Skip security scan
/review-code --qa-only # QA check only
/review-code --no-qa # Skip QA check and test suggestions
/review-code --no-cr # Skip CodeRabbit (faster, offline-friendly)
/review-code --cr-rules file.md # CodeRabbit with custom instruction file (-c flag)
/review-code --cr-only # CodeRabbit review only (skip all local sub-skills)
This orchestrator invokes these standalone skills based on classification:
| Sub-Skill | Posture | What It Does |
|---|---|---|
/structural-review | Staff Engineer | Architecture, patterns, DRY, edge cases, error handling |
/security-scan | Security Engineer | OWASP Top 10, secrets detection, dependency risks |
/qa-check | QA Lead | Diff-aware test gap analysis, regression risk |
/test-suggest | TDD Coach | Framework-aware test skeletons, red-green-refactor |
| CodeRabbit CLI | External AI | Cloud-based review via cr — broad pattern detection, cross-file analysis |
Each sub-skill can also be invoked directly for standalone use.
CodeRabbit provides cloud-based AI code review via the cr CLI. It complements local sub-skills by catching patterns they miss (cross-file impact, API misuse, broader ecosystem issues).
Trade-offs:
cr auth login) and a git repo with diffsDefault behavior: CodeRabbit runs automatically on every review. Use --no-cr to skip (e.g., offline, quick iteration, rate limit conservation).
Determine what to review:
git diff main...HEAD (all changes since branching)git diff --cachedgit diffRun git diff --stat to get file count and line count for the summary.
If the user passed flags, skip classification and route directly:
--quick → invoke /structural-review --quick only--security-only → invoke /security-scan only--qa-only → invoke /qa-check only--no-security → exclude /security-scan from whatever classification produces--no-qa → exclude /qa-check and /test-suggest from whatever classification produces--no-cr → skip CodeRabbit CLI (faster, offline-friendly)--cr-rules <file> → pass <file> to CodeRabbit's -c flag for custom instructions--cr-only → run CodeRabbit CLI only, skip all local sub-skillsIf flags are set, skip to Step 4.
Analyze the diff to determine what kind of review is needed.
Trivial — Quick structural check only:
Security-sensitive — Full structural + deep security + QA:
auth*, login*, session*, middleware*, api/*, routes/*, *password*, *token*, *secret*, *.env*, *permission*, *role*, *crypto*, *certificate*password, secret, token, api_key, credentials, Authorization, cookie, session, encrypt, decrypt, hash, salt, csrf, cors, permission, role, adminNew feature — Full pass including test suggestions:
Standard — Structural + QA (everything else):
Based on classification (or flags), invoke the appropriate sub-skills:
| Classification | Sub-Skills Invoked |
|---|---|
| Trivial | /structural-review --quick + CodeRabbit |
| Standard | /structural-review + /qa-check + CodeRabbit |
| Security-sensitive | /structural-review + /security-scan + /qa-check + CodeRabbit |
| New feature | /structural-review + /security-scan + /qa-check + /test-suggest + CodeRabbit |
CodeRabbit runs by default for all classifications. Use --no-cr to skip it.
If --cr-only is set, skip all local sub-skills and only run CodeRabbit.
Run each sub-skill's full process. Collect all outputs.
--no-cr is set)Prerequisites: Verify CodeRabbit is available and authenticated:
cr auth status
If not authenticated, tell the user to run cr auth login and stop.
Launch CodeRabbit in background (it takes 7-30 min) while local sub-skills run in parallel:
Determine the base branch (same logic as Step 1):
--base main (or whatever the main branch is)--type uncommitted or --type committedBuild the command:
# Standard — token-efficient output for agent consumption
cr --prompt-only --base main
# With custom rules file
cr --prompt-only --base main -c <rules-file>
# For uncommitted changes only
cr --prompt-only --type uncommitted
Run via Bash with run_in_background: true and a 10-minute timeout. Continue with local sub-skills while waiting.
When CodeRabbit completes, parse the output:
===== blocksRate limit awareness: Free tier allows 3 reviews/hour, pro allows 8/hour. If you get a rate limit error, inform the user and skip CodeRabbit — do not retry.
If CodeRabbit times out or fails: Include a note in the report that CodeRabbit was requested but did not complete. Do not block the rest of the review.
Combine all sub-skill outputs into a unified report:
If saving or handing the review to another engineer/agent, read context/standards/html-plan-standard.md and create code-review.html as the primary artifact with severity filters, source/diff anchors, and validation/test gaps. Use the Markdown structure below for inline chat output or PR comment paste format only.
## /review-code Results
**Classification**: [Trivial | Standard | Security-sensitive | New feature]
**Diff**: X files changed, +Y/-Z lines
**Flags**: [any overrides applied, or "none — adaptive classification"]
**Sub-skills invoked**: [list]
---
### Structural Review
[Full output from /structural-review]
---
### Security Scan
[Full output from /security-scan — only if invoked]
---
### Test Coverage & QA
[Full output from /qa-check — only if invoked]
---
### Test Suggestions
[Full output from /test-suggest — only if invoked]
---
### CodeRabbit Review
[Parsed findings from `cr --prompt-only` — included by default, absent only if `--no-cr` was set]
For each CodeRabbit finding, format as:
- **[severity]** `file:line` — suggestion text
If CodeRabbit timed out or hit rate limits, note:
> CodeRabbit was requested but [timed out | hit rate limit]. Local sub-skill results are complete.
Deduplicate: if CodeRabbit flags the same issue as a local sub-skill, note it as "also flagged by CodeRabbit" in the local finding rather than listing it twice.
---
### Overall Summary
| Category | Critical | High/Important | Medium/Suggestion | Low |
|---|---|---|---|---|
| Structural | N | N | N | — |
| Security | N | N | N | N |
| Test gaps | — | N | N | N |
| CodeRabbit | N | N | N | N |
**Top action items**:
1. [Most critical finding with location]
2. [Second most critical finding]
3. [Third most critical finding]
> Address critical and high findings before creating your PR.
Only include sections for sub-skills that were invoked. If a sub-skill found no issues, include it with a clean result — an empty section is a positive signal.