Skip to main content
</>

Code Review

Deep, systematic code analysis with actionable feedback.

Engineeringv1.2.0Stable
$agy skill install code-review

Independent pre-commit verification gate that validates working changes against authorized intent and ensures zero scope drift.

What this skill does

Decide whether the current candidate faithfully satisfies the authorized intent and is safe to commit. This is a review gate, not an implementation pass. Do not edit source files, fix findings, commit, stash, or discard changes. Return a bounded correction prompt instead.

Prevents agents from silently altering user intent, committing unverified assumptions, overlooking regressions, or treating passing unit tests as proof that scope didn't drift. Eliminates conflation of implementation and review.

When to reach for it

  • After implementation is complete and before committing or opening a pull request.
  • When evaluating staged or worktree diffs against an active Change Intent Contract (.agent-toolkit/intents/INT-*.md).
  • When an independent pre-commit gate is required before merging code into a mainline branch.
Note: Code Review is strictly a review gate, not an implementation pass. It never commits, stashes, or edits source files directly.

How it works

Code Review follows a simple, structured process to pressure-test your thinking and help you reach a clearer decision.

1

Select Intent Being Reviewed

Prefer a project-local Change Intent Contract (.agent-toolkit/intents/INT-*.md). Authority order: explicit user correction, ready contract, task criteria, original request, repository evidence.

Check INT-*.mdValidate ready contractIdentify acceptance IDs
2

Establish Acceptance Contract

Preserve stable acceptance IDs and scope boundaries (outcome, acceptance criteria, must preserve, constraints, approval boundaries, out of scope).

Bind AC-* IDsEnforce boundariesReject scope creep
3

Establish Complete Candidate

Bind review to intent identity and candidate boundary (intent ID + revision, HEAD commit, candidate boundary, changed-path snapshot). Inspect staged and untracked state for omitted work.

git status --shortgit diff --cachedgit diff --stat
4

Classify Every Changed Path

Assign each change exactly one disposition: REQUIRED, SUPPORTING, BENIGN_EXTRA, MATERIAL_EXTRA, UNRELATED, or UNCLEAR.

Categorize diffsIsolate unrelated editsFlag material extras
5

Verify Acceptance Coverage

Evaluate every acceptance criterion independently: PASS, PARTIAL, FAIL, UNKNOWN, or WITHDRAWN based on concrete evidence.

Check criterion evidenceVerify Must-Preserve invariants
6

Review Implementation Risk

Review dimensions relevant to candidate (security, auth, data integrity, migrations). Load references/review-risk.md where needed.

Check security & authInspect error pathsDetect regressions
7

Validate Final Candidate

Run the smallest relevant checks that can prove requested behavior, then widen. Never report checks as passed without running against the current candidate.

Execute repository checksVerify clean test output
8

Make Commit Decision

Issue one of four outcomes: PASS (safe to commit), NEEDS_CONFIRMATION (material extra), FIX (blocking issues), or BLOCKED (insufficient state).

Generate decisionFormat output contractProvide correction prompt if FIX

Output Contract & Decision Format

Valid States:PASSNEEDS_CONFIRMATIONFIXBLOCKED
Status: PASS | NEEDS_CONFIRMATION | FIX | BLOCKED Intent: <intent ID> Candidate: <HEAD SHA> Acceptance coverage: <AC-ID: PASS/FAIL> Change disposition: REQUIRED/SUPPORTING/EXTRA Findings: <severity + path + required action> Validation: <checks run> Commit decision: <summary> Correction prompt: <only if FIX>

What's included

The skill comes with a ready-to-use prompt, guidance, and supporting resources.

SKILL.md
The main skill definition, usage guide, and examples.
References
Links to relevant concepts and deeper reading (1 local files: review-risk.md).
Dependencies
None. Runs with a standard assistant.
Workflows
Included in the "implementation-review-loop" workflow (optional).
Evaluation scenarios
12 formal test scenarios in evals/code-review/cases.yaml to validate quality and consistency.

Common questions

No. Code Review is strictly a review gate, not an implementation pass. It never commits, stashes, or edits code. It returns a structured review report and bounded correction prompt.

Install this skill

Add Code Review to your assistant and start using it in your workflow.

View source on GitHub
Target: .agent-toolkit/skills/code-review/SKILL.md
Uses the deterministic standard-library installer with SHA-256 hash tracking.
$python scripts/install.py apply --skill code-review
Distribution Unavailable — GitHub Release Pendingcommit: 0e4dc4c

Pre-packaged ZIP archives are published when a tagged GitHub release is created on the public repository. Zero simulated or fabricated binary downloads are served.