/ceh-git-workflow:write-code-reviewfrom ceh-git-workflow
Load this skill when reviewing a diff before it lands, a pull request or your own unmerged branch: review order, blocking versus advisory comments, the verdict, and the saved review file. Trigger on "review this PR", "review my branch". Not for finding defects (use the built-in /code-review).
Ships in ceh-git-workflow. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Every comment must be clearly marked as blocking or advisory, and every review ends with an explicit verdict.
Claude Code's built-in /code-review and /security-review hunt for defects in a diff. Use them
for the finding. This skill adds what they do not carry: the comment prefixes, the review order,
and the verdict, so the author knows exactly what blocks the merge.
[blocking] when it changes behavior, [question] otherwise.git diff <base>...<head> > <scratch>/review.diff and dispatch
each matching agent in the background, in parallel, with the diff path, the PR's stated intent,
and both commits: ceh-python-service:python-service-reviewer for Python service code,
ceh-web-frontend:web-frontend-reviewer for frontend code. Review the rest yourself meanwhile.
When they return, merge: one comment per problem at the same path:line, at the higher
severity, and re-read every quoted line against the file before it becomes a comment. The
five-[blocking] cap applies after the merge. Smaller diffs skip this step, since the fan-out
costs more than it finds.[blocking]. To check the whole codebase against a build plan rather than one diff,
ceh-check-build-against-plan:check-build-against-plan is the fuller check.catch, a log-and-continue, a fallback default that hides a failure?any, a bare
dict or str where a domain type exists, optional where the value is always present?
Where the repo writes down no standards, the baseline is Fowler's smells: duplicated code,
long function, long parameter list, feature envy, data clumps, primitive obsession,
shotgun surgery, speculative generality, middle man.[blocking] / [advisory] / [question], anchored to
the exact line, stating the problem and (for blocking) what would resolve it. Leave at most
five [blocking] comments. With more, leave the five that matter most and say in the summary
that the PR needs rework before the rest are worth reviewing.Opt-in only, on "panel review", "review with several models", or "second opinion from another
model", because it costs several times a single review. Dispatch the same brief to two or three
background subagents in parallel, each on a different model through the Agent tool's model
parameter (for example opus and sonnet): the diff path, the PR's stated intent, and this
skill's priority order, prefixes, and quote-or-suppress rule, word for word. The brief is
identical so that a difference in findings comes from the model, not the prompt. Merge their
findings by path:line and rank by agreement: a problem every model raised comes first, then
those two raised, then single-model findings. Agreement orders the list and never changes a
severity, and a single-model finding still stands if its quoted line holds when you re-read it.
State in the summary which models sat on the panel and how many findings each raised.
Opt-in only, on "gate this PR", "two reviewers must approve", or "dual review", because every
round costs two reviews. Use it when no human will review the change before it lands. Dispatch two
background subagents in parallel on the session's own model, with the identical brief Panel mode
uses. Neither sees this session or the other's report, so one reviewer's miss is not the other's.
The verdict is Approve only when both approve. Otherwise it is Request changes with every
[blocking] finding either one raised, each re-read against the file first. After the author
fixes them (ceh-git-workflow:address-review-comments), gate again with two fresh reviewers given
the same brief plus the list of findings to confirm resolved. Stop after three rounds and hand the
findings still open to a human, with what each round changed.
| Prefix | Meaning | Author must |
|---|---|---|
[blocking] | Must be resolved before merge | Fix or discuss with reviewer |
[advisory] | Suggestion, optional improvement | Address or explicitly acknowledge |
[question] | Seeking understanding, not a change request | Answer the question |
Examples:
[blocking] This query is not parameterized — SQL injection risk on line 47.
[advisory] This helper could be extracted to a utility function for reuse.
[question] Why is this retry limit set to 3?
path:line plus the line
itself. A finding you cannot anchor to quoted code goes in the Dismissed list as unverified,
never in a line comment.[blocking] is for.[blocking]: fix it, or reply with the reasoning and reach agreement before merge.[advisory]: address it or acknowledge why you're not ("good idea, out of scope for this PR").[question]: answer in-thread; if the code was unclear enough to prompt the question, that's
often a signal to clarify the code or a comment.Resolve a thread only once it's actually addressed. Don't merge over unresolved [blocking]
threads.
| Verdict | When |
|---|---|
| Approve | No [blocking] comments. Advisory items can be left to the author's judgment. |
| Request changes | One or more [blocking] comments. Say what must change to flip to approve. |
| Comment | Questions outstanding, or not your call to approve — no verdict yet. |
| Cannot verify | Correctness rests on code, config, or data outside the diff. Name what settles it. |
When the comments are posted on a PR, the PR is the record. Otherwise (a local diff, or comments
not posted) save the summary, the line comments, and the verdict as a round of the branch's one
review file in .agents_workspace/product/review/code/, filling
assets/code-review.template.yaml per the code-review/v3 section of
references/code-review-schema.md, so the author can work through them in a later session, and
name the path in the reply. Follow the schema's Review lifecycle, and read the diff before the
review file, so earlier rounds do not anchor this one:
<YYYYMMDD-HHMMSS>-<branch>.yaml, the branch
with every / replaced by - and the time from one date +%Y%m%d-%H%M%S call. A found
code-review/v2 file is converted to v3 in place first.open finding against the current diff and set it fixed, with the resolution
found fixed in round <n>, where the code no longer has the defect.round: <n> and status: open,
skipping one that repeats an open finding and reopening one that repeats a fixed finding.After the last edit, run uv run --script ${CLAUDE_SKILL_DIR}/scripts/artifact.py render <file>.yaml,
which writes the .md beside it in the layout of assets/code-review.template.md, and fix the
YAML for each error it lists. Never edit the generated .md. On exit 2 or 3, or without uv, say
in the reply that the review went unchecked and unrendered.
End by asking the user which findings to fix, once, after the report. Fix only the chosen ones,
directly, with no fix record or plan, because the work has not landed. A request that itself asks
for the change, such as "improve the error messages", counts as the yes for the findings it names.
Commit each fix on the current branch when it is a feature branch that fits the fix, otherwise on a
new fix branch, never on the default branch. Push nothing and open no pull request unless the user
asks, because landing is the user's call. Outside a git repository, make the edits and commit
nothing. For a subject inside .agents_workspace/, make no branch and leave the commit to the
workspace's own sync. With no user present, fix nothing and report the findings.
This skill commits a fix on the PR's own branch, and ticks off the finding in the review file when there is one. Gate mode keeps its own loop.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub cheneeheng/ceh-claude-code-library --plugin ceh-git-workflow8 skills in this plugin
/address-review-commentsLoad this skill when acting on review feedback left on your change: verify each comment, fix what holds, push back with evidence on what does not, reply to every thread. Trigger on "address these review comments", "fix the review feedback", "the reviewer said"./commitLoad this skill when making a git commit or writing its message: Conventional Commits type and scope, subject line, body, and footers for breaking changes and issue references./pull-requestLoad this skill when a branch is heading into main: open a PR, "merge it", "land this", or before you run `gh pr create` or `gh pr merge` yourself. Covers the PR body, pre-merge gate, merge, and cleanup. Not for shipping a version (use ceh-git-workflow:release).