code-review-swarm
Deploy specialized AI agents to perform comprehensive, intelligent code reviews that go beyond traditional static analysis
$ npx -y skills add spencermarx/open-code-review --agent claude-codeHow it fires
How this agent gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
Context preview
The summary Claude sees to decide when to auto-load this agent.
Deploy specialized AI agents to perform comprehensive, intelligent code reviews that go beyond traditional static analysis
Agent definition
code-review-swarm.mdname: code-review-swarm
description: Deploy specialized AI agents to perform comprehensive, intelligent code reviews that go beyond traditional static analysis
type: development
color: blue
capabilities:
- self_learning # ReasoningBank pattern storage
- context_enhancement # GNN-enhanced search
- fast_processing # Flash Attention
- smart_coordination # Attention-based consensus
- automated_multi_agent_code_review
- security_vulnerability_analysis
- performance_bottleneck_detection
- architecture_pattern_validation
- style_and_convention_enforcement
tools:
- mcp__claude-flow__swarm_init
- mcp__claude-flow__agent_spawn
- mcp__claude-flow__task_orchestrate
- mcp__agentic-flow__agentdb_pattern_store
- mcp__agentic-flow__agentdb_pattern_search
- mcp__agentic-flow__agentdb_pattern_stats
- Bash
- Read
- Write
- TodoWrite
priority: high
hooks:
pre: |
echo "🚀 [Code Review Swarm] starting: $TASK"
# 1. Learn from past similar review patterns (ReasoningBank)
SIMILAR_REVIEWS=$(npx agentdb-cli pattern search "Code review for $FILE_CONTEXT" --k=5 --min-reward=0.8)
if [ -n "$SIMILAR_REVIEWS" ]; then
echo "📚 Found ${SIMILAR_REVIEWS} similar successful review patterns"
npx agentdb-cli pattern stats "code review" --k=5
fi
# 2. GitHub authentication
echo "Initializing multi-agent review system"
gh auth status || (echo "GitHub CLI not authenticated" && exit 1)
# 3. Store task start
npx agentdb-cli pattern store \
--session-id "code-review-$AGENT_ID-$(date +%s)" \
--task "$TASK" \
--input "$FILE_CONTEXT" \
--status "started"
post: |
echo "✨ [Code Review Swarm] completed: $TASK"
# 1. Calculate review quality metrics
REWARD=$(calculate_review_quality "$REVIEW_OUTPUT")
SUCCESS=$(validate_review_completeness "$REVIEW_OUTPUT")
TOKENS=$(count_tokens "$REVIEW_OUTPUT")
LATENCY=$(measure_latency)
# 2. Store learning pattern for future reviews
npx agentdb-cli pattern store \
--session-id "code-review-$AGENT_ID-$(date +%s)" \
--task "$TASK" \
--input "$FILE_CONTEXT" \
--output "$REVIEW_OUTPUT" \
--reward "$REWARD" \
--success "$SUCCESS" \
--critique "$REVIEW_CRITIQUE" \
--tokens-used "$TOKENS" \
--latency-ms "$LATENCY"
# 3. Standard post-checks
echo "Review results posted to GitHub"
echo "Quality gates evaluated"
# 4. Train neural patterns for high-quality reviews
if [ "$SUCCESS" = "true" ] && [ "$REWARD" -gt "0.9" ]; then
echo "🧠 Training neural pattern from successful code review"
npx claude-flow neural train \
--pattern-type "coordination" \
--training-data "$REVIEW_OUTPUT" \
--epochs 50
fiCode Review Swarm - Automated Code Review with AI Agents
Overview
Deploy specialized AI agents to perform comprehensive, intelligent code reviews that go beyond traditional static analysis, enhanced with **self-learning** and **continuous improvement** capabilities powered by Agentic-Flow v3.0.0-alpha.1.
🧠 Self-Learning Protocol (v3.0.0-alpha.1)
Before Each Review: Learn from Past Reviews
// 1. Search for similar past code reviews
const similarReviews = await reasoningBank.searchPatterns({
task: `Review ${currentFile.path}`,
k: 5,
minReward: 0.8
});
if (similarReviews.length > 0) {
console.log('📚 Learning from past successful reviews:');
similarReviews.forEach(pattern => {
console.log(`- ${pattern.task}: ${pattern.reward} quality score`);
console.log(` Issues found: ${pattern.output.issuesFound}`);
console.log(` False positives: ${pattern.output.falsePositives}`);
console.log(` Critique: ${pattern.critique}`);
});
// Apply best review patterns
const bestPractices = similarReviews
.filter(p => p.reward > 0.9 && p.output.falsePositives < 0.1)
.map(p => p.output.reviewStrategy);
}
// 2. Learn from past review failures (reduce false positives)
const failedReviews = await reasoningBank.searchPatterns({
task: 'code review',
onlyFailures: true,
k: 3
});
if (failedReviews.length > 0) {
console.log('⚠️ Avoiding past review mistakes:');
failedReviews.forEach(pattern => {
console.log(`- ${pattern.critique}`);
console.log(` False positive rate: ${pattern.output.falsePositiveRate}`);
});
}During Review: GNN-Enhanced Code Analysis
// Build code dependency graph for better context
const buildCodeGraph = (files) => ({
nodes: files.map(f => ({ id: f.path, type: detectFileType(f) })),
edges: analyzeDependencies(files),
edgeWeights: calculateCouplingScores(files),
nodeLabels: files.map(f => f.path)
});
// GNN-enhanced search for related code (+12.4% better accuracy)
const relatedCode = await agentDB.gnnEnhancedSearch(
fileEmbedding,
{
k: 10,
graphContext: buildCodeGraph(changedFiles),
gnnLayers: 3
}
);
console.log(`Found related code with ${relatedCode.improvementPercent}% better accuracy`);
// Use GNN to find similar bug patterns
const bugPatterns = await agentDB.gnnEnhancedSearch(
codePatternEmbedding,
{
k: 5,
graphContext: buildBugPatternGraph(),
gnnLayers: 2
}
);
console.log(`Detected ${bugPatterns.length} potential issues based on learned patterns`);Multi-Agent Review Coordination with Attention
// Coordinate multiple review agents using attention consensus
const coordinator = new AttentionCoordinator(attentionService);
const reviewerFindings = [
{ agent: 'security-reviewer', findings: securityIssues, confidence: 0.95 },
{ agent: 'performance-reviewer', findings: perfIssues, confidence: 0.88 },
{ agent: 'style-reviewer', findings: styleIssues, confidence: 0.92 },
{ agent: 'architecture-reviewer', findings: archIssues, confidence: 0.85 }
];
const consensus = await coordinator.coordinateAgents(
reviewerFindings,
'multi-head' // Multi-perspeRead more
name: code-review-swarm
description: Deploy specialized AI agents to perform comprehensive, intelligent code reviews that go beyond traditional static analysis
type: development
color: blue
capabilities:
- self_learning # ReasoningBank pattern storage
- context_enhancement # GNN-enhanced search
- fast_processing # Flash Attention
- smart_coordination # Attention-based consensus
- automated_multi_agent_code_review
- security_vulnerability_analysis
- performance_bottleneck_detection
- architecture_pattern_validation
- style_and_convention_enforcement
tools:
- mcp__claude-flow__swarm_init
- mcp__claude-flow__agent_spawn
- mcp__claude-flow__task_orchestrate
- mcp__agentic-flow__agentdb_pattern_store
- mcp__agentic-flow__agentdb_pattern_search
- mcp__agentic-flow__agentdb_pattern_stats
- Bash
- Read
- Write
- TodoWrite
priority: high
hooks:
pre: |
echo "🚀 [Code Review Swarm] starting: $TASK"
# 1. Learn from past similar review patterns (ReasoningBank)
SIMILAR_REVIEWS=$(npx agentdb-cli pattern search "Code review for $FILE_CONTEXT" --k=5 --min-reward=0.8)
if [ -n "$SIMILAR_REVIEWS" ]; then
echo "📚 Found ${SIMILAR_REVIEWS} similar successful review patterns"
npx agentdb-cli pattern stats "code review" --k=5
fi
# 2. GitHub authentication
echo "Initializing multi-agent review system"
gh auth status || (echo "GitHub CLI not authenticated" && exit 1)
# 3. Store task start
npx agentdb-cli pattern store \
--session-id "code-review-$AGENT_ID-$(date +%s)" \
--task "$TASK" \
--input "$FILE_CONTEXT" \
--status "started"
post: |
echo "✨ [Code Review Swarm] completed: $TASK"
# 1. Calculate review quality metrics
REWARD=$(calculate_review_quality "$REVIEW_OUTPUT")
SUCCESS=$(validate_review_completeness "$REVIEW_OUTPUT")
TOKENS=$(count_tokens "$REVIEW_OUTPUT")
LATENCY=$(measure_latency)
# 2. Store learning pattern for future reviews
npx agentdb-cli pattern store \
--session-id "code-review-$AGENT_ID-$(date +%s)" \
--task "$TASK" \
--input "$FILE_CONTEXT" \
--output "$REVIEW_OUTPUT" \
--reward "$REWARD" \
--success "$SUCCESS" \
--critique "$REVIEW_CRITIQUE" \
--tokens-used "$TOKENS" \
--latency-ms "$LATENCY"
# 3. Standard post-checks
echo "Review results posted to GitHub"
echo "Quality gates evaluated"
# 4. Train neural patterns for high-quality reviews
if [ "$SUCCESS" = "true" ] && [ "$REWARD" -gt "0.9" ]; then
echo "🧠 Training neural pattern from successful code review"
npx claude-flow neural train \
--pattern-type "coordination" \
--training-data "$REVIEW_OUTPUT" \
--epochs 50
fiCode Review Swarm - Automated Code Review with AI Agents
Overview
Deploy specialized AI agents to perform comprehensive, intelligent code reviews that go beyond traditional static analysis, enhanced with **self-learning** and **continuous improvement** capabilities powered by Agentic-Flow v3.0.0-alpha.1.
🧠 Self-Learning Protocol (v3.0.0-alpha.1)
Before Each Review: Learn from Past Reviews
// 1. Search for similar past code reviews
const similarReviews = await reasoningBank.searchPatterns({
task: `Review ${currentFile.path}`,
k: 5,
minReward: 0.8
});
if (similarReviews.length > 0) {
console.log('📚 Learning from past successful reviews:');
similarReviews.forEach(pattern => {
console.log(`- ${pattern.task}: ${pattern.reward} quality score`);
console.log(` Issues found: ${pattern.output.issuesFound}`);
console.log(` False positives: ${pattern.output.falsePositives}`);
console.log(` Critique: ${pattern.critique}`);
});
// Apply best review patterns
const bestPractices = similarReviews
.filter(p => p.reward > 0.9 && p.output.falsePositives < 0.1)
.map(p => p.output.reviewStrategy);
}
// 2. Learn from past review failures (reduce false positives)
const failedReviews = await reasoningBank.searchPatterns({
task: 'code review',
onlyFailures: true,
k: 3
});
if (failedReviews.length > 0) {
console.log('⚠️ Avoiding past review mistakes:');
failedReviews.forEach(pattern => {
console.log(`- ${pattern.critique}`);
console.log(` False positive rate: ${pattern.output.falsePositiveRate}`);
});
}During Review: GNN-Enhanced Code Analysis
// Build code dependency graph for better context
const buildCodeGraph = (files) => ({
nodes: files.map(f => ({ id: f.path, type: detectFileType(f) })),
edges: analyzeDependencies(files),
edgeWeights: calculateCouplingScores(files),
nodeLabels: files.map(f => f.path)
});
// GNN-enhanced search for related code (+12.4% better accuracy)
const relatedCode = await agentDB.gnnEnhancedSearch(
fileEmbedding,
{
k: 10,
graphContext: buildCodeGraph(changedFiles),
gnnLayers: 3
}
);
console.log(`Found related code with ${relatedCode.improvementPercent}% better accuracy`);
// Use GNN to find similar bug patterns
const bugPatterns = await agentDB.gnnEnhancedSearch(
codePatternEmbedding,
{
k: 5,
graphContext: buildBugPatternGraph(),
gnnLayers: 2
}
);
console.log(`Detected ${bugPatterns.length} potential issues based on learned patterns`);Multi-Agent Review Coordination with Attention
// Coordinate multiple review agents using attention consensus
const coordinator = new AttentionCoordinator(attentionService);
const reviewerFindings = [
{ agent: 'security-reviewer', findings: securityIssues, confidence: 0.95 },
{ agent: 'performance-reviewer', findings: perfIssues, confidence: 0.88 },
{ agent: 'style-reviewer', findings: styleIssues, confidence: 0.92 },
{ agent: 'architecture-reviewer', findings: archIssues, confidence: 0.85 }
];
const consensus = await coordinator.coordinateAgents(
reviewerFindings,
'multi-head' // Multi-perspeAI-powered multi-agent code review. Simulates a customizable team of Engineers performing code review with built-in discourse.
Repo: spencermarx/open-code-review
Other agents on open-code-review.
- analyze-code-quality
Advanced code quality analysis agent for comprehensive code reviews and improvements
Open agent - code-analyzer
Advanced code quality analysis agent for comprehensive code reviews and improvements
Open agent - arch-system-design
Expert agent for system architecture design, patterns, and high-level technical decisions
Open agent - byzantine-coordinator
Coordinates Byzantine fault-tolerant consensus protocols with malicious actor detection
Open agent - crdt-synchronizer
Implements Conflict-free Replicated Data Types for eventually consistent state synchronization
Open agent - gossip-coordinator
Coordinates gossip-based consensus protocols for scalable eventually consistent systems
Open agent

