Skip to main content

github-code-review

Comprehensive GitHub code review with AI-powered swarm coordination

설치로 이동

소스 정보

저장소
ruvnet/ruflo
최근 소스 활동
2026년 5월 21일 18:11
감지된 SKILL.md 언어
영어
스타
73,010
포크
8,665

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
github-code-review
description
Comprehensive GitHub code review with AI-powered swarm coordination
# GitHub Code Review Skill > **AI-Powered Code Review**: Deploy specialized review agents to perform comprehensive, intelligent code reviews that go beyond traditional static analysis. ## 🎯 Quick Start ### Simple Review ```bash # 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 ```bash # 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 ``` --- ## 📚 Table of Contents <details> <summary><strong>Core Features</strong></summary> - [Multi-Agent Review System](#multi-agent-review-system) - [Specialized Review Agents](#specialized-review-agents) - [PR-Based Swarm Management](#pr-based-swarm-management) - [Automated Workflows](#automated-workflows) - [Quality Gates & Checks](#quality-gates--checks) </details> <details> <summary><strong>Review Agents</strong></summary> - [Security Review Agent](#security-review-agent) - [Performance Review Agent](#performance-review-agent) - [Architecture Review Agent](#architecture-review-agent) - [Style & Convention Agent](#style--convention-agent) - [Accessibility Agent](#accessibility-agent) </details> <details> <summary><strong>Advanced Features</strong></summary> - [Context-Aware Reviews](#context-aware-reviews) - [Learning from History](#learning-from-history) - [Cross-PR Analysis](#cross-pr-analysis) - [Custom Review Agents](#custom-review-agents) </details> <details> <summary><strong>Integration & Automation</strong></summary> - [CI/CD Integration](#cicd-integration) - [Webhook Handlers](#webhook-handlers) - [PR Comment Commands](#pr-comment-commands) - [Automated Fixes](#automated-fixes) </details> --- ## 🚀 Core Features ### Multi-Agent Review System Deploy specialized AI agents for comprehensive code review: ```bash # Initialize review swarm with GitHub CLI integration PR_DATA=$(gh pr view 123 --json files,additions,deletions,title,body) PR_DIFF=$(gh pr diff 123) # Start multi-agent review npx ruv-swarm github review-init \ --pr 123 \ --pr-data "$PR_DATA" \ --diff "$PR_DIFF" \ --agents "security,performance,style,architecture,accessibility" \ --depth comprehensive # Post initial review status gh pr comment 123 --body "🔍 Multi-agent code review initiated" ``` **Benefits:** - ✅ Parallel review by specialized agents - ✅ Comprehensive coverage across multiple domains - ✅ Faster review cycles with coordinated analysis - ✅ Consistent quality standards enforcement --- ## 🤖 Specialized Review Agents ### Security Review Agent **Focus:** Identify security vulnerabilities and suggest fixes ```bash # Get changed files from PR CHANGED_FILES=$(gh pr view 123 --json files --jq '.files[].path') # Run security-focused review SECURITY_RESULTS=$(npx ruv-swarm github review-security \ --pr 123 \ --files "$CHANGED_FILES" \ --check "owasp,cve,secrets,permissions" \ --suggest-fixes) # Post findings based on severity if echo "$SECURITY_RESULTS" | grep -q "critical"; then # Request changes for critical issues gh pr review 123 --request-changes --body "$SECURITY_RESULTS" gh pr edit 123 --add-label "security-review-required" else # Post as comment for non-critical issues gh pr comment 123 --body "$SECURITY_RESULTS" fi ``` <details> <summary><strong>Security Checks Performed</strong></summary> ```javascript { "checks": [ "SQL injection vulnerabilities", "XSS attack vectors", "Authentication bypasses", "Authorization flaws", "Cryptographic weaknesses", "Dependency vulnerabilities", "Secret exposure", "CORS misconfigurations" ], "actions": [ "Block PR on critical issues", "Suggest secure alternatives", "Add security test cases", "Update security documentation" ] } ``` </details> <details> <summary><strong>Comment Template: Security Issue</strong></summary> ```markdown 🔒 **Security Issue: [Type]** **Severity**: 🔴 Critical / 🟡 High / 🟢 Low **Description**: [Clear explanation of the security issue] **Impact**: [Potential consequences if not addressed] **Suggested Fix**: ```language [Code example of the fix] ``` **References**: - [OWASP Guide](link) - [Security Best Practices](link) ``` </details> --- ### Performance Review Agent **Focus:** Analyze performance impact and optimization opportunities ```bash # Run performance analysis npx ruv-swarm github review-performance \ --pr 123 \ --profile "cpu,memory,io" \ --benchmark-against main \ --suggest-optimizations ``` <details> <summary><strong>Performance Metrics Analyzed</strong></summary> ```javascript { "metrics": [ "Algorithm complexity (Big O analysis)", "Database query efficiency", "Memory allocation patterns", "Cache utilization", "Network request optimization", "Bundle size impact", "Render performance" ], "benchmarks": [ "Compare with baseline", "Load test simulations", "Memory leak detection", "Bottleneck identification" ] } ``` </details> --- ### Architecture Review Agent **Focus:** Evaluate design patterns and architectural decisions ```bash # Architecture review npx ruv-swarm github review-architecture \ --pr 123 \ --check "patterns,coupling,cohesion,solid" \ --visualize-impact \ --suggest-refactoring ``` <details> <summary><strong>Architecture Analysis</strong></summary> ```javascript { "patterns": [ "Design pattern adherence", "SOLID principles", "DRY violations", "Separation of concerns", "Dependency injection", "Layer violations", "Circular dependencies" ], "metrics": [ "Coupling metrics", "Cohesion scores", "Complexity measures", "Maintainability index" ] } ``` </details> --- ### Style & Convention Agent **Focus:** Enforce coding standards and best practices ```bash # Style enforcement with auto-fix npx ruv-swarm github review-style \ --pr 123 \ --check "formatting,naming,docs,tests" \ --auto-fix "formatting,imports,whitespace" ``` <details> <summary><strong>Style Checks</strong></summary> ```javascript { "checks": [ "Code formatting", "Naming conventions", "Documentation standards", "Comment quality", "Test coverage", "Error handling patterns", "Logging standards" ], "auto-fix": [ "Formatting issues", "Import organization", "Trailing whitespace", "Simple naming issues" ] } ``` </details> --- ## 🔄 PR-Based Swarm Management ### Create Swarm from PR ```bash # Create swarm from PR description using gh CLI gh pr view 123 --json body,title,labels,files | npx ruv-swarm swarm create-from-pr # Auto-spawn agents based on PR labels gh pr view 123 --json labels | npx ruv-swarm swarm auto-spawn # Create swarm with full PR context gh pr view 123 --json body,labels,author,assignees | \ npx ruv-swarm swarm init --from-pr-data ``` ### Label-Based Agent Assignment Map PR labels to specialized agents: ```json { "label-mapping": { "bug": ["debugger", "tester"], "feature": ["architect", "coder", "tester"], "refactor": ["analyst", "coder"], "docs": ["researcher", "writer"], "performance": ["analyst", "optimizer"], "security": ["security", "authentication", "audit"] } } ``` ### Topology Selection by PR Size ```bash # Automatic topology selection based on PR complexity # Small PR (< 100 lines): ring topology # Medium PR (100-500 lines): mesh topology # Large PR (> 500 lines): hierarchical topology npx ruv-swarm github pr-topology --pr 123 ``` --- ## 🎬 PR Comment Commands Execute swarm commands directly from PR comments: ```markdown <!-- In PR comment --> /swarm init mesh 6 /swarm spawn coder "Implement authentication" /swarm spawn tester "Write unit tests" /swarm status /swarm review --agents security,performance ``` <details> <summary><strong>Webhook Handler for Comment Commands</strong></summary> ```javascript // webhook-handler.js const { createServer } = require('http'); const { execSync } = require('child_process'); createServer((req, res) => { if (req.url === '/github-webhook') { const event = JSON.parse(body); if (event.action === 'opened' && event.pull_request) { execSync(`npx ruv-swarm github pr-init ${event.pull_request.number}`); } if (event.comment && event.comment.body.startsWith('/swarm')) { const command = event.comment.body; execSync(`npx ruv-swarm github handle-comment --pr ${event.issue.number} --command "${command}"`); } res.writeHead(200); res.end('OK'); } }).listen(3000); ``` </details> --- ## ⚙️ Review Configuration ### Configuration File ```yaml # .github/review-swarm.yml version: 1 review: auto-trigger: true required-agents: - security - performance - style optional-agents: - architecture - accessibility - i18n thresholds: security: block # Block merge on security issues performance: warn # Warn on performance issues style: suggest # Suggest style improvements rules: security: - no-eval - no-hardcoded-secrets - proper-auth-checks - validate-input performance: - no-n-plus-one - efficient-queries - proper-caching - optimize-loops architecture: - max-coupling: 5 - min-cohesion: 0.7 - follow-patterns - avoid-circular-deps ``` ### Custom Review Triggers ```javascript { "triggers": { "high-risk-files": { "paths": ["**/auth/**", "**/payment/**", "**/admin/**"], "agents": ["security", "architecture"], "depth": "comprehensive", "require-approval": true }, "performance-critical": { "paths": ["**/api/**", "**/database/**", "**/cache/**"], "agents": ["performance", "database"], "benchmarks": true, "regression-threshold": "5%" }, "ui-changes": {
GitHub에서 보기
이 SKILL.md는 매우 커서 SkillsMP가 여기에는 첫 섹션만 미리 보여줍니다. GitHub에서 보기