$npx -y skills add spencermarx/open-code-review --skill github-code-reviewComprehensive GitHub code review with AI-powered swarm coordination
| 1 | # GitHub Code Review Skill |
| 2 | |
| 3 | > **AI-Powered Code Review**: Deploy specialized review agents to perform comprehensive, intelligent code reviews that go beyond traditional static analysis. |
| 4 | |
| 5 | ## 🎯 Quick Start |
| 6 | |
| 7 | ### Simple Review |
| 8 | ```bash |
| 9 | # Initialize review swarm for PR |
| 10 | gh pr view 123 --json files,diff | npx ruv-swarm github review-init --pr 123 |
| 11 | |
| 12 | # Post review status |
| 13 | gh pr comment 123 --body "🔍 Multi-agent code review initiated" |
| 14 | ``` |
| 15 | |
| 16 | ### Complete Review Workflow |
| 17 | ```bash |
| 18 | # Get PR context with gh CLI |
| 19 | PR_DATA=$(gh pr view 123 --json files,additions,deletions,title,body) |
| 20 | PR_DIFF=$(gh pr diff 123) |
| 21 | |
| 22 | # Initialize comprehensive review |
| 23 | npx ruv-swarm github review-init \ |
| 24 | --pr 123 \ |
| 25 | --pr-data "$PR_DATA" \ |
| 26 | --diff "$PR_DIFF" \ |
| 27 | --agents "security,performance,style,architecture,accessibility" \ |
| 28 | --depth comprehensive |
| 29 | ``` |
| 30 | |
| 31 | --- |
| 32 | |
| 33 | ## 📚 Table of Contents |
| 34 | |
| 35 | <details> |
| 36 | <summary><strong>Core Features</strong></summary> |
| 37 | |
| 38 | - [Multi-Agent Review System](#multi-agent-review-system) |
| 39 | - [Specialized Review Agents](#specialized-review-agents) |
| 40 | - [PR-Based Swarm Management](#pr-based-swarm-management) |
| 41 | - [Automated Workflows](#automated-workflows) |
| 42 | - [Quality Gates & Checks](#quality-gates--checks) |
| 43 | |
| 44 | </details> |
| 45 | |
| 46 | <details> |
| 47 | <summary><strong>Review Agents</strong></summary> |
| 48 | |
| 49 | - [Security Review Agent](#security-review-agent) |
| 50 | - [Performance Review Agent](#performance-review-agent) |
| 51 | - [Architecture Review Agent](#architecture-review-agent) |
| 52 | - [Style & Convention Agent](#style--convention-agent) |
| 53 | - [Accessibility Agent](#accessibility-agent) |
| 54 | |
| 55 | </details> |
| 56 | |
| 57 | <details> |
| 58 | <summary><strong>Advanced Features</strong></summary> |
| 59 | |
| 60 | - [Context-Aware Reviews](#context-aware-reviews) |
| 61 | - [Learning from History](#learning-from-history) |
| 62 | - [Cross-PR Analysis](#cross-pr-analysis) |
| 63 | - [Custom Review Agents](#custom-review-agents) |
| 64 | |
| 65 | </details> |
| 66 | |
| 67 | <details> |
| 68 | <summary><strong>Integration & Automation</strong></summary> |
| 69 | |
| 70 | - [CI/CD Integration](#cicd-integration) |
| 71 | - [Webhook Handlers](#webhook-handlers) |
| 72 | - [PR Comment Commands](#pr-comment-commands) |
| 73 | - [Automated Fixes](#automated-fixes) |
| 74 | |
| 75 | </details> |
| 76 | |
| 77 | --- |
| 78 | |
| 79 | ## 🚀 Core Features |
| 80 | |
| 81 | ### Multi-Agent Review System |
| 82 | |
| 83 | Deploy specialized AI agents for comprehensive code review: |
| 84 | |
| 85 | ```bash |
| 86 | # Initialize review swarm with GitHub CLI integration |
| 87 | PR_DATA=$(gh pr view 123 --json files,additions,deletions,title,body) |
| 88 | PR_DIFF=$(gh pr diff 123) |
| 89 | |
| 90 | # Start multi-agent review |
| 91 | npx ruv-swarm github review-init \ |
| 92 | --pr 123 \ |
| 93 | --pr-data "$PR_DATA" \ |
| 94 | --diff "$PR_DIFF" \ |
| 95 | --agents "security,performance,style,architecture,accessibility" \ |
| 96 | --depth comprehensive |
| 97 | |
| 98 | # Post initial review status |
| 99 | gh pr comment 123 --body "🔍 Multi-agent code review initiated" |
| 100 | ``` |
| 101 | |
| 102 | **Benefits:** |
| 103 | - ✅ Parallel review by specialized agents |
| 104 | - ✅ Comprehensive coverage across multiple domains |
| 105 | - ✅ Faster review cycles with coordinated analysis |
| 106 | - ✅ Consistent quality standards enforcement |
| 107 | |
| 108 | --- |
| 109 | |
| 110 | ## 🤖 Specialized Review Agents |
| 111 | |
| 112 | ### Security Review Agent |
| 113 | |
| 114 | **Focus:** Identify security vulnerabilities and suggest fixes |
| 115 | |
| 116 | ```bash |
| 117 | # Get changed files from PR |
| 118 | CHANGED_FILES=$(gh pr view 123 --json files --jq '.files[].path') |
| 119 | |
| 120 | # Run security-focused review |
| 121 | SECURITY_RESULTS=$(npx ruv-swarm github review-security \ |
| 122 | --pr 123 \ |
| 123 | --files "$CHANGED_FILES" \ |
| 124 | --check "owasp,cve,secrets,permissions" \ |
| 125 | --suggest-fixes) |
| 126 | |
| 127 | # Post findings based on severity |
| 128 | if echo "$SECURITY_RESULTS" | grep -q "critical"; then |
| 129 | # Request changes for critical issues |
| 130 | gh pr review 123 --request-changes --body "$SECURITY_RESULTS" |
| 131 | gh pr edit 123 --add-label "security-review-required" |
| 132 | else |
| 133 | # Post as comment for non-critical issues |
| 134 | gh pr comment 123 --body "$SECURITY_RESULTS" |
| 135 | fi |
| 136 | ``` |
| 137 | |
| 138 | <details> |
| 139 | <summary><strong>Security Checks Performed</strong></summary> |
| 140 | |
| 141 | ```javascript |
| 142 | { |
| 143 | "checks": [ |
| 144 | "SQL injection vulnerabilities", |
| 145 | "XSS attack vectors", |
| 146 | "Authentication bypasses", |
| 147 | "Authorization flaws", |
| 148 | "Cryptographic weaknesses", |
| 149 | "Dependency vulnerabilities", |
| 150 | "Secret exposure", |
| 151 | "CORS misconfigurations" |
| 152 | ], |
| 153 | "actions": [ |
| 154 | "Block PR on critical issues", |
| 155 | "Suggest secure alternatives", |
| 156 | "Add security test cases", |
| 157 | "Update security documentation" |
| 158 | ] |
| 159 | } |
| 160 | ``` |
| 161 | |
| 162 | </details> |
| 163 | |
| 164 | <details> |
| 165 | <summary><strong>Comment Template: Security Issue</strong></summary> |
| 166 | |
| 167 | ```markdown |
| 168 | 🔒 **Security Issue: [Type]** |
| 169 | |
| 170 | **Severity**: 🔴 Critical / 🟡 High / 🟢 Low |
| 171 | |
| 172 | **Description**: |
| 173 | [Clear explanation of the security issue] |
| 174 | |
| 175 | **Impact**: |
| 176 | [Potential consequences if not addressed] |
| 177 | |
| 178 | **Suggested Fix**: |
| 179 | ```language |
| 180 | [Code example of the fix] |
| 181 | ``` |
| 182 | |
| 183 | **Ref |