Skip to main content
Back to docs
workflowcode-review-gates
Install
Source: packages/harness-kit/src/registry/bundles/workflow/code-review-gates/README.md

Code Review Gates

Self-review checklist, PR review protocol, and review-response protocol for Claude Code. Covers all three sides of the review loop: before sending (self-review), when reviewing others, and when receiving feedback on your own diff.

What it installs

ArtifactPath (in your project)Purpose
Skill.agents/skills/code-review/Self-review checklist, Ship/Show/Ask, PR template, reviewer protocol, review-response protocol
Rule.claude/rules/git-workflow.mdAlways-loaded pointer — routes Claude to the skill before any commit or PR
Agent.claude/agents/code-reviewer.mdSubagent for isolated review of a diff/PR in a fresh context — use when the main conversation already saw the code being reviewed, or the diff is too large to load in main context

How it works

The rule loads on every Claude Code session. It tells Claude to consult the code-review skill before creating branches, committing, or opening PRs. No explicit /code-review invocation required — Claude runs it as part of the pre-commit workflow.

The skill gives Claude a structured protocol:

  1. Self-review gate — 7-point checklist run against git diff --staged before committing
  2. Ship / Show / Ask — decides the right review track for each change
  3. PR description template — what + why + how to verify
  4. Reviewer protocol — what to block on, what not to block on, comment tone conventions
  5. Review-response protocol — READ → UNDERSTAND → VERIFY → EVALUATE → RESPOND → IMPLEMENT when feedback comes back; accept / push back / defer framework; no performative agreement; one fix at a time with per-fix verification

Self-review checklist (summary)

Before every commit or PR, Claude checks:

  1. Correctness — solves the stated problem, error paths handled
  2. Tests — new behavior has a failing-then-passing test
  3. Security — input validation, no secrets in code, auth boundaries correct
  4. Design — simplest solution, no premature abstractions, functions ≤ 20 lines
  5. Naming — readable in 6 months without context
  6. Side effects — no resource leaks, no stray console.log/debugger/TODO
  7. Diff size — > 400 lines suggests splitting

Ship / Show / Ask

TrackWhenAction
ShipTypo, trivial chore, no logic changeMerge directly
ShowNew feature, accepted designOpen PR, merge immediately, notify team
AskNovel approach, breaking change, security-sensitiveOpen PR, wait for approval

Pairs well with

  • branch-strategy — branch naming and PR size conventions (also installs git-workflow.md rule)
  • git-conventional — commit message format
  • tdd — ensures tests exist before self-review gate runs