patterns/code-review/skills/code-review/SKILL.md
Use when: reviewing GitHub PR via gh CLI, scale-adaptive strategy
npx skillsauth add ryderfreeman4logos/cli-sub-agent code-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Check your initial prompt. If it contains the literal string "Use the code-review skill", then:
YOU ARE THE EXECUTOR. Follow these rules:
../../PATTERN.md relative to this SKILL.md, and follow it step by step.csa run, csa review, csa debate, or ANY csa command. You must perform the work DIRECTLY. Running any csa command causes infinite recursion.Only if you are the main agent (Claude Code / human user):
Perform AI-powered code review on GitHub PRs with automatic scale adaptation. Small PRs (< 200 lines) are reviewed directly; large PRs (> 800 lines) are delegated to CSA. Includes authorship detection to use adversarial debate for self-authored code, and mandatory AGENTS.md compliance checking for all changed files.
csa run --sa-mode true --skill code-review "Review PR #<number>"
When operating under SA mode (e.g., dispatched by /sa or any autonomous workflow),
ALL csa invocations MUST include --sa-mode true. This includes csa run,
csa review, csa debate, and any other execution commands. Omitting --sa-mode
at root depth causes a hard error; passing false when the caller is in SA mode
breaks prompt-guard propagation.
gh pr view and gh pr diff --stat to get metadata and diff statistics.csa review.csa debate instead of direct review.csa review --branch <base>. Do NOT pre-read diff.gh pr diff, analyze each file for quality, security, performance, and language-specific issues.gh pr comment only when user explicitly requests.| Command | Effect |
|---------|--------|
| /code-review 42 | Review PR #42 with auto scale detection |
| /code-review 42 post=true | Review and post comment to the PR |
| /code-review scope=base:main | Review current branch changes vs main |
csa-review (for large PRs), debate (for self-authored code arbitration)pr-bot (as part of PR review loop)gh pr comment.development
Use when running a non-blocking CSA background code health scan that uses csa health and csa tokuin estimate to propose refactoring GitHub issues for files over token or complexity thresholds.
data-ai
Recover main-agent context after `/clear`, `/compact`, or lost local thread state by using `csa recall` against recorded Claude main sessions.
tools
Use when: merged PR had HIGH/CRITICAL findings that represent a bug class — extracts reusable coding rule
tools
Use when: review found 2+ independent findings in different files, fix phase can parallelize RECON