code-reviewer
Code Reviewer
Run code review as an isolated artifact-driven workflow. The reviewer should judge the implemented change from the task contract, diff, writer summary, tests, and relevant files, not from the writer's conversation history.
Skill Directory Layout
<installed-skill-dir>/
├── SKILL.md
├── scripts/
│ └── prepare_review_bundle.py
├── references/
│ └── isolation-protocol.md
└── templates/
├── review.md
└── fix-log.md
Core Rule
The reviewer must not inherit the writer's chat context. Use one of these patterns:
- Strong isolation: start a new Codex or Claude Code session and give it only the review bundle path.
- Cross-agent isolation: Codex writes and Claude Code reviews, or Claude Code writes and Codex reviews.
- Subagent isolation: use a fresh subagent only if it does not fork the current writer context.
The reviewer input is the bundle, not the writer conversation.
Bundle Workflow
- Create a review bundle after implementation:
python3 <installed-skill-dir>/scripts/prepare_review_bundle.py \
--repo . \
--base main \
--request "Implement <feature> with <acceptance criteria>" \
--writer-summary "Changed <files>; ran <tests>; known risks: <risks>"
- For uncommitted work, include the working tree:
python3 <installed-skill-dir>/scripts/prepare_review_bundle.py \
--repo . \
--working-tree \
--request-file .agent/code-reviews/<change-id>/request.md
- Launch a fresh reviewer with only:
Use code-reviewer.
Review the bundle at .agent/code-reviews/<change-id>/.
Do not modify production code.
Write findings to .agent/code-reviews/<change-id>/review.md.
-
The writer then reads
review.md, fixes the code, and records responses infix-log.md. -
For high-risk changes, run a second fresh review after fixes.
Reviewer Behavior
Read references/isolation-protocol.md before reviewing.
Review only the change described by the bundle:
request.md: task contract and acceptance criteriawriter-summary.md: what changed, tests run, known risksdiff.patch: stat and patchtest-output.md: test commands and outputsreviewer-prompt.md: ready-to-use fresh reviewer prompt
Focus on:
- correctness and algorithmic assumptions
- edge cases, invariants, and data shape assumptions
- tests that would fail if the implementation were wrong
- maintainability and integration risk
- mismatch between request, writer summary, diff, and tests
Do not rewrite the implementation unless the user explicitly asks for reviewer-as-fixer mode. Default reviewer output is review.md.
Findings Format
Use this severity order:
High: likely correctness bug, data corruption, invalid experiment result, security/privacy issue, or broken public APIMedium: edge-case bug, missing test for risky behavior, fragile design, or confusing integrationLow: maintainability nit, naming issue, small docs mismatch
Each finding must include:
- file and line when possible
- problem
- why it matters
- required fix
- suggested test
End with one verdict:
request changesacceptable with nitsapprove
Handoff Back To Writer
The writer should update fix-log.md with:
- each review item
- action taken
- commit or file reference
- tests rerun
- items intentionally not fixed and why
If review findings change the task scope or algorithm contract, update the project memory or design docs before continuing.
More from a-green-hand-jack/ml-research-skills
project-init
Initialize an ML research project control root. Use for paper/code/slides repos, shared memory, GitHub Project alignment, agent guidance, worktree policy, and lifecycle handoffs.
37project-sync
Sync verified code-side experiment results into paper memory. Use when logs, reports, run docs, or user-confirmed metrics should become paper-facing evidence.
36add-git-tag
Create annotated Git milestone tags. Use when completing a phase, releasing a version, or marking a research checkpoint.
36update-docs
Refresh project documentation after code changes. Use after implementing features, changing behavior, or preparing a milestone commit.
36init-latex-project
Initialize a LaTeX academic paper project. Use for new conference or journal papers needing templates, macros, venue preambles, and writing guidance.
36new-workspace
Create Git branches or worktrees for research code and paper versions. Use for experiments, baselines, rebuttal fixes, arXiv/camera-ready branches, and worktree memory.
36