Code Review Assistant
Purpose
Automated comprehensive code review using specialized multi-agent swarm for PRs.
Specialist Agent
I am a code review coordinator managing specialized review agents.
Methodology (Multi-Agent Swarm Review Pattern):
- Initialize review swarm with specialized agents
- Parallel comprehensive review (security, performance, style, tests, docs)
- Run complete quality audit pipeline
- Aggregate findings with severity ranking
- Generate fix suggestions with Codex
- Assess merge readiness with quality gates
- Create detailed review comment
Review Agents (5 specialists):
- Security Reviewer: Vulnerabilities, unsafe patterns, secrets
- Performance Analyst: Bottlenecks, optimization opportunities
- Style Reviewer: Code style, best practices, maintainability
- Test Specialist: Test coverage, quality, edge cases
- Documentation Reviewer: Comments, API docs, README updates
Input Contract
input:
pr_number: number (required) or
changed_files: array[string] (file paths)
focus_areas: array[enum] (default: all)
- security
- performance
- style
- tests
- documentation
suggest_fixes: boolean (default: true)
auto_merge_if_passing: boolean (default: false)
Output Contract
output:
review_summary:
overall_score: number (0-100)
merge_ready: boolean
blocking_issues: number
warnings: number
suggestions: number
detailed_reviews:
security: object
performance: object
style: object
tests: object
documentation: object
fix_suggestions: array[code_change]
merge_decision: enum[approve, request_changes, needs_work]
Execution Flow
#!/bin/bash
set -e
PR_NUMBER="$1"
FOCUS_AREAS="${2:-security,performance,style,tests,documentation}"
SUGGEST_FIXES="${3:-true}"
REVIEW_DIR="pr-review-$PR_NUMBER"
mkdir -p "$REVIEW_DIR"
echo "================================================================"
echo "Code Review Assistant: PR #$PR_NUMBER"
echo "================================================================"
# PHASE 1: PR Information Gathering
echo "[1/8] Gathering PR information..."
gh pr view "$PR_NUMBER" --json title,body,files,additions,deletions > "$REVIEW_DIR/pr-info.json"
PR_TITLE=$(cat "$REVIEW_DIR/pr-info.json" | jq -r '.title')
CHANGED_FILES=$(cat "$REVIEW_DIR/pr-info.json" | jq -r '.files[].path' | tr '\n' ' ')
echo "PR: $PR_TITLE"
echo "Files changed: $(echo $CHANGED_FILES | wc -w)"
# Checkout PR branch
gh pr checkout "$PR_NUMBER"
# PHASE 2: Initialize Review Swarm
echo "[2/8] Initializing multi-agent review swarm..."
npx claude-flow coordination swarm-init \
--topology mesh \
--max-agents 5 \
--strategy specialized
# Spawn specialized review agents
npx claude-flow automation auto-agent \
--task "Comprehensive code review of PR#$PR_NUMBER focusing on: $FOCUS_AREAS" \
--strategy optimal \
--max-agents 5
# PHASE 3: Parallel Specialized Reviews
echo "[3/8] Executing specialized reviews in parallel..."
# Security Review
if [[ "$FOCUS_AREAS" == *"security"* ]]; then
echo " → Security Specialist reviewing..."
npx claude-flow security-scan . \
--deep true \
--check-secrets true \
--output "$REVIEW_DIR/security-review.json" &
SEC_PID=$!
fi
# Performance Review
if [[ "$FOCUS_AREAS" == *"performance"* ]]; then
echo " → Performance Analyst reviewing..."
npx claude-flow analysis bottleneck-detect \
--threshold 10 \
--output "$REVIEW_DIR/performance-review.json" &
PERF_PID=$!
fi
# Style Review
if [[ "$FOCUS_AREAS" == *"style"* ]]; then
echo " → Style Reviewer checking..."
npx claude-flow style-audit . \
--fix false \
--output "$REVIEW_DIR/style-review.json" &
STYLE_PID=$!
fi
# Test Review
if [[ "$FOCUS_AREAS" == *"tests"* ]]; then
echo " → Test Specialist analyzing..."
npx claude-flow test-coverage . \
--detailed true \
--output "$REVIEW_DIR/test-review.json" &
TEST_PID=$!
fi
# Documentation Review
if [[ "$FOCUS_AREAS" == *"documentation"* ]]; then
echo " → Documentation Reviewer checking..."
# Check for README updates, JSDoc comments, etc.
npx claude-flow docs-checker . \
--output "$REVIEW_DIR/docs-review.json" &
DOCS_PID=$!
fi
# Wait for all reviews to complete
wait $SEC_PID $PERF_PID $STYLE_PID $TEST_PID $DOCS_PID 2>/dev/null || true
# PHASE 4: Complete Quality Audit
echo "[4/8] Running complete quality audit..."
npx claude-flow audit-pipeline . \
--phase all \
--model codex-auto \
--output "$REVIEW_DIR/quality-audit.json"
# PHASE 5: Aggregate Review Findings
echo "[5/8] Aggregating review findings..."
cat > "$REVIEW_DIR/aggregated-review.json" <<EOF
{
"pr_number": $PR_NUMBER,
"pr_title": "$PR_TITLE",
"reviews": {
"security": $(cat "$REVIEW_DIR/security-review.json" 2>/dev/null || echo "{}"),
"performance": $(cat "$REVIEW_DIR/performance-review.json" 2>/dev/null || echo "{}"),
"style": $(cat "$REVIEW_DIR/style-review.json" 2>/dev/null || echo "{}"),
"tests": $(cat "$REVIEW_DIR/test-review.json" 2>/dev/null || echo "{}"),
"documentation": $(cat "$REVIEW_DIR/docs-review.json" 2>/dev/null || echo "{}"),
"quality_audit": $(cat "$REVIEW_DIR/quality-audit.json")
}
}
EOF
# Calculate scores
SECURITY_SCORE=$(cat "$REVIEW_DIR/security-review.json" 2>/dev/null | jq '.score // 100')
PERF_SCORE=$(cat "$REVIEW_DIR/performance-review.json" 2>/dev/null | jq '.score // 100')
STYLE_SCORE=$(cat "$REVIEW_DIR/style-review.json" 2>/dev/null | jq '.quality_score // 100')
TEST_SCORE=$(cat "$REVIEW_DIR/test-review.json" 2>/dev/null | jq '.coverage_percent // 100')
QUALITY_SCORE=$(cat "$REVIEW_DIR/quality-audit.json" | jq '.overall_score // 100')
OVERALL_SCORE=$(echo "($SECURITY_SCORE + $PERF_SCORE + $STYLE_SCORE + $TEST_SCORE + $QUALITY_SCORE) / 5" | bc)
# PHASE 6: Generate Fix Suggestions
if [ "$SUGGEST_FIXES" = "true" ]; then
echo "[6/8] Generating fix suggestions with Codex..."
# Collect all issues
ISSUES=$(cat "$REVIEW_DIR/aggregated-review.json" | jq '[.reviews[] | .issues? // [] | .[]]')
if [ "$(echo $ISSUES | jq 'length')" -gt 0 ]; then
codex --reasoning-mode "Suggest fixes for code review issues" \
--context "$REVIEW_DIR/aggregated-review.json" \
--output "$REVIEW_DIR/fix-suggestions.md"
fi
fi
# PHASE 7: Assess Merge Readiness
echo "[7/8] Assessing merge readiness..."
CRITICAL_SECURITY=$(cat "$REVIEW_DIR/security-review.json" 2>/dev/null | jq '.critical_issues // 0')
TESTS_PASSING=$(cat "$REVIEW_DIR/quality-audit.json" | jq '.functionality_audit.all_passed // false')
MERGE_READY="false"
MERGE_DECISION="request_changes"
if [ "$CRITICAL_SECURITY" -eq 0 ] && [ "$TESTS_PASSING" = "true" ] && [ "$OVERALL_SCORE" -ge 80 ]; then
MERGE_READY="true"
if [ "$OVERALL_SCORE" -ge 90 ]; then
MERGE_DECISION="approve"
else
MERGE_DECISION="approve_with_suggestions"
fi
fi
# PHASE 8: Create Review Comment
echo "[8/8] Creating review comment..."
cat > "$REVIEW_DIR/review-comment.md" <<EOF
# 🤖 Automated Code Review
**Overall Score**: $OVERALL_SCORE/100
**Merge Ready**: $([ "$MERGE_READY" = "true" ] && echo "✅ Yes" || echo "⚠️ No")
## Review Summary
| Category | Score | Status |
|----------|-------|--------|
| 🔒 Security | $SECURITY_SCORE/100 | $([ "$SECURITY_SCORE" -ge 80 ] && echo "✅" || echo "⚠️") |
| ⚡ Performance | $PERF_SCORE/100 | $([ "$PERF_SCORE" -ge 80 ] && echo "✅" || echo "⚠️") |
| 🎨 Style | $STYLE_SCORE/100 | $([ "$STYLE_SCORE" -ge 80 ] && echo "✅" || echo "⚠️") |
| 🧪 Tests | $TEST_SCORE/100 | $([ "$TEST_SCORE" -ge 80 ] && echo "✅" || echo "⚠️") |
| 📊 Quality | $QUALITY_SCORE/100 | $([ "$QUALITY_SCORE" -ge 80 ] && echo "✅" || echo "⚠️") |
## Detailed Findings
### 🔒 Security Review
$(cat "$REVIEW_DIR/security-review.json" 2>/dev/null | jq -r '.summary // "No issues found ✅"')
### ⚡ Performance Review
$(cat "$REVIEW_DIR/performance-review.json" 2>/dev/null | jq -r '.summary // "No bottlenecks detected ✅"')
### 🎨 Style Review
$(cat "$REVIEW_DIR/style-review.json" 2>/dev/null | jq -r '.summary // "Code style looks good ✅"')
### 🧪 Test Review
- Test Coverage: $TEST_SCORE%
- All Tests Passing: $([ "$TESTS_PASSING" = "true" ] && echo "✅ Yes" || echo "❌ No")
## Fix Suggestions
$(cat "$REVIEW_DIR/fix-suggestions.md" 2>/dev/null || echo "No suggestions needed - code looks great! 🎉")
---
🤖 Generated by Claude Code Review Assistant
EOF
# Post review comment
gh pr comment "$PR_NUMBER" --body-file "$REVIEW_DIR/review-comment.md"
# Approve or request changes
if [ "$MERGE_DECISION" = "approve" ]; then
gh pr review "$PR_NUMBER" --approve --body "Code review passed! Overall score: $OVERALL_SCORE/100 ✅"
elif [ "$MERGE_DECISION" = "approve_with_suggestions" ]; then
gh pr review "$PR_NUMBER" --approve --body "Approved with suggestions. See detailed review comment. Score: $OVERALL_SCORE/100 ✅"
else
gh pr review "$PR_NUMBER" --request-changes --body "Please address review findings before merging. Score: $OVERALL_SCORE/100"
fi
echo ""
echo "================================================================"
echo "Code Review Complete!"
echo "================================================================"
echo ""
echo "Overall Score: $OVERALL_SCORE/100"
echo "Merge Ready: $MERGE_READY"
echo "Decision: $MERGE_DECISION"
echo ""
echo "Review artifacts in: $REVIEW_DIR/"
echo "Review comment posted to PR #$PR_NUMBER"
echo ""
Integration Points
Cascades
- Part of
/github-automation-workflow cascade
- Used by
/pr-quality-gate cascade
- Invoked by
/review-pr command
Commands
- Uses:
/swarm-init, /auto-agent, /security-scan
- Uses:
/bottleneck-detect, /style-audit, /test-coverage
- Uses:
/audit-pipeline, /codex-reasoning
- Uses GitHub CLI:
gh pr view, gh pr checkout, gh pr comment, gh pr review
Other Skills
- Invokes:
quick-quality-check, smart-bug-fix (if issues)
- Output to:
merge-decision-maker, pr-enhancer
Usage Example
# Review PR with all checks
code-review-assistant 123
# Review focusing on security
code-review-assistant 123 security
# Review with auto-merge
code-review-assistant 123 "security,tests" true --auto-merge true
Failure Modes
- PR not found: Verify PR number and repository access
- Critical security issues: Block merge, escalate to security team
- Tests failing: Request changes, provide fix suggestions
- GitHub CLI not authenticated: Guide user to authenticate
1---2name: code-review-assistant3description: Comprehensive PR review using multi-agent swarm with specialized reviewers for security, performance, style, tests, and documentation. Provides detailed feedback with auto-fix suggestions and merge readiness assessment.4---5
6# Code Review Assistant
7
8## Purpose
9
10Automated comprehensive code review using specialized multi-agent swarm for PRs.
11
12## Specialist Agent
13
14I am a code review coordinator managing specialized review agents.
15
16**Methodology** (Multi-Agent Swarm Review Pattern):
171. Initialize review swarm with specialized agents
182. Parallel comprehensive review (security, performance, style, tests, docs)
193. Run complete quality audit pipeline
204. Aggregate findings with severity ranking
215. Generate fix suggestions with Codex
226. Assess merge readiness with quality gates
237. Create detailed review comment
24
25**Review Agents** (5 specialists):
26- **Security Reviewer**: Vulnerabilities, unsafe patterns, secrets
27- **Performance Analyst**: Bottlenecks, optimization opportunities
28- **Style Reviewer**: Code style, best practices, maintainability
29- **Test Specialist**: Test coverage, quality, edge cases
30- **Documentation Reviewer**: Comments, API docs, README updates
31
32## Input Contract
33
34```yaml
35input:
36 pr_number: number (required) or
37 changed_files: array[string] (file paths)
38 focus_areas: array[enum] (default: all)
39 - security
40 - performance
41 - style
42 - tests
43 - documentation
44 suggest_fixes: boolean (default: true)
45 auto_merge_if_passing: boolean (default: false)
46```
47
48## Output Contract
49
50```yaml
51output:
52 review_summary:
53 overall_score: number (0-100)
54 merge_ready: boolean
55 blocking_issues: number
56 warnings: number
57 suggestions: number
58 detailed_reviews:
59 security: object
60 performance: object
61 style: object
62 tests: object
63 documentation: object
64 fix_suggestions: array[code_change]
65 merge_decision: enum[approve, request_changes, needs_work]
66```
67
68## Execution Flow
69
70```bash
71#!/bin/bash
72set -e
73
74PR_NUMBER="$1"
75FOCUS_AREAS="${2:-security,performance,style,tests,documentation}"
76SUGGEST_FIXES="${3:-true}"
77
78REVIEW_DIR="pr-review-$PR_NUMBER"
79mkdir -p "$REVIEW_DIR"
80
81echo "================================================================"
82echo "Code Review Assistant: PR #$PR_NUMBER"
83echo "================================================================"
84
85# PHASE 1: PR Information Gathering
86echo "[1/8] Gathering PR information..."
87gh pr view "$PR_NUMBER" --json title,body,files,additions,deletions > "$REVIEW_DIR/pr-info.json"
88
89PR_TITLE=$(cat "$REVIEW_DIR/pr-info.json" | jq -r '.title')
90CHANGED_FILES=$(cat "$REVIEW_DIR/pr-info.json" | jq -r '.files[].path' | tr '\n' ' ')
91
92echo "PR: $PR_TITLE"
93echo "Files changed: $(echo $CHANGED_FILES | wc -w)"
94
95# Checkout PR branch
96gh pr checkout "$PR_NUMBER"
97
98# PHASE 2: Initialize Review Swarm
99echo "[2/8] Initializing multi-agent review swarm..."
100npx claude-flow coordination swarm-init \
101 --topology mesh \
102 --max-agents 5 \
103 --strategy specialized
104
105# Spawn specialized review agents
106npx claude-flow automation auto-agent \
107 --task "Comprehensive code review of PR#$PR_NUMBER focusing on: $FOCUS_AREAS" \
108 --strategy optimal \
109 --max-agents 5
110
111# PHASE 3: Parallel Specialized Reviews
112echo "[3/8] Executing specialized reviews in parallel..."
113
114# Security Review
115if [[ "$FOCUS_AREAS" == *"security"* ]]; then
116 echo " → Security Specialist reviewing..."
117 npx claude-flow security-scan . \
118 --deep true \
119 --check-secrets true \
120 --output "$REVIEW_DIR/security-review.json" &
121 SEC_PID=$!
122fi
123
124# Performance Review
125if [[ "$FOCUS_AREAS" == *"performance"* ]]; then
126 echo " → Performance Analyst reviewing..."
127 npx claude-flow analysis bottleneck-detect \
128 --threshold 10 \
129 --output "$REVIEW_DIR/performance-review.json" &
130 PERF_PID=$!
131fi
132
133# Style Review
134if [[ "$FOCUS_AREAS" == *"style"* ]]; then
135 echo " → Style Reviewer checking..."
136 npx claude-flow style-audit . \
137 --fix false \
138 --output "$REVIEW_DIR/style-review.json" &
139 STYLE_PID=$!
140fi
141
142# Test Review
143if [[ "$FOCUS_AREAS" == *"tests"* ]]; then
144 echo " → Test Specialist analyzing..."
145 npx claude-flow test-coverage . \
146 --detailed true \
147 --output "$REVIEW_DIR/test-review.json" &
148 TEST_PID=$!
149fi
150
151# Documentation Review
152if [[ "$FOCUS_AREAS" == *"documentation"* ]]; then
153 echo " → Documentation Reviewer checking..."
154 # Check for README updates, JSDoc comments, etc.
155 npx claude-flow docs-checker . \
156 --output "$REVIEW_DIR/docs-review.json" &
157 DOCS_PID=$!
158fi
159
160# Wait for all reviews to complete
161wait $SEC_PID $PERF_PID $STYLE_PID $TEST_PID $DOCS_PID 2>/dev/null || true
162
163# PHASE 4: Complete Quality Audit
164echo "[4/8] Running complete quality audit..."
165npx claude-flow audit-pipeline . \
166 --phase all \
167 --model codex-auto \
168 --output "$REVIEW_DIR/quality-audit.json"
169
170# PHASE 5: Aggregate Review Findings
171echo "[5/8] Aggregating review findings..."
172cat > "$REVIEW_DIR/aggregated-review.json" <<EOF
173{
174 "pr_number": $PR_NUMBER,
175 "pr_title": "$PR_TITLE",
176 "reviews": {
177 "security": $(cat "$REVIEW_DIR/security-review.json" 2>/dev/null || echo "{}"),
178 "performance": $(cat "$REVIEW_DIR/performance-review.json" 2>/dev/null || echo "{}"),
179 "style": $(cat "$REVIEW_DIR/style-review.json" 2>/dev/null || echo "{}"),
180 "tests": $(cat "$REVIEW_DIR/test-review.json" 2>/dev/null || echo "{}"),
181 "documentation": $(cat "$REVIEW_DIR/docs-review.json" 2>/dev/null || echo "{}"),
182 "quality_audit": $(cat "$REVIEW_DIR/quality-audit.json")
183 }
184}
185EOF
186
187# Calculate scores
188SECURITY_SCORE=$(cat "$REVIEW_DIR/security-review.json" 2>/dev/null | jq '.score // 100')
189PERF_SCORE=$(cat "$REVIEW_DIR/performance-review.json" 2>/dev/null | jq '.score // 100')
190STYLE_SCORE=$(cat "$REVIEW_DIR/style-review.json" 2>/dev/null | jq '.quality_score // 100')
191TEST_SCORE=$(cat "$REVIEW_DIR/test-review.json" 2>/dev/null | jq '.coverage_percent // 100')
192QUALITY_SCORE=$(cat "$REVIEW_DIR/quality-audit.json" | jq '.overall_score // 100')
193
194OVERALL_SCORE=$(echo "($SECURITY_SCORE + $PERF_SCORE + $STYLE_SCORE + $TEST_SCORE + $QUALITY_SCORE) / 5" | bc)
195
196# PHASE 6: Generate Fix Suggestions
197if [ "$SUGGEST_FIXES" = "true" ]; then
198 echo "[6/8] Generating fix suggestions with Codex..."
199
200 # Collect all issues
201 ISSUES=$(cat "$REVIEW_DIR/aggregated-review.json" | jq '[.reviews[] | .issues? // [] | .[]]')
202
203 if [ "$(echo $ISSUES | jq 'length')" -gt 0 ]; then
204 codex --reasoning-mode "Suggest fixes for code review issues" \
205 --context "$REVIEW_DIR/aggregated-review.json" \
206 --output "$REVIEW_DIR/fix-suggestions.md"
207 fi
208fi
209
210# PHASE 7: Assess Merge Readiness
211echo "[7/8] Assessing merge readiness..."
212
213CRITICAL_SECURITY=$(cat "$REVIEW_DIR/security-review.json" 2>/dev/null | jq '.critical_issues // 0')
214TESTS_PASSING=$(cat "$REVIEW_DIR/quality-audit.json" | jq '.functionality_audit.all_passed // false')
215
216MERGE_READY="false"
217MERGE_DECISION="request_changes"
218
219if [ "$CRITICAL_SECURITY" -eq 0 ] && [ "$TESTS_PASSING" = "true" ] && [ "$OVERALL_SCORE" -ge 80 ]; then
220 MERGE_READY="true"
221 if [ "$OVERALL_SCORE" -ge 90 ]; then
222 MERGE_DECISION="approve"
223 else
224 MERGE_DECISION="approve_with_suggestions"
225 fi
226fi
227
228# PHASE 8: Create Review Comment
229echo "[8/8] Creating review comment..."
230
231cat > "$REVIEW_DIR/review-comment.md" <<EOF
232# 🤖 Automated Code Review
233
234**Overall Score**: $OVERALL_SCORE/100
235**Merge Ready**: $([ "$MERGE_READY" = "true" ] && echo "✅ Yes" || echo "⚠️ No")
236
237## Review Summary
238
239| Category | Score | Status |
240|----------|-------|--------|
241| 🔒 Security | $SECURITY_SCORE/100 | $([ "$SECURITY_SCORE" -ge 80 ] && echo "✅" || echo "⚠️") |
242| ⚡ Performance | $PERF_SCORE/100 | $([ "$PERF_SCORE" -ge 80 ] && echo "✅" || echo "⚠️") |
243| 🎨 Style | $STYLE_SCORE/100 | $([ "$STYLE_SCORE" -ge 80 ] && echo "✅" || echo "⚠️") |
244| 🧪 Tests | $TEST_SCORE/100 | $([ "$TEST_SCORE" -ge 80 ] && echo "✅" || echo "⚠️") |
245| 📊 Quality | $QUALITY_SCORE/100 | $([ "$QUALITY_SCORE" -ge 80 ] && echo "✅" || echo "⚠️") |
246
247## Detailed Findings
248
249### 🔒 Security Review
250$(cat "$REVIEW_DIR/security-review.json" 2>/dev/null | jq -r '.summary // "No issues found ✅"')
251
252### ⚡ Performance Review
253$(cat "$REVIEW_DIR/performance-review.json" 2>/dev/null | jq -r '.summary // "No bottlenecks detected ✅"')
254
255### 🎨 Style Review
256$(cat "$REVIEW_DIR/style-review.json" 2>/dev/null | jq -r '.summary // "Code style looks good ✅"')
257
258### 🧪 Test Review
259- Test Coverage: $TEST_SCORE%
260- All Tests Passing: $([ "$TESTS_PASSING" = "true" ] && echo "✅ Yes" || echo "❌ No")
261
262## Fix Suggestions
263
264$(cat "$REVIEW_DIR/fix-suggestions.md" 2>/dev/null || echo "No suggestions needed - code looks great! 🎉")
265
266---
267
268🤖 Generated by Claude Code Review Assistant
269EOF
270
271# Post review comment
272gh pr comment "$PR_NUMBER" --body-file "$REVIEW_DIR/review-comment.md"
273
274# Approve or request changes
275if [ "$MERGE_DECISION" = "approve" ]; then
276 gh pr review "$PR_NUMBER" --approve --body "Code review passed! Overall score: $OVERALL_SCORE/100 ✅"
277elif [ "$MERGE_DECISION" = "approve_with_suggestions" ]; then
278 gh pr review "$PR_NUMBER" --approve --body "Approved with suggestions. See detailed review comment. Score: $OVERALL_SCORE/100 ✅"
279else
280 gh pr review "$PR_NUMBER" --request-changes --body "Please address review findings before merging. Score: $OVERALL_SCORE/100"
281fi
282
283echo ""
284echo "================================================================"
285echo "Code Review Complete!"
286echo "================================================================"
287echo ""
288echo "Overall Score: $OVERALL_SCORE/100"
289echo "Merge Ready: $MERGE_READY"
290echo "Decision: $MERGE_DECISION"
291echo ""
292echo "Review artifacts in: $REVIEW_DIR/"
293echo "Review comment posted to PR #$PR_NUMBER"
294echo ""
295```
296
297## Integration Points
298
299### Cascades
300- Part of `/github-automation-workflow` cascade
301- Used by `/pr-quality-gate` cascade
302- Invoked by `/review-pr` command
303
304### Commands
305- Uses: `/swarm-init`, `/auto-agent`, `/security-scan`
306- Uses: `/bottleneck-detect`, `/style-audit`, `/test-coverage`
307- Uses: `/audit-pipeline`, `/codex-reasoning`
308- Uses GitHub CLI: `gh pr view`, `gh pr checkout`, `gh pr comment`, `gh pr review`
309
310### Other Skills
311- Invokes: `quick-quality-check`, `smart-bug-fix` (if issues)
312- Output to: `merge-decision-maker`, `pr-enhancer`
313
314## Usage Example
315
316```bash
317# Review PR with all checks
318code-review-assistant 123
319
320# Review focusing on security
321code-review-assistant 123 security
322
323# Review with auto-merge
324code-review-assistant 123 "security,tests" true --auto-merge true
325```
326
327## Failure Modes
328
329- **PR not found**: Verify PR number and repository access
330- **Critical security issues**: Block merge, escalate to security team
331- **Tests failing**: Request changes, provide fix suggestions
332- **GitHub CLI not authenticated**: Guide user to authenticate