| name | github-code-review |
| version | 1.1.0 |
| description | Run a multi-agent code review on a GitHub pull request, with parallel security / performance / architecture / style passes, inline comments, and quality-gate enforcement. Use when asked to "github code review", "review github pr", "run code review on PR", "swarm review", "automated PR review", or "post inline review comments". |
| category | github |
| tags | ["code-review","github","swarm","pr-management","automation"] |
| author | Claude Code Flow |
| requires | ["github-cli","ruv-swarm","claude-flow"] |
| capabilities | ["Multi-agent code review","Automated PR management","Security and performance analysis","Swarm-based review orchestration","Inline comment generation","Quality gate enforcement"] |
GitHub Code Review
Coordinates parallel review agents (security, performance, architecture, style, accessibility) against a GitHub PR. Each agent focuses on one dimension; the swarm aggregates findings, posts inline comments, and enforces quality gates.
Contents
When to Use
- "Run a code review on PR #123"
- "Do a security review on this PR"
- "Set up automated review on every PR"
- "Generate inline review comments for the diff"
- "Add quality gates to branch protection"
Prerequisites
gh CLI installed and authenticated (gh auth status)
ruv-swarm and/or claude-flow MCP server configured
- Repository access permissions for the target PR
- For automated review:
GITHUB_TOKEN available in CI
Quick Start
PR=123
PR_DATA=$(gh pr view "$PR" --json files,additions,deletions,title,body)
PR_DIFF=$(gh pr diff "$PR")
npx ruv-swarm github review-init \
--pr "$PR" \
--pr-data "$PR_DATA" \
--diff "$PR_DIFF" \
--agents "security,performance,style,architecture,accessibility" \
--depth comprehensive
gh pr comment "$PR" --body "Multi-agent code review initiated"
Workflow
- Fetch PR context with
gh pr view --json and gh pr diff
- Pick topology based on PR size (ring < 100 LOC, mesh 100–500, hierarchical > 500) — see
references/swarm-management.md
- Dispatch agents in parallel — one per review dimension; see
references/review-agents.md
- Aggregate findings, post inline comments via the GitHub API; see
references/comments-and-gates.md
- Apply quality gates — block merge on critical security findings, warn on performance regressions, suggest on style
- Verify (see below)
Verification
After a review run, confirm:
If a gate misfires, see references/troubleshooting.md.
References
references/review-agents.md — security / performance / architecture / style agent commands and templates
references/swarm-management.md — swarm creation, label routing, topology, comment commands, webhook handler
references/configuration.md — review-swarm.yml, custom triggers, GitHub Actions, PR description template, auto-merge
references/comments-and-gates.md — inline comment generation, batch management, quality gates, metrics
references/advanced-features.md — context-aware review, learning, cross-PR analysis, custom agents
references/workflow-examples.md — five worked examples + Claude Code integration pattern
references/troubleshooting.md — agents not spawning, comments not posting, slow reviews, performance tips, webhook security caveats, security checklist
Related Skills
github-pr-manager — PR lifecycle management (open, label, merge)
github-workflow-automation — broader GitHub Actions automation
swarm-coordination — orchestration patterns shared across swarm-based skills
External Documentation
Maintained as part of the Claude Code Flow project. MIT licensed. Version 1.1.0.