/performance-analysis
Comprehensive performance analysis, bottleneck detection, and optimization recommendations for Claude Flow swarms
$ npx -y skills add ruvnet/claude-flow --skill performance-analysis --agent claude-codeHow it fires
How this skill 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.
- Slash command
/performance-analysis
Context preview
The summary Claude sees to decide when to auto-load this skill.
Comprehensive performance analysis, bottleneck detection, and optimization recommendations for Claude Flow swarms
SKILL.md
performance-analysis.SKILL.mdname: performance-analysis
description: |
Comprehensive performance analysis, bottleneck detection, and optimization recommendations for Claude Flow swarms
Performance Analysis Skill
Comprehensive performance analysis suite for identifying bottlenecks, profiling swarm operations, generating detailed reports, and providing actionable optimization recommendations.
Overview
This skill consolidates all performance analysis capabilities:
- **Bottleneck Detection**: Identify performance bottlenecks across communication, processing, memory, and network
- **Performance Profiling**: Real-time monitoring and historical analysis of swarm operations
- **Report Generation**: Create comprehensive performance reports in multiple formats
- **Optimization Recommendations**: AI-powered suggestions for improving performance
Quick Start
Basic Bottleneck Detection
npx claude-flow bottleneck detect
Generate Performance Report
npx claude-flow analysis performance-report --format html --include-metrics
Analyze and Auto-Fix
npx claude-flow bottleneck detect --fix --threshold 15
Core Capabilities
1. Bottleneck Detection
Command Syntax
npx claude-flow bottleneck detect [options]
Options
- `--swarm-id, -s <id>` - Analyze specific swarm (default: current)
- `--time-range, -t <range>` - Analysis period: 1h, 24h, 7d, all (default: 1h)
- `--threshold <percent>` - Bottleneck threshold percentage (default: 20)
- `--export, -e <file>` - Export analysis to file
- `--fix` - Apply automatic optimizations
Usage Examples
# Basic detection for current swarm
npx claude-flow bottleneck detect
# Analyze specific swarm over 24 hours
npx claude-flow bottleneck detect --swarm-id swarm-123 -t 24h
# Export detailed analysis
npx claude-flow bottleneck detect -t 24h -e bottlenecks.json
# Auto-fix detected issues
npx claude-flow bottleneck detect --fix --threshold 15
# Low threshold for sensitive detection
npx claude-flow bottleneck detect --threshold 10 --export critical-issues.json
Metrics Analyzed
**Communication Bottlenecks:**
- Message queue delays
- Agent response times
- Coordination overhead
- Memory access patterns
- Inter-agent communication latency
**Processing Bottlenecks:**
- Task completion times
- Agent utilization rates
- Parallel execution efficiency
- Resource contention
- CPU/memory usage patterns
**Memory Bottlenecks:**
- Cache hit rates
- Memory access patterns
- Storage I/O performance
- Neural pattern loading times
- Memory allocation efficiency
**Network Bottlenecks:**
- API call latency
- MCP communication delays
- External service timeouts
- Concurrent request limits
- Network throughput issues
Output Format
๐ Bottleneck Analysis Report
โโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Summary
โโโ Time Range: Last 1 hour
โโโ Agents Analyzed: 6
โโโ Tasks Processed: 42
โโโ Critical Issues: 2
๐จ Critical Bottlenecks
1. Agent Communication (35% impact)
โโโ coordinator โ coder-1 messages delayed by 2.3s avg
2. Memory Access (28% impact)
โโโ Neural pattern loading taking 1.8s per access
โ ๏ธ Warning Bottlenecks
1. Task Queue (18% impact)
โโโ 5 tasks waiting > 10s for assignment
๐ก Recommendations
1. Switch to hierarchical topology (est. 40% improvement)
2. Enable memory caching (est. 25% improvement)
3. Increase agent concurrency to 8 (est. 20% improvement)
โ
Quick Fixes Available
Run with --fix to apply:
- Enable smart caching
- Optimize message routing
- Adjust agent priorities
2. Performance Profiling
Real-time Detection
Automatic analysis during task execution:
- Execution time vs. complexity
- Agent utilization rates
- Resource constraints
- Operation patterns
Common Bottleneck Patterns
**Time Bottlenecks:**
- Tasks taking > 5 minutes
- Sequential operations that could parallelize
- Redundant file operations
- Inefficient algorithm implementations
**Coordination Bottlenecks:**
- Single agent for complex tasks
- Unbalanced agent workloads
- Poor topology selection
- Excessive synchronization points
**Resource Bottlenecks:**
- High operation count (> 100)
- Memory constraints
- I/O limitations
- Thread pool saturation
MCP Integration
// Check for bottlenecks in Claude Code
mcp__claude-flow__bottleneck_detect({
timeRange: "1h",
threshold: 20,
autoFix: false
})
// Get detailed task results with bottleneck analysis
mcp__claude-flow__task_results({
taskId: "task-123",
format: "detailed"
})**Result Format:**
{
"bottlenecks": [
{
"type": "coordination",
"severity": "high",
"description": "Single agent used for complex task",
"recommendation": "Spawn specialized agents for parallel work",
"impact": "35%",
"affectedComponents": ["coordinator", "coder-1"]
}
],
"improvements": [
{
"area": "execution_time",
"suggestion": "Use parallel task execution",
"expectedImprovement": "30-50% time reduction",
"implementationSteps": [
"Split task into smaller units",
"Spawn 3-4 specialized agents",
"Use mesh topology for coordination"
]
}
],
"metrics": {
"avgExecutionTime": "142s",
"agentUtilization": "67%",
"cacheHitRate": "82%",
"parallelizationFactor": 1.2
}
}3. Report Generation
Command Syntax
npx claude-flow analysis performance-report [options]
Options
- `--format <type>` - Report format: json, html, markdown (default: markdown)
- `--include-metrics` - Include detailed metrics and charts
- `--compare <id>` - Compare with previous swarm
- `--time-range <range>` - Analysis period: 1h, 24h, 7d, 30d, all
- `--output <file>` - Output file path
- `--sections <list>` - Comma-separated sections to include
Report Sections
1. **Executive Summary**
- Overall performance score
- Key metrics overview
- Critical findings
2. **Swarm Overview**
- Topology
Read more
name: performance-analysis description: | Comprehensive performance analysis, bottleneck detection, and optimization recommendations for Claude Flow swarms
Performance Analysis Skill
Comprehensive performance analysis suite for identifying bottlenecks, profiling swarm operations, generating detailed reports, and providing actionable optimization recommendations.
Overview
This skill consolidates all performance analysis capabilities:
- **Bottleneck Detection**: Identify performance bottlenecks across communication, processing, memory, and network
- **Performance Profiling**: Real-time monitoring and historical analysis of swarm operations
- **Report Generation**: Create comprehensive performance reports in multiple formats
- **Optimization Recommendations**: AI-powered suggestions for improving performance
Quick Start
Basic Bottleneck Detection
npx claude-flow bottleneck detect
Generate Performance Report
npx claude-flow analysis performance-report --format html --include-metrics
Analyze and Auto-Fix
npx claude-flow bottleneck detect --fix --threshold 15
Core Capabilities
1. Bottleneck Detection
Command Syntax
npx claude-flow bottleneck detect [options]
Options
- `--swarm-id, -s <id>` - Analyze specific swarm (default: current)
- `--time-range, -t <range>` - Analysis period: 1h, 24h, 7d, all (default: 1h)
- `--threshold <percent>` - Bottleneck threshold percentage (default: 20)
- `--export, -e <file>` - Export analysis to file
- `--fix` - Apply automatic optimizations
Usage Examples
# Basic detection for current swarm npx claude-flow bottleneck detect # Analyze specific swarm over 24 hours npx claude-flow bottleneck detect --swarm-id swarm-123 -t 24h # Export detailed analysis npx claude-flow bottleneck detect -t 24h -e bottlenecks.json # Auto-fix detected issues npx claude-flow bottleneck detect --fix --threshold 15 # Low threshold for sensitive detection npx claude-flow bottleneck detect --threshold 10 --export critical-issues.json
Metrics Analyzed
**Communication Bottlenecks:**
- Message queue delays
- Agent response times
- Coordination overhead
- Memory access patterns
- Inter-agent communication latency
**Processing Bottlenecks:**
- Task completion times
- Agent utilization rates
- Parallel execution efficiency
- Resource contention
- CPU/memory usage patterns
**Memory Bottlenecks:**
- Cache hit rates
- Memory access patterns
- Storage I/O performance
- Neural pattern loading times
- Memory allocation efficiency
**Network Bottlenecks:**
- API call latency
- MCP communication delays
- External service timeouts
- Concurrent request limits
- Network throughput issues
Output Format
๐ Bottleneck Analysis Report โโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐ Summary โโโ Time Range: Last 1 hour โโโ Agents Analyzed: 6 โโโ Tasks Processed: 42 โโโ Critical Issues: 2 ๐จ Critical Bottlenecks 1. Agent Communication (35% impact) โโโ coordinator โ coder-1 messages delayed by 2.3s avg 2. Memory Access (28% impact) โโโ Neural pattern loading taking 1.8s per access โ ๏ธ Warning Bottlenecks 1. Task Queue (18% impact) โโโ 5 tasks waiting > 10s for assignment ๐ก Recommendations 1. Switch to hierarchical topology (est. 40% improvement) 2. Enable memory caching (est. 25% improvement) 3. Increase agent concurrency to 8 (est. 20% improvement) โ Quick Fixes Available Run with --fix to apply: - Enable smart caching - Optimize message routing - Adjust agent priorities
2. Performance Profiling
Real-time Detection
Automatic analysis during task execution:
- Execution time vs. complexity
- Agent utilization rates
- Resource constraints
- Operation patterns
Common Bottleneck Patterns
**Time Bottlenecks:**
- Tasks taking > 5 minutes
- Sequential operations that could parallelize
- Redundant file operations
- Inefficient algorithm implementations
**Coordination Bottlenecks:**
- Single agent for complex tasks
- Unbalanced agent workloads
- Poor topology selection
- Excessive synchronization points
**Resource Bottlenecks:**
- High operation count (> 100)
- Memory constraints
- I/O limitations
- Thread pool saturation
MCP Integration
// Check for bottlenecks in Claude Code
mcp__claude-flow__bottleneck_detect({
timeRange: "1h",
threshold: 20,
autoFix: false
})
// Get detailed task results with bottleneck analysis
mcp__claude-flow__task_results({
taskId: "task-123",
format: "detailed"
})**Result Format:**
{
"bottlenecks": [
{
"type": "coordination",
"severity": "high",
"description": "Single agent used for complex task",
"recommendation": "Spawn specialized agents for parallel work",
"impact": "35%",
"affectedComponents": ["coordinator", "coder-1"]
}
],
"improvements": [
{
"area": "execution_time",
"suggestion": "Use parallel task execution",
"expectedImprovement": "30-50% time reduction",
"implementationSteps": [
"Split task into smaller units",
"Spawn 3-4 specialized agents",
"Use mesh topology for coordination"
]
}
],
"metrics": {
"avgExecutionTime": "142s",
"agentUtilization": "67%",
"cacheHitRate": "82%",
"parallelizationFactor": 1.2
}
}3. Report Generation
Command Syntax
npx claude-flow analysis performance-report [options]
Options
- `--format <type>` - Report format: json, html, markdown (default: markdown)
- `--include-metrics` - Include detailed metrics and charts
- `--compare <id>` - Compare with previous swarm
- `--time-range <range>` - Analysis period: 1h, 24h, 7d, 30d, all
- `--output <file>` - Output file path
- `--sections <list>` - Comma-separated sections to include
Report Sections
1. **Executive Summary**
- Overall performance score
- Key metrics overview
- Critical findings
2. **Swarm Overview**
- Topology
An agent meta-harness for Claude Code and Codex. Agent = Model + Harness. The model writes; the harness gives it tools, memory, loops, sandboxes, and controls so it can actually work.
Repo: ruvnet/claude-flow
Other skills on claude-flow.
- /agentdb-advanced
Master advanced AgentDB features including QUIC synchronization, multi-database management, custom distance metrics, hybrid search, and distributed systems integration. Use when building distributed AI systems, multi-agent coordination, or advanced vector search applications.
Open skill - /agentdb-learning
Create and train AI learning plugins with AgentDB's 9 reinforcement learning algorithms. Includes Decision Transformer, Q-Learning, SARSA, Actor-Critic, and more. Use when building self-learning agents, implementing RL, or optimizing agent behavior through experience.
Open skill - /agentdb-memory-patterns
Implement persistent memory patterns for AI agents using AgentDB. Includes session memory, long-term storage, pattern learning, and context management. Use when building stateful agents, chat systems, or intelligent assistants.
Open skill - /agentdb-optimization
Optimize AgentDB performance with quantization (4-32x memory reduction), HNSW indexing (150x faster search), caching, and batch operations. Use when optimizing memory usage, improving search speed, or scaling to millions of vectors.
Open skill - /agentdb-vector-search
Implement semantic vector search with AgentDB for intelligent document retrieval, similarity matching, and context-aware querying. Use when building RAG systems, semantic search engines, or intelligent knowledge bases.
Open skill - /agentic-jujutsu
Quantum-resistant, self-learning version control for AI agents with ReasoningBank intelligence and multi-agent coordination
Open skill

