一键导入
review
Code review — bugs, vulnerabilities, antipatterns.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Code review — bugs, vulnerabilities, antipatterns.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Query/store cross-project knowledge in Shared Brain.
Save session snapshot — handoff + CLAUDE.md update.
Create a standardized git commit.
Debug a bug — reproduce, isolate root cause, fix.
End session — handoff + decisions + CLAUDE.md.
Time-boxed SENAR investigation before a task.
| name | review |
| description | Code review — bugs, vulnerabilities, antipatterns. |
| context | fork |
| effort | slow |
Zero-tolerance review. Find every bug, vulnerability, antipattern, and performance issue.
You are a hostile reviewer. Assume the code is broken until proven otherwise.
Before reviewing, load role and project context:
Check active task (if any):
.tausik/tausik task list --status active
If active → .tausik/tausik task show {slug} → extract role, stack, acceptance criteria.
Load role profile: Read harness/roles/{role}.md — follow the role's /review modifiers.
Load stack guide: Read harness/stacks/{stack}.md — use the stack's review checklist.
Load project conventions and dead ends:
.tausik/tausik memory search "convention"
.tausik/tausik memory search "gotcha"
.tausik/tausik memory list --type dead_end
$ARGUMENTS = file path — review that file$ARGUMENTS = directory — review all source files in it$ARGUMENTS = "diff" or empty — git diff HEAD~1 (last commit)$ARGUMENTS = "staged" — git diff --cached$ARGUMENTS contains "iterate" — enable Iterative Mode (see below). Combine with scope: /review iterate, /review src/ iterate$ARGUMENTS contains "lite" — enable Lite Mode (single tausik-reviewer sub-agent, structured JSON output, no 6-agent fork). See Lite Mode below. Combine with scope: /review lite, /review src/ liteRead every file in scope. Do NOT skim. Check CLAUDE.md for project rules.
Launch 6 specialized review agents in parallel via the Agent tool. Each agent receives the diff/files in scope, project context (CLAUDE.md, conventions, dead ends), and task info (goal, AC) if available.
Subagent model (phase=code-review): run the 5 domain reviewers on Sonnet 4.6 (
model="sonnet"in the Agent call) — code review is a Sonnet-tier job. The critic's adversarial synthesis benefits from a stronger reasoner — Opus 4.8 (or Fable 5). Omittingmodel=is fine (the subagent inherits the session model); this is a cost/quality hint, not a hard requirement. Mapping:docs/ru/research/model-routing-matrix.md.
Agent prompt template:
Read the agent instructions from
harness/skills/review/agents/{agent}.md. Review the following files: {files_in_scope}. Task goal: {goal}. Acceptance criteria: {AC}. Stack: {stack}. Role: {role}. Project conventions: {conventions}. Dead ends: {dead_ends}. Return findings in the agent's output format.
Launch all 6 agents in a single message with parallel Agent tool calls:
| Agent | File | Focus |
|---|---|---|
| quality | harness/skills/review/agents/quality.md | Bugs, security, race conditions + SENAR 28-item checklist |
| implementation | harness/skills/review/agents/implementation.md | Goal achievement, AC coverage, wiring |
| testing | harness/skills/review/agents/testing.md | Test quality, coverage, fake test detection |
| simplification | harness/skills/review/agents/simplification.md | Over-engineering, unnecessary complexity |
| documentation | harness/skills/review/agents/documentation.md | Missing docs, changelog, CLAUDE.md |
| critic | harness/skills/review/agents/critic.md | Adversarial: find 3 weaknesses the others miss (hidden failure modes, silent contract drift, assumption gaps) |
Apply stack-specific review checklist from the stack guide — include it in the quality agent prompt.
After all agents return:
python scripts/gate_runner.py review --files {files_in_scope}
.tausik/tausik task log {slug} "Gates: {summary}"Merge all confirmed findings into the standard Output Format (see below).
The /review skill runs 6 adversarial agents — this is an L3 review (external/adversarial reviewer, separate context from the implementer). Record it so ADR (Adversarial Defect Rate) can be tracked across the project.
.tausik/tausik review record \
--task {slug} \
--type L3 \
--critical {N_critical} \
--warnings {N_high_plus_medium} \
--notes "{1-line summary or commit/PR url}"
Notes:
--type L1 = author self-review, L2 = peer (same context), L3 = adversarial/external (this skill).tausik metrics once any L3 reviews exist.--task <related-slug> if reviewing arbitrary code (still surfaces in tausik review list).If the Agent tool is unavailable or agents fail, fall back to a single-pass review covering all 5 domains yourself. Use the severity categories:
CRITICAL — Null access, race conditions, injection, auth bypass, data loss HIGH — Missing validation, error swallowing, hardcoded secrets, N+1 MEDIUM — God functions, duplication, magic numbers, over-engineering LOW — Misleading names, dead code, missing docs
## Review: {scope}
Role: {role} | Stack: {stack}
Verdict: {FAIL|PASS WITH ISSUES|PASS}
Issues: {N} (Critical: {C}, High: {H}, Medium: {M}, Low: {L})
### Critical
**[C1] {Title}** — `{file}:{line}`
{problematic code}
Problem: {why this breaks}
Fix: {fixed code}
### High / Medium / Low ...
### SENAR Checks
- Scope creep: {clean / flagged items}
- Dead end violations: {none / repeated dead ends}
- AC coverage: {all met / gaps found}
### Summary
{1-2 sentences: overall assessment}
{Top 3 things to fix before merge}
Suggest next: If issues found: "Fix issues and re-run /review." If clean: "Run /ship to test, close task, and commit."
Key principle: The implementer and reviewer should be different instances.
The parallel review agents (step 3) inherently provide separate context — each agent runs in its own fresh context with only the diff and project context. This satisfies the "separate context" requirement by default.
$ARGUMENTS contains "separate" or "independent" — launch one extra holistic review agent in addition to the 5 specialized onesThe critic agent is launched as one of the 6 parallel reviewers on every /review run — adversarial review is default, not an opt-in mode. The critic's job is explicitly to find 3 weaknesses the other 5 agents miss (see harness/skills/review/agents/critic.md for its hunting grounds).
When $ARGUMENTS contains "adversarial" or "deep", run two critic passes sequentially, feeding the first critic's findings into the second so it hunts for what even the first critic missed. Stop if the second pass finds only LOW severity.
When $ARGUMENTS contains "lite", skip the 6-agent fork and invoke the single Claude-native sub-agent tausik-reviewer instead. Trade adversarial breadth for token cost: one consolidated review per file, structured JSON output, main context stays clean.
/reviewSkip Lite for security-sensitive code (auth, payments, crypto), >5-file diffs, or anything you would otherwise route through Adversarial deep mode — those still want the 6-agent breadth + critic.
/review).Agent(
subagent_type="tausik-reviewer",
prompt="Review files: {scope}. Task goal: {goal}. AC: {AC}. Stack: {stack}. Role: {role}. Conventions: {conventions}. Dead ends: {dead_ends}.",
)
harness/skills/review/agents/quality.md + docs/en/security.md + docs/en/security-checklist.md from disk at runtime, applies them, returns one JSON object: {scope, critical[], high[], medium[], low[], meta}.--type L3 if the sub-agent reports its independence (it runs in a separate context — same SENAR semantics as the parallel-6 flow).If tausik-reviewer sub-agent is missing (.claude/agents/tausik-reviewer.md absent — bootstrap may not have copied it on legacy installs), fall back to standard 6-agent flow and emit a one-line warning.
When $ARGUMENTS contains "iterate", run a review→fix→verify loop instead of a single pass.
.tausik/tausik task log {slug} "Review iteration {N}: {fixed_count} issues fixed"| Condition | Action |
|---|---|
| 0 CRITICAL+HIGH issues | Stop. Emit final report with MEDIUM/LOW as advisories |
| 5 iterations reached | Stop. Emit warning + remaining issues list |
| Same issues persist across 2 iterations | Stop. Flag as "stalemate — manual intervention needed" |
Each iteration produces a compact summary (not the full report):
### Iteration {N}
Fixed: {list of fixed issues}
Remaining: {C} critical, {H} high, {M} medium, {L} low
Status: {continuing | done | limit reached | stalemate}
The final report after the loop uses the standard Output Format with an added iteration summary header:
## Review: {scope} (iterative, {N} iterations)
...standard format...
### Iteration History
- Iteration 1: found {X} issues, fixed {Y}
- Iteration 2: found {X} issues, fixed {Y}
- ...
If no active task exists, iterative mode still works but logs a warning: "No active task — iteration progress will not be logged to task history."
/review iterate to fix and verify all issues in a loop.".tausik/tausik task log {slug} "Review: {verdict}, {N} issues".tausik/tausik dead-end "approach" "reason"--defect-of: .tausik/tausik task add "Fix: description" --defect-of parent-slug --role developergit diff HEAD~1 shows nothing if nothing is committed — check git status first.