Install
openclaw skills install @hhetli/parallel-code-reviewUse when reviewing PRs, diffs, or completed work—covers both runtime bugs (resource leaks, edge cases, race conditions) and architecture concerns (design alignment, API contracts, consistency). Triggers when user says "review", "code review", "PR review", "审查", or after completing a feature. NOT for linter-only checks or quick syntax scans.
openclaw skills install @hhetli/parallel-code-reviewThree-phase review that catches orthogonal bug classes: runtime failures most reviewers miss (resource leaks, null paths, idempotency gaps) AND architecture drift terse reviews skip (interface contract violations, subclass obligations, design-plan mismatches).
After completing a feature, before merge, or on any diff. Not for linting, formatting, or type-checking—those are tool jobs.
Every review produces exactly four sections, in this order:
## Overview
[2-3 sentences: what changed, design alignment, overall quality signal]
## Issues
[One line per finding. Format: <file>:L<line>: <severity> <problem>. <fix>.
No throat-clearing, no restating what the line does.]
## Recommendations
[0-3 actionable next steps—only if non-obvious]
## Verdict
**Ready to merge?** [Yes | With fixes | No]
**Why:** [one sentence]
| Prefix | Meaning | Examples |
|---|---|---|
🔴 bug: | Broken—will cause incident | null deref, zombie state, data loss |
🟡 risk: | Works but fragile | missing guard, race window, swallowed error |
⚠️ arch: | Design/API contract violation | interface breach, subclass contract mismatch, wiring inconsistency |
🔵 nit: | Style/naming/duplicate, optional | dead code, old class name, unused import |
❓ q: | Genuine question, not a suggestion | "Why is this check inverted?" |
Default: review the current branch. When no range is specified, review all commits on the current branch that are not yet on its upstream tracking branch.
Before starting, resolve what to review:
"review origin/main..HEAD")UPSTREAM=$(git rev-parse --abbrev-ref '@{upstream}' 2>/dev/null)
if [ -n "$UPSTREAM" ]; then
BASE=$(echo "$UPSTREAM" | sed 's|/|/|') # origin/main
git diff --stat "$UPSTREAM..HEAD"
else
# No upstream — fall back to origin/main or ask user
git diff --stat origin/main..HEAD 2>/dev/null || echo "No range found, ask user"
fi
git diff --cached (staged)git diff (unstaged)Read the diff summary for the resolved range, scan key files. Form an opinion on:
Output: the Overview section. This is the ONLY place for praise or narrative summary.
MUST dispatch two subagents in parallel. Lens A and Lens B are orthogonal and share no state. Sequential execution doubles wall-clock time for no gain.
Dispatch a subagent with this focus checklist:
Output format for this subagent: one line per finding. <file>:L<line>: 🔴/🟡/🔵/❓ <problem>. <fix>.
Dispatch a subagent with this focus checklist:
Output format for this subagent: one line per finding. <file>:L<line>: ⚠️/🔵 <problem>. <fix>.
Both subagents run read-only—never mutate the working tree. Use git diff, git show, read.
After both return, deduplicate and merge into a single Issues list sorted by severity (🔴 → 🟡 → ⚠️ → 🔵 → ❓). For each finding, write ONE terse line. If a finding needs more than 3 lines to explain (security vulns, architectural disagreements), write a full paragraph then resume terse.
Merge Phase 1+2 into a forward-looking assessment. Recommendations are tactical next steps, not vague "improve X."
Every issue gets exactly one severity. If unsure between two, pick the higher.
🔴 bug is rare. Reserved for things that will break in production. Not for "this could be better."
⚠️ arch is for design contracts, not opinions. Interface contract violation = arch. "I'd use a different pattern" = not an issue.
🔵 nit can be skipped entirely if the review is already long. Prioritize 🔴 and 🟡.
Reviews only. Does not write fixes, does not approve/request-changes in GitHub, does not run linters. Does not discuss testing strategy unless there's a clear coverage gap tied to a bug.