quality-gate
This skill contains shell command directives (!`command`) that may execute system commands. Review carefully before installing.
Pre-computed context
Current branch: !git branch --show-current 2>/dev/null || echo "unknown"
Working tree status: !git status --porcelain 2>/dev/null | head -20 || echo "unavailable"
Open PRs (match headRefName to current branch above; baseRefName is the PR's real base): !gh pr list --json number,title,headRefName,baseRefName --limit 10 2>/dev/null || echo "unknown"
Purpose
Review is the quality checkpoint between "code works" and "code is ready." This skill structures that step so changes are inspected for consistency, correctness, and alignment with the project's conventions before verification or PR creation. Self-review catches errors tests miss — inconsistencies, loose ends, convention drift, design shortcuts. Delegated reviews (code, architecture, security) bring specialized scrutiny the implementer's tunnel vision would miss.
Depth, not breadth. This skill picks ONE lens per invocation. For a multi-surface fan-out that runs many reviewers at once and ranks their combined findings, use this plugin's fanout skill instead.
Shared inputs
- Review diff base — when an open PR exists for the branch, its
baseRefNameis the base: dispatched reviewers diffgit merge-base origin/<baseRefName> HEAD. The pre-computed PR list above is capped; when the current branch is absent from it, rungh pr list --head <current-branch> --json number,baseRefNamebefore concluding no PR exists. Otherwisegit merge-base origin/HEAD HEAD(falling back to the remote's resolved default branch viagit ls-remote --symref, thenorigin/main, thenHEAD) so committed-clean branches still show their changes; untracked files come fromgit ls-files --others --exclude-standard. - Severity vocabulary — the project's own review docs when present; else
${CLAUDE_PLUGIN_ROOT}/context/severity.md. - Criteria resolution — review criteria resolve through the standards index per the plugin binding
${CLAUDE_PLUGIN_ROOT}/reference/standards-contract.md(its "Resolution ladder" section owns the procedure), detailed in context/criteria.md. - Findings location — resolve through the plugin binding (
${CLAUDE_PLUGIN_ROOT}/reference/topic-docs.md): the.claude/topic-docs.yamlconcern file'smemory_dirfirst (<memory_dir>/reviews/<branch-slug>/); else a review-artifacts location declared in the project'sCLAUDE.md/ rules (use it, and offer to persist it into the concern file — prose is an inference source, not the runtime authority); else the default.work/reviews/<branch-slug>/. Durable findings are<UTC-timestamp>-<mode>.mdin that directory, where<branch-slug>is the branch name lowercased with/and other non-[a-z0-9._-]characters replaced by-, and<UTC-timestamp>isdate -u +%Y%m%dT%H%M%SZ(ISO-basic UTC, colon-free, Windows-safe). Self-ignore guard: the session's first memory-tier write verifies the resolved memory root contains a.gitignorewith*, creating it (announced) when absent. Write repo-relative paths only — never absolute machine paths.