Agent skill
github-code-review
Comprehensive GitHub code review with AI-powered swarm coordination
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/github-code-review
SKILL.md
GitHub Code Review Skill
AI-Powered Code Review: Deploy specialized review agents to perform comprehensive, intelligent code reviews that go beyond traditional static analysis.
Behavioral Classification
Type: Autonomous Execution
This skill executes code reviews automatically when invoked. When triggered:
- Swarm initializes with appropriate agents
- Reviews execute in parallel
- Results are posted to PR
- Quality gates are enforced
Quick Start
Simple Review
# Initialize review swarm for PR
gh pr view 123 --json files,diff | npx ruv-swarm github review-init --pr 123
# Post review status
gh pr comment 123 --body "🔍 Multi-agent code review initiated"
Complete Review Workflow
# Get PR context with gh CLI
PR_DATA=$(gh pr view 123 --json files,additions,deletions,title,body)
PR_DIFF=$(gh pr diff 123)
# Initialize comprehensive review
npx ruv-swarm github review-init \
--pr 123 \
--pr-data "$PR_DATA" \
--diff "$PR_DIFF" \
--agents "security,performance,style,architecture,accessibility" \
--depth comprehensive
Sub-Documentation
For detailed information, see the following files:
| Document | Contents |
|---|---|
| Agents | Security, performance, architecture, style review agents |
| Workflows | PR-based swarm management, CI/CD integration, automation |
| Quality Gates | Status checks, thresholds, metrics tracking |
| Troubleshooting | Common issues and solutions |
Quick Reference
Specialized Review Agents
| Agent | Focus | Command Flag |
|---|---|---|
| Security | Vulnerabilities, secrets, auth | --agents security |
| Performance | Complexity, queries, memory | --agents performance |
| Architecture | Patterns, coupling, SOLID | --agents architecture |
| Style | Formatting, naming, docs | --agents style |
| Accessibility | WCAG, screen readers, contrast | --agents accessibility |
PR Comment Commands
Execute from PR comments:
/swarm init mesh 6
/swarm spawn coder "Implement authentication"
/swarm spawn tester "Write unit tests"
/swarm status
/swarm review --agents security,performance
Label-Based Agent Assignment
{
"label-mapping": {
"bug": ["debugger", "tester"],
"feature": ["architect", "coder", "tester"],
"refactor": ["analyst", "coder"],
"security": ["security", "authentication", "audit"]
}
}
Topology by PR Size
| PR Size | Lines Changed | Topology |
|---|---|---|
| Small | < 100 | ring |
| Medium | 100-500 | mesh |
| Large | > 500 | hierarchical |
Quality Gate Thresholds
npx ruv-swarm github quality-gates \
--define '{
"security": {"threshold": "no-critical"},
"performance": {"regression": "<5%"},
"coverage": {"minimum": "80%"},
"architecture": {"complexity": "<10"},
"duplication": {"maximum": "5%"}
}'
Configuration
Review Configuration File
# .github/review-swarm.yml
version: 1
review:
auto-trigger: true
required-agents:
- security
- performance
- style
optional-agents:
- architecture
- accessibility
thresholds:
security: block # Block merge on security issues
performance: warn # Warn on performance issues
style: suggest # Suggest style improvements
Example Workflows
Security-Critical PR
npx ruv-swarm github review-init \
--pr 456 \
--agents "security,authentication,audit" \
--depth "maximum" \
--require-security-approval
Performance-Sensitive PR
npx ruv-swarm github review-init \
--pr 789 \
--agents "performance,database,caching" \
--benchmark \
--profile
Feature Development PR
gh pr view 456 --json body,labels,files | \
npx ruv-swarm github pr-init 456 \
--topology hierarchical \
--agents "architect,coder,tester,security" \
--auto-assign-tasks
Best Practices
Review Configuration
- Define clear review criteria upfront
- Set appropriate severity thresholds
- Configure agent specializations for your stack
Comment Quality
- Provide actionable, specific feedback
- Include code examples with suggestions
- Reference documentation and best practices
Performance Optimization
- Cache analysis results to avoid redundant work
- Use incremental reviews for large PRs
- Enable parallel agent execution
Security Checklist
- GitHub token scoped to repository only
- Webhook signatures verified
- Command injection protection enabled
- Rate limiting configured
- Audit logging enabled
- Secrets scanning active
- Branch protection rules enforced
Related Skills
github-pr-manager- Comprehensive PR lifecycle managementgithub-workflow-automation- Automate GitHub workflowsswarm-coordination- Advanced swarm orchestration
Last Updated: 2025-10-19 Version: 1.0.0 Maintainer: Claude Code Flow Team
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?