Code Review
Use this as the parent review skill. Load focused sub-skills yourself as needed
and mention only the passes that actually ran.
Modes
until-clean: default. Review, fix actionable findings, validate, and
re-review until clean or blocked.
understand: only when the user asks to understand, orient, or choose a
reading order. Explain the diff; do not judge merge readiness unless asked.
map-only: only when the user explicitly asks for a review map.
security-only: only when the user explicitly asks for a supply-chain or
security-only review.
read-only: only when the user explicitly says not to edit. Map and review,
then stop before fixes.
Keep organization-specific review bots, merge workflows, security remediation,
and advisory writing separate unless explicitly requested.
Pass Order
Resolve the target.
Prefer a PR number/URL. Otherwise use the current branch diff, explicit
range, or commit. Record the Codex review target too:
- dirty checkout ->
codex review --uncommitted
- branch/PR ->
codex review --base origin/<base>
- immutable commit ->
codex review --commit <sha>
Load project-specific context when available.
Use repo-local docs, glossary, architecture notes, stale-doc warnings, and
safety invariants. If no durable context exists, continue with the code,
tests, and local history.
Load review-surface-map.
Map changed flows, entrypoints, contracts, side effects, state transitions,
risk surfaces, and validation targets before judging correctness.
Add optional passes only when relevant.
reviewing-pr-by-feature: large, AI-generated, or unclear diffs.
pr-rubbish-audit: broad, noisy, generated-heavy, deletion-heavy, or
suspiciously unrelated diffs.
supply-chain-security-pass: CI, workflows, dependencies, lockfiles,
scripts, permissions, secrets, generated/vendor files, or code execution.
frontend-ui-validation: rendered UI changes where screenshots or
computed styles materially affect confidence.
improve-codebase-architecture: boundary, ownership, dependency, or
refactor-shape concerns.
reducing-cognitive-load: dense, clever, stringly typed, weakly typed,
over-abstracted, or hard-to-maintain code.
monitoring-gh-actions: PRs with pending GitHub Actions checks.
Review for correctness.
Read callers, callees, tests, docs, config, and prior history as needed.
Run focused checks when they can raise confidence.
Run Codex review closeout.
Prefer scripts/codex-review from this skill. If it is unavailable, use
bare codex review with only the target flag. Do not pass inline prompts,
desired verdicts, prior rationale, or JSON-format instructions.
Run independent cold review.
Use cold-pr-review or cold-pr-review-until-clean for thoroughness,
merge readiness, bug finding, substantial PRs, or when the implementer was
close to the work. Give the reviewer only the target and a neutral checklist.
Load finding-discipline.
Keep only concrete actionable findings. Drop style nits, vague risks,
generic missing-test comments, duplicates, and weak observations.
Check context maintenance.
If the diff changes durable project context, update external context only in
until-clean and only when evidence-backed. In read-only runs, recommend
the context update instead.
Codex Review Contract
Follow these closeout rules:
- Treat Codex review output as advisory. Verify every accepted finding by
reading the real code path and adjacent files.
- Read dependency docs/source/types when a finding depends on external
behavior.
- Reject unrealistic edge cases, speculative risks, broad rewrites, and fixes
that over-complicate the codebase.
- Prefer small fixes at the right ownership boundary.
- Keep going until Codex review returns no accepted/actionable findings, unless
a safety cap, tool failure, validation blocker, human decision, or user stop
interrupts the loop.
- Never switch or override the review model. If the review hits model capacity,
retry the same command a few times with the same model.
- If rejecting a finding as intentional or not worth fixing, add an inline code
comment only when it records a real invariant or ownership decision future
reviewers need.
- Do not push just to review. Push only when the user requested publish, ship,
or PR update.
- Format before review when formatting would move line numbers materially.
- Tests and Codex review may run in parallel after the diff is stable. If either
side causes edits, rerun affected validation and Codex review.
- Do not run another Codex review just for prettier closeout wording, a second
opinion, or a clearer clean line.
Helper
Use scripts/codex-review from this skill for Codex closeout when possible.
It selects dirty/branch/commit targets, fetches branch bases, supports
--parallel-tests, and prints codex-review clean: no accepted/actionable findings reported when clean.
Recommended forms:
scripts/codex-review
scripts/codex-review --mode branch
scripts/codex-review --mode commit --commit HEAD
scripts/codex-review --parallel-tests "<focused test command>"
For PR/branch work, leave the helper in --mode auto or force
--mode branch. Do not force local mode after committing; a clean
--uncommitted review only proves there is no local patch.
Until-Clean Loop
Maintain:
iteration = 0
max_iterations = 8 unless the user requests otherwise or a local override removes it
last_reviewed_head = <current HEAD or PR head SHA>
Loop:
- Run the pass order above.
- Fix actionable
P0, P1, and P2 findings. Fix P3 only when cheap,
low-risk, or requested.
- Run relevant validation for touched surfaces.
- Re-review with Codex closeout and cold review until clean.
- Stop honestly on cap hit, unavailable tools, validation blockers, or
findings needing human/product/security judgment.
Check ~/.codex/AGENTS.override.md before enforcing the cap; local overrides
may raise or remove it.
Clean Stop Rule
Stop as clean only when:
- no actionable
P0, P1, or P2 findings remain
- relevant validation commands pass
- supply-chain and UI validation are clean when applicable
- the final diff has no unrelated rubbish or accidental generated drift
- cold review is clean for merge-readiness or until-clean confidence
- skipped checks and residual risks are explicit and non-blocking
For auth, permissions, secrets, migrations, release/publish, dependency
resolution, CI execution, or broad data flow, require two clean review passes on
the same final diff when practical.
Output
For understand, lead with Review Map, Walkthrough, Risk Surfaces, and
Validation Targets.
For until-clean, report iterations, phases run, findings fixed, validation
commands and results, context updates, final verdict, and anything left for
human judgment. When there are no findings, say so plainly and name real test
gaps or residual risk.
Source: jesse-merhi/skills — distributed by TomeVault.
1---2name: jesse-merhi-skills-code-review3description: Code Review4---56# Code Review78Use this as the parent review skill. Load focused sub-skills yourself as needed9and mention only the passes that actually ran.1011## Modes1213- `until-clean`: default. Review, fix actionable findings, validate, and14 re-review until clean or blocked.15- `understand`: only when the user asks to understand, orient, or choose a16 reading order. Explain the diff; do not judge merge readiness unless asked.17- `map-only`: only when the user explicitly asks for a review map.18- `security-only`: only when the user explicitly asks for a supply-chain or19 security-only review.20- `read-only`: only when the user explicitly says not to edit. Map and review,21 then stop before fixes.2223Keep organization-specific review bots, merge workflows, security remediation,24and advisory writing separate unless explicitly requested.2526## Pass Order27281. Resolve the target.29 Prefer a PR number/URL. Otherwise use the current branch diff, explicit30 range, or commit. Record the Codex review target too:31 - dirty checkout -> `codex review --uncommitted`32 - branch/PR -> `codex review --base origin/<base>`33 - immutable commit -> `codex review --commit <sha>`34352. Load project-specific context when available.36 Use repo-local docs, glossary, architecture notes, stale-doc warnings, and37 safety invariants. If no durable context exists, continue with the code,38 tests, and local history.39403. Load `review-surface-map`.41 Map changed flows, entrypoints, contracts, side effects, state transitions,42 risk surfaces, and validation targets before judging correctness.43444. Add optional passes only when relevant.45 - `reviewing-pr-by-feature`: large, AI-generated, or unclear diffs.46 - `pr-rubbish-audit`: broad, noisy, generated-heavy, deletion-heavy, or47 suspiciously unrelated diffs.48 - `supply-chain-security-pass`: CI, workflows, dependencies, lockfiles,49 scripts, permissions, secrets, generated/vendor files, or code execution.50 - `frontend-ui-validation`: rendered UI changes where screenshots or51 computed styles materially affect confidence.52 - `improve-codebase-architecture`: boundary, ownership, dependency, or53 refactor-shape concerns.54 - `reducing-cognitive-load`: dense, clever, stringly typed, weakly typed,55 over-abstracted, or hard-to-maintain code.56 - `monitoring-gh-actions`: PRs with pending GitHub Actions checks.57585. Review for correctness.59 Read callers, callees, tests, docs, config, and prior history as needed.60 Run focused checks when they can raise confidence.61626. Run Codex review closeout.63 Prefer `scripts/codex-review` from this skill. If it is unavailable, use64 bare `codex review` with only the target flag. Do not pass inline prompts,65 desired verdicts, prior rationale, or JSON-format instructions.66677. Run independent cold review.68 Use `cold-pr-review` or `cold-pr-review-until-clean` for thoroughness,69 merge readiness, bug finding, substantial PRs, or when the implementer was70 close to the work. Give the reviewer only the target and a neutral checklist.71728. Load `finding-discipline`.73 Keep only concrete actionable findings. Drop style nits, vague risks,74 generic missing-test comments, duplicates, and weak observations.75769. Check context maintenance.77 If the diff changes durable project context, update external context only in78 `until-clean` and only when evidence-backed. In read-only runs, recommend79 the context update instead.8081## Codex Review Contract8283Follow these closeout rules:8485- Treat Codex review output as advisory. Verify every accepted finding by86 reading the real code path and adjacent files.87- Read dependency docs/source/types when a finding depends on external88 behavior.89- Reject unrealistic edge cases, speculative risks, broad rewrites, and fixes90 that over-complicate the codebase.91- Prefer small fixes at the right ownership boundary.92- Keep going until Codex review returns no accepted/actionable findings, unless93 a safety cap, tool failure, validation blocker, human decision, or user stop94 interrupts the loop.95- Never switch or override the review model. If the review hits model capacity,96 retry the same command a few times with the same model.97- If rejecting a finding as intentional or not worth fixing, add an inline code98 comment only when it records a real invariant or ownership decision future99 reviewers need.100- Do not push just to review. Push only when the user requested publish, ship,101 or PR update.102- Format before review when formatting would move line numbers materially.103- Tests and Codex review may run in parallel after the diff is stable. If either104 side causes edits, rerun affected validation and Codex review.105- Do not run another Codex review just for prettier closeout wording, a second106 opinion, or a clearer clean line.107108## Helper109110Use `scripts/codex-review` from this skill for Codex closeout when possible.111It selects dirty/branch/commit targets, fetches branch bases, supports112`--parallel-tests`, and prints `codex-review clean: no accepted/actionable113findings reported` when clean.114115Recommended forms:116117```sh118scripts/codex-review119scripts/codex-review --mode branch120scripts/codex-review --mode commit --commit HEAD121scripts/codex-review --parallel-tests "<focused test command>"122```123124For PR/branch work, leave the helper in `--mode auto` or force125`--mode branch`. Do not force local mode after committing; a clean126`--uncommitted` review only proves there is no local patch.127128## Until-Clean Loop129130Maintain:131132```text133iteration = 0134max_iterations = 8 unless the user requests otherwise or a local override removes it135last_reviewed_head = <current HEAD or PR head SHA>136```137138Loop:1391401. Run the pass order above.1412. Fix actionable `P0`, `P1`, and `P2` findings. Fix `P3` only when cheap,142 low-risk, or requested.1433. Run relevant validation for touched surfaces.1444. Re-review with Codex closeout and cold review until clean.1455. Stop honestly on cap hit, unavailable tools, validation blockers, or146 findings needing human/product/security judgment.147148Check `~/.codex/AGENTS.override.md` before enforcing the cap; local overrides149may raise or remove it.150151## Clean Stop Rule152153Stop as clean only when:154155- no actionable `P0`, `P1`, or `P2` findings remain156- relevant validation commands pass157- supply-chain and UI validation are clean when applicable158- the final diff has no unrelated rubbish or accidental generated drift159- cold review is clean for merge-readiness or until-clean confidence160- skipped checks and residual risks are explicit and non-blocking161162For auth, permissions, secrets, migrations, release/publish, dependency163resolution, CI execution, or broad data flow, require two clean review passes on164the same final diff when practical.165166## Output167168For `understand`, lead with `Review Map`, `Walkthrough`, `Risk Surfaces`, and169`Validation Targets`.170171For `until-clean`, report iterations, phases run, findings fixed, validation172commands and results, context updates, final verdict, and anything left for173human judgment. When there are no findings, say so plainly and name real test174gaps or residual risk.175176---177> Source: [jesse-merhi/skills](https://github.com/jesse-merhi/skills) — distributed by [TomeVault](https://tomevault.io).178<!-- tomevault:4.0:skill_md:2026-05-22 -->