[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EX4Q4KC7WVJ3F73N0V41M1":3,"skill-same:01M6EX4Q4KC7WVJ3F73N0V41M1":75},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":37,"linkOnly":38,"markdownContent":39,"markdownBody":40,"frontMatter":41,"refName":46,"commitSha":47,"skillDirectory":48,"forksCount":49,"repositoryHtmlUrl":50,"repositoryHomepageUrl":51,"ownerHtmlUrl":52,"ownerBlogUrl":6,"ownerDescription":53,"updatedAt":54,"install":55,"resources":68},"01M6EX4Q4KC7WVJ3F73N0V41M1","performance-analysis",null,"Comprehensive performance analysis, bottleneck detection, and optimization recommendations for Claude Flow swarms","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fruvnet\u002Fperformance-analysis\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36],"performance","analysis","performance analysis","optimization recommendations","metrics","monitoring","Optimization","flow","detection","team","profiling","bottleneck","recommendations","2026-11-10 10:12:30",false,"---\nname: performance-analysis\nversion: 1.0.0\ndescription: Comprehensive performance analysis, bottleneck detection, and optimization recommendations for Claude Flow swarms\ncategory: monitoring\ntags: [performance, bottleneck, optimization, profiling, metrics, analysis]\nauthor: Claude Flow Team\n---\n\n# Performance Analysis Skill\n\nComprehensive performance analysis suite for identifying bottlenecks, profiling swarm operations, generating detailed reports, and providing actionable optimization recommendations.\n\n## Overview\n\nThis skill consolidates all performance analysis capabilities:\n- **Bottleneck Detection**: Identify performance bottlenecks across communication, processing, memory, and network\n- **Performance Profiling**: Real-time monitoring and historical analysis of swarm operations\n- **Report Generation**: Create comprehensive performance reports in multiple formats\n- **Optimization Recommendations**: AI-powered suggestions for improving performance\n\n## Quick Start\n\n### Basic Bottleneck Detection\n```bash\nnpx claude-flow bottleneck detect\n```\n\n### Generate Performance Report\n```bash\nnpx claude-flow analysis performance-report --format html --include-metrics\n```\n\n### Analyze and Auto-Fix\n```bash\nnpx claude-flow bottleneck detect --fix --threshold 15\n```\n\n## Core Capabilities\n\n### 1. Bottleneck Detection\n\n#### Command Syntax\n```bash\nnpx claude-flow bottleneck detect [options]\n```\n\n#### Options\n- `--swarm-id, -s \u003Cid>` - Analyze specific swarm (default: current)\n- `--time-range, -t \u003Crange>` - Analysis period: 1h, 24h, 7d, all (default: 1h)\n- `--threshold \u003Cpercent>` - Bottleneck threshold percentage (default: 20)\n- `--export, -e \u003Cfile>` - Export analysis to file\n- `--fix` - Apply automatic optimizations\n\n#### Usage Examples\n```bash\n# Basic detection for current swarm\nnpx claude-flow bottleneck detect\n\n# Analyze specific swarm over 24 hours\nnpx claude-flow bottleneck detect --swarm-id swarm-123 -t 24h\n\n# Export detailed analysis\nnpx claude-flow bottleneck detect -t 24h -e bottlenecks.json\n\n# Auto-fix detected issues\nnpx claude-flow bottleneck detect --fix --threshold 15\n\n# Low threshold for sensitive detection\nnpx claude-flow bottleneck detect --threshold 10 --export critical-issues.json\n```\n\n#### Metrics Analyzed\n\n**Communication Bottlenecks:**\n- Message queue delays\n- Agent response times\n- Coordination overhead\n- Memory access patterns\n- Inter-agent communication latency\n\n**Processing Bottlenecks:**\n- Task completion times\n- Agent utilization rates\n- Parallel execution efficiency\n- Resource contention\n- CPU\u002Fmemory usage patterns\n\n**Memory Bottlenecks:**\n- Cache hit rates\n- Memory access patterns\n- Storage I\u002FO performance\n- Neural pattern loading times\n- Memory allocation efficiency\n\n**Network Bottlenecks:**\n- API call latency\n- MCP communication delays\n- External service timeouts\n- Concurrent request limits\n- Network throughput issues\n\n#### Output Format\n```\n? Bottleneck Analysis Report\n━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n? Summary\n├── Time Range: Last 1 hour\n├── Agents Analyzed: 6\n├── Tasks Processed: 42\n└── Critical Issues: 2\n\n? Critical Bottlenecks\n1. Agent Communication (35% impact)\n   └── coordinator → coder-1 messages delayed by 2.3s avg\n\n2. Memory Access (28% impact)\n   └── Neural pattern loading taking 1.8s per access\n\n⚠️ Warning Bottlenecks\n1. Task Queue (18% impact)\n   └── 5 tasks waiting > 10s for assignment\n\n? Recommendations\n1. Switch to hierarchical topology (est. 40% improvement)\n2. Enable memory caching (est. 25% improvement)\n3. Increase agent concurrency to 8 (est. 20% improvement)\n\n✅ Quick Fixes Available\nRun with --fix to apply:\n- Enable smart caching\n- Optimize message routing\n- Adjust agent priorities\n```\n\n### 2. Performance Profiling\n\n#### Real-time Detection\nAutomatic analysis during task execution:\n- Execution time vs. complexity\n- Agent utilization rates\n- Resource constraints\n- Operation patterns\n\n#### Common Bottleneck Patterns\n\n**Time Bottlenecks:**\n- Tasks taking > 5 minutes\n- Sequential operations that could parallelize\n- Redundant file operations\n- Inefficient algorithm implementations\n\n**Coordination Bottlenecks:**\n- Single agent for complex tasks\n- Unbalanced agent workloads\n- Poor topology selection\n- Excessive synchronization points\n\n**Resource Bottlenecks:**\n- High operation count (> 100)\n- Memory constraints\n- I\u002FO limitations\n- Thread pool saturation\n\n#### MCP Integration\n```javascript\n\u002F\u002F Check for bottlenecks in Claude Code\nmcp__claude-flow__bottleneck_detect({\n  timeRange: \"1h\",\n  threshold: 20,\n  autoFix: false\n})\n\n\u002F\u002F Get detailed task results with bottleneck analysis\nmcp__claude-flow__task_results({\n  taskId: \"task-123\",\n  format: \"detailed\"\n})\n```\n\n**Result Format:**\n```json\n{\n  \"bottlenecks\": [\n    {\n      \"type\": \"coordination\",\n      \"severity\": \"high\",\n      \"description\": \"Single agent used for complex task\",\n      \"recommendation\": \"Spawn specialized agents for parallel work\",\n      \"impact\": \"35%\",\n      \"affectedComponents\": [\"coordinator\", \"coder-1\"]\n    }\n  ],\n  \"improvements\": [\n    {\n      \"area\": \"execution_time\",\n      \"suggestion\": \"Use parallel task execution\",\n      \"expectedImprovement\": \"30-50% time reduction\",\n      \"implementationSteps\": [\n        \"Split task into smaller units\",\n        \"Spawn 3-4 specialized agents\",\n        \"Use mesh topology for coordination\"\n      ]\n    }\n  ],\n  \"metrics\": {\n    \"avgExecutionTime\": \"142s\",\n    \"agentUtilization\": \"67%\",\n    \"cacheHitRate\": \"82%\",\n    \"parallelizationFactor\": 1.2\n  }\n}\n```\n\n### 3. Report Generation\n\n#### Command Syntax\n```bash\nnpx claude-flow analysis performance-report [options]\n```\n\n#### Options\n- `--format \u003Ctype>` - Report format: json, html, markdown (default: markdown)\n- `--include-metrics` - Include detailed metrics and charts\n- `--compare \u003Cid>` - Compare with previous swarm\n- `--time-range \u003Crange>` - Analysis period: 1h, 24h, 7d, 30d, all\n- `--output \u003Cfile>` - Output file path\n- `--sections \u003Clist>` - Comma-separated sections to include\n\n#### Report Sections\n1. **Executive Summary**\n   - Overall performance score\n   - Key metrics overview\n   - Critical findings\n\n2. **Swarm Overview**\n   - Topology configuration\n   - Agent distribution\n   - Task statistics\n\n3. **Performance Metrics**\n   - Execution times\n   - Throughput analysis\n   - Resource utilization\n   - Latency breakdown\n\n4. **Bottleneck Analysis**\n   - Identified bottlenecks\n   - Impact assessment\n   - Optimization priorities\n\n5. **Comparative Analysis** (when --compare used)\n   - Performance trends\n   - Improvement metrics\n   - Regression detection\n\n6. **Recommendations**\n   - Prioritized action items\n   - Expected improvements\n   - Implementation guidance\n\n#### Usage Examples\n```bash\n# Generate HTML report with all metrics\nnpx claude-flow analysis performance-report --format html --include-metrics\n\n# Compare current swarm with previous\nnpx claude-flow analysis performance-report --compare swarm-123 --format markdown\n\n# Custom output with specific sections\nnpx claude-flow analysis performance-report \\\n  --sections summary,metrics,recommendations \\\n  --output reports\u002Fperf-analysis.html \\\n  --format html\n\n# Weekly performance report\nnpx claude-flow analysis performance-report \\\n  --time-range 7d \\\n  --include-metrics \\\n  --format markdown \\\n  --output docs\u002Fweekly-performance.md\n\n# JSON format for CI\u002FCD integration\nnpx claude-flow analysis performance-report \\\n  --format json \\\n  --output build\u002Fperformance.json\n```\n\n#### Sample Markdown Report\n```markdown\n# Performance Analysis Report\n\n## Executive Summary\n- **Overall Score**: 87\u002F100\n- **Analysis Period**: Last 24 hours\n- **Swarms Analyzed**: 3\n- **Critical Issues**: 1\n\n## Key Metrics\n| Metric | Value | Trend | Target |\n|--------|-------|-------|--------|\n| Avg Task Time | 42s | ↓ 12% | 35s |\n| Agent Utilization | 78% | ↑ 5% | 85% |\n| Cache Hit Rate | 91% | → | 90% |\n| Parallel Efficiency | 2.3x | ↑ 0.4x | 2.5x |\n\n## Bottleneck Analysis\n### Critical\n1. **Agent Communication Delay** (Impact: 35%)\n   - Coordinator → Coder messages delayed by 2.3s avg\n   - **Fix**: Switch to hierarchical topology\n\n### Warnings\n1. **Memory Access Pattern** (Impact: 18%)\n   - Neural pattern loading: 1.8s per access\n   - **Fix**: Enable memory caching\n\n## Recommendations\n1. **High Priority**: Switch to hierarchical topology (40% improvement)\n2. **Medium Priority**: Enable memory caching (25% improvement)\n3. **Low Priority**: Increase agent concurrency to 8 (20% improvement)\n```\n\n### 4. Optimization Recommendations\n\n#### Automatic Fixes\nWhen using `--fix`, the following optimizations may be applied:\n\n**1. Topology Optimization**\n- Switch to more efficient topology (mesh → hierarchical)\n- Adjust communication patterns\n- Reduce coordination overhead\n- Optimize message routing\n\n**2. Caching Enhancement**\n- Enable memory caching\n- Optimize cache strategies\n- Preload common patterns\n- Implement cache warming\n\n**3. Concurrency Tuning**\n- Adjust agent counts\n- Optimize parallel execution\n- Balance workload distribution\n- Implement load balancing\n\n**4. Priority Adjustment**\n- Reorder task queues\n- Prioritize critical paths\n- Reduce wait times\n- Implement fair scheduling\n\n**5. Resource Optimization**\n- Optimize memory usage\n- Reduce I\u002FO operations\n- Batch API calls\n- Implement connection pooling\n\n#### Performance Impact\nTypical improvements after bottleneck resolution:\n\n- **Communication**: 30-50% faster message delivery\n- **Processing**: 20-40% reduced task completion time\n- **Memory**: 40-60% fewer cache misses\n- **Network**: 25-45% reduced API latency\n- **Overall**: 25-45% total performance improvement\n\n## Advanced Usage\n\n### Continuous Monitoring\n```bash\n# Monitor performance in real-time\nnpx claude-flow swarm monitor --interval 5\n\n# Generate hourly reports\nwhile true; do\n  npx claude-flow analysis performance-report \\\n    --format json \\\n    --output logs\u002Fperf-$(date +%Y%m%d-%H%M).json\n  sleep 3600\ndone\n```\n\n### CI\u002FCD Integration\n```yaml\n# .github\u002Fworkflows\u002Fperformance.yml\nname: Performance Analysis\non: [push, pull_request]\n\njobs:\n  analyze:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v2\n      - name: Run Performance Analysis\n        run: |\n          npx claude-flow analysis performance-report \\\n            --format json \\\n            --output performance.json\n      - name: Check Performance Thresholds\n        run: |\n          npx claude-flow bottleneck detect \\\n            --threshold 15 \\\n            --export bottlenecks.json\n      - name: Upload Reports\n        uses: actions\u002Fupload-artifact@v2\n        with:\n          name: performance-reports\n          path: |\n            performance.json\n            bottlenecks.json\n```\n\n### Custom Analysis Scripts\n```javascript\n\u002F\u002F scripts\u002Fanalyze-performance.js\nconst { exec } = require('child_process');\nconst fs = require('fs');\n\nasync function analyzePerformance() {\n  \u002F\u002F Run bottleneck detection\n  const bottlenecks = await runCommand(\n    'npx claude-flow bottleneck detect --format json'\n  );\n\n  \u002F\u002F Generate performance report\n  const report = await runCommand(\n    'npx claude-flow analysis performance-report --format json'\n  );\n\n  \u002F\u002F Analyze results\n  const analysis = {\n    bottlenecks: JSON.parse(bottlenecks),\n    performance: JSON.parse(report),\n    timestamp: new Date().toISOString()\n  };\n\n  \u002F\u002F Save combined analysis\n  fs.writeFileSync(\n    'analysis\u002Fcombined-report.json',\n    JSON.stringify(analysis, null, 2)\n  );\n\n  \u002F\u002F Generate alerts if needed\n  if (analysis.bottlenecks.critical.length > 0) {\n    console.error('CRITICAL: Performance bottlenecks detected!');\n    process.exit(1);\n  }\n}\n\nfunction runCommand(cmd) {\n  return new Promise((resolve, reject) => {\n    exec(cmd, (error, stdout, stderr) => {\n      if (error) reject(error);\n      else resolve(stdout);\n    });\n  });\n}\n\nanalyzePerformance().catch(console.error);\n```\n\n## Best Practices\n\n### 1. Regular Analysis\n- Run bottleneck detection after major changes\n- Generate weekly performance reports\n- Monitor trends over time\n- Set up automated alerts\n\n### 2. Threshold Tuning\n- Start with default threshold (20%)\n- Lower for production systems (10-15%)\n- Higher for development (25-30%)\n- Adjust based on requirements\n\n### 3. Fix Strategy\n- Always review before applying --fix\n- Test fixes in development first\n- Apply fixes incrementally\n- Monitor impact after changes\n\n### 4. Report Integration\n- Include in documentation\n- Share with team regularly\n- Track improvements over time\n- Use for capacity planning\n\n### 5. Continuous Optimization\n- Learn from each analysis\n- Build performance budgets\n- Establish baselines\n- Set improvement goals\n\n## Troubleshooting\n\n### Common Issues\n\n**High Memory Usage**\n```bash\n# Analyze memory bottlenecks\nnpx claude-flow bottleneck detect --threshold 10\n\n# Check cache performance\nnpx claude-flow cache manage --action stats\n\n# Review memory metrics\nnpx claude-flow memory usage\n```\n\n**Slow Task Execution**\n```bash\n# Identify slow tasks\nnpx claude-flow task status --detailed\n\n# Analyze coordination overhead\nnpx claude-flow bottleneck detect --time-range 1h\n\n# Check agent utilization\nnpx claude-flow agent metrics\n```\n\n**Poor Cache Performance**\n```bash\n# Analyze cache hit rates\nnpx claude-flow analysis performance-report --sections metrics\n\n# Review cache strategy\nnpx claude-flow cache manage --action analyze\n\n# Enable cache warming\nnpx claude-flow bottleneck detect --fix\n```\n\n## Integration with Other Skills\n\n- **swarm-orchestration**: Use performance data to optimize topology\n- **memory-management**: Improve cache strategies based on analysis\n- **task-coordination**: Adjust scheduling based on bottlenecks\n- **neural-training**: Train patterns from performance data\n\n## Related Commands\n\n- `npx claude-flow swarm monitor` - Real-time monitoring\n- `npx claude-flow token usage` - Token optimization analysis\n- `npx claude-flow cache manage` - Cache optimization\n- `npx claude-flow agent metrics` - Agent performance metrics\n- `npx claude-flow task status` - Task execution analysis\n\n## See Also\n\n- [Bottleneck Detection Guide](\u002Fworkspaces\u002Fclaude-code-flow\u002F.claude\u002Fcommands\u002Fanalysis\u002Fbottleneck-detect.md)\n- [Performance Report Guide](\u002Fworkspaces\u002Fclaude-code-flow\u002F.claude\u002Fcommands\u002Fanalysis\u002Fperformance-report.md)\n- [Performance Bottlenecks Overview](\u002Fworkspaces\u002Fclaude-code-flow\u002F.claude\u002Fcommands\u002Fanalysis\u002Fperformance-bottlenecks.md)\n- [Swarm Monitoring Documentation](..\u002Fswarm-orchestration\u002FSKILL.md)\n- [Memory Management Documentation](..\u002Fmemory-management\u002FSKILL.md)\n\n---\n\n**Version**: 1.0.0\n**Last Updated**: 2025-10-19\n**Maintainer**: Claude Flow Team\n","# Performance Analysis Skill\n\nComprehensive performance analysis suite for identifying bottlenecks, profiling swarm operations, generating detailed reports, and providing actionable optimization recommendations.\n\n## Overview\n\nThis skill consolidates all performance analysis capabilities:\n- **Bottleneck Detection**: Identify performance bottlenecks across communication, processing, memory, and network\n- **Performance Profiling**: Real-time monitoring and historical analysis of swarm operations\n- **Report Generation**: Create comprehensive performance reports in multiple formats\n- **Optimization Recommendations**: AI-powered suggestions for improving performance\n\n## Quick Start\n\n### Basic Bottleneck Detection\n```bash\nnpx claude-flow bottleneck detect\n```\n\n### Generate Performance Report\n```bash\nnpx claude-flow analysis performance-report --format html --include-metrics\n```\n\n### Analyze and Auto-Fix\n```bash\nnpx claude-flow bottleneck detect --fix --threshold 15\n```\n\n## Core Capabilities\n\n### 1. Bottleneck Detection\n\n#### Command Syntax\n```bash\nnpx claude-flow bottleneck detect [options]\n```\n\n#### Options\n- `--swarm-id, -s \u003Cid>` - Analyze specific swarm (default: current)\n- `--time-range, -t \u003Crange>` - Analysis period: 1h, 24h, 7d, all (default: 1h)\n- `--threshold \u003Cpercent>` - Bottleneck threshold percentage (default: 20)\n- `--export, -e \u003Cfile>` - Export analysis to file\n- `--fix` - Apply automatic optimizations\n\n#### Usage Examples\n```bash\n# Basic detection for current swarm\nnpx claude-flow bottleneck detect\n\n# Analyze specific swarm over 24 hours\nnpx claude-flow bottleneck detect --swarm-id swarm-123 -t 24h\n\n# Export detailed analysis\nnpx claude-flow bottleneck detect -t 24h -e bottlenecks.json\n\n# Auto-fix detected issues\nnpx claude-flow bottleneck detect --fix --threshold 15\n\n# Low threshold for sensitive detection\nnpx claude-flow bottleneck detect --threshold 10 --export critical-issues.json\n```\n\n#### Metrics Analyzed\n\n**Communication Bottlenecks:**\n- Message queue delays\n- Agent response times\n- Coordination overhead\n- Memory access patterns\n- Inter-agent communication latency\n\n**Processing Bottlenecks:**\n- Task completion times\n- Agent utilization rates\n- Parallel execution efficiency\n- Resource contention\n- CPU\u002Fmemory usage patterns\n\n**Memory Bottlenecks:**\n- Cache hit rates\n- Memory access patterns\n- Storage I\u002FO performance\n- Neural pattern loading times\n- Memory allocation efficiency\n\n**Network Bottlenecks:**\n- API call latency\n- MCP communication delays\n- External service timeouts\n- Concurrent request limits\n- Network throughput issues\n\n#### Output Format\n```\n? Bottleneck Analysis Report\n━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n? Summary\n├── Time Range: Last 1 hour\n├── Agents Analyzed: 6\n├── Tasks Processed: 42\n└── Critical Issues: 2\n\n? Critical Bottlenecks\n1. Agent Communication (35% impact)\n   └── coordinator → coder-1 messages delayed by 2.3s avg\n\n2. Memory Access (28% impact)\n   └── Neural pattern loading taking 1.8s per access\n\n⚠️ Warning Bottlenecks\n1. Task Queue (18% impact)\n   └── 5 tasks waiting > 10s for assignment\n\n? Recommendations\n1. Switch to hierarchical topology (est. 40% improvement)\n2. Enable memory caching (est. 25% improvement)\n3. Increase agent concurrency to 8 (est. 20% improvement)\n\n✅ Quick Fixes Available\nRun with --fix to apply:\n- Enable smart caching\n- Optimize message routing\n- Adjust agent priorities\n```\n\n### 2. Performance Profiling\n\n#### Real-time Detection\nAutomatic analysis during task execution:\n- Execution time vs. complexity\n- Agent utilization rates\n- Resource constraints\n- Operation patterns\n\n#### Common Bottleneck Patterns\n\n**Time Bottlenecks:**\n- Tasks taking > 5 minutes\n- Sequential operations that could parallelize\n- Redundant file operations\n- Inefficient algorithm implementations\n\n**Coordination Bottlenecks:**\n- Single agent for complex tasks\n- Unbalanced agent workloads\n- Poor topology selection\n- Excessive synchronization points\n\n**Resource Bottlenecks:**\n- High operation count (> 100)\n- Memory constraints\n- I\u002FO limitations\n- Thread pool saturation\n\n#### MCP Integration\n```javascript\n\u002F\u002F Check for bottlenecks in Claude Code\nmcp__claude-flow__bottleneck_detect({\n  timeRange: \"1h\",\n  threshold: 20,\n  autoFix: false\n})\n\n\u002F\u002F Get detailed task results with bottleneck analysis\nmcp__claude-flow__task_results({\n  taskId: \"task-123\",\n  format: \"detailed\"\n})\n```\n\n**Result Format:**\n```json\n{\n  \"bottlenecks\": [\n    {\n      \"type\": \"coordination\",\n      \"severity\": \"high\",\n      \"description\": \"Single agent used for complex task\",\n      \"recommendation\": \"Spawn specialized agents for parallel work\",\n      \"impact\": \"35%\",\n      \"affectedComponents\": [\"coordinator\", \"coder-1\"]\n    }\n  ],\n  \"improvements\": [\n    {\n      \"area\": \"execution_time\",\n      \"suggestion\": \"Use parallel task execution\",\n      \"expectedImprovement\": \"30-50% time reduction\",\n      \"implementationSteps\": [\n        \"Split task into smaller units\",\n        \"Spawn 3-4 specialized agents\",\n        \"Use mesh topology for coordination\"\n      ]\n    }\n  ],\n  \"metrics\": {\n    \"avgExecutionTime\": \"142s\",\n    \"agentUtilization\": \"67%\",\n    \"cacheHitRate\": \"82%\",\n    \"parallelizationFactor\": 1.2\n  }\n}\n```\n\n### 3. Report Generation\n\n#### Command Syntax\n```bash\nnpx claude-flow analysis performance-report [options]\n```\n\n#### Options\n- `--format \u003Ctype>` - Report format: json, html, markdown (default: markdown)\n- `--include-metrics` - Include detailed metrics and charts\n- `--compare \u003Cid>` - Compare with previous swarm\n- `--time-range \u003Crange>` - Analysis period: 1h, 24h, 7d, 30d, all\n- `--output \u003Cfile>` - Output file path\n- `--sections \u003Clist>` - Comma-separated sections to include\n\n#### Report Sections\n1. **Executive Summary**\n   - Overall performance score\n   - Key metrics overview\n   - Critical findings\n\n2. **Swarm Overview**\n   - Topology configuration\n   - Agent distribution\n   - Task statistics\n\n3. **Performance Metrics**\n   - Execution times\n   - Throughput analysis\n   - Resource utilization\n   - Latency breakdown\n\n4. **Bottleneck Analysis**\n   - Identified bottlenecks\n   - Impact assessment\n   - Optimization priorities\n\n5. **Comparative Analysis** (when --compare used)\n   - Performance trends\n   - Improvement metrics\n   - Regression detection\n\n6. **Recommendations**\n   - Prioritized action items\n   - Expected improvements\n   - Implementation guidance\n\n#### Usage Examples\n```bash\n# Generate HTML report with all metrics\nnpx claude-flow analysis performance-report --format html --include-metrics\n\n# Compare current swarm with previous\nnpx claude-flow analysis performance-report --compare swarm-123 --format markdown\n\n# Custom output with specific sections\nnpx claude-flow analysis performance-report \\\n  --sections summary,metrics,recommendations \\\n  --output reports\u002Fperf-analysis.html \\\n  --format html\n\n# Weekly performance report\nnpx claude-flow analysis performance-report \\\n  --time-range 7d \\\n  --include-metrics \\\n  --format markdown \\\n  --output docs\u002Fweekly-performance.md\n\n# JSON format for CI\u002FCD integration\nnpx claude-flow analysis performance-report \\\n  --format json \\\n  --output build\u002Fperformance.json\n```\n\n#### Sample Markdown Report\n```markdown\n# Performance Analysis Report\n\n## Executive Summary\n- **Overall Score**: 87\u002F100\n- **Analysis Period**: Last 24 hours\n- **Swarms Analyzed**: 3\n- **Critical Issues**: 1\n\n## Key Metrics\n| Metric | Value | Trend | Target |\n|--------|-------|-------|--------|\n| Avg Task Time | 42s | ↓ 12% | 35s |\n| Agent Utilization | 78% | ↑ 5% | 85% |\n| Cache Hit Rate | 91% | → | 90% |\n| Parallel Efficiency | 2.3x | ↑ 0.4x | 2.5x |\n\n## Bottleneck Analysis\n### Critical\n1. **Agent Communication Delay** (Impact: 35%)\n   - Coordinator → Coder messages delayed by 2.3s avg\n   - **Fix**: Switch to hierarchical topology\n\n### Warnings\n1. **Memory Access Pattern** (Impact: 18%)\n   - Neural pattern loading: 1.8s per access\n   - **Fix**: Enable memory caching\n\n## Recommendations\n1. **High Priority**: Switch to hierarchical topology (40% improvement)\n2. **Medium Priority**: Enable memory caching (25% improvement)\n3. **Low Priority**: Increase agent concurrency to 8 (20% improvement)\n```\n\n### 4. Optimization Recommendations\n\n#### Automatic Fixes\nWhen using `--fix`, the following optimizations may be applied:\n\n**1. Topology Optimization**\n- Switch to more efficient topology (mesh → hierarchical)\n- Adjust communication patterns\n- Reduce coordination overhead\n- Optimize message routing\n\n**2. Caching Enhancement**\n- Enable memory caching\n- Optimize cache strategies\n- Preload common patterns\n- Implement cache warming\n\n**3. Concurrency Tuning**\n- Adjust agent counts\n- Optimize parallel execution\n- Balance workload distribution\n- Implement load balancing\n\n**4. Priority Adjustment**\n- Reorder task queues\n- Prioritize critical paths\n- Reduce wait times\n- Implement fair scheduling\n\n**5. Resource Optimization**\n- Optimize memory usage\n- Reduce I\u002FO operations\n- Batch API calls\n- Implement connection pooling\n\n#### Performance Impact\nTypical improvements after bottleneck resolution:\n\n- **Communication**: 30-50% faster message delivery\n- **Processing**: 20-40% reduced task completion time\n- **Memory**: 40-60% fewer cache misses\n- **Network**: 25-45% reduced API latency\n- **Overall**: 25-45% total performance improvement\n\n## Advanced Usage\n\n### Continuous Monitoring\n```bash\n# Monitor performance in real-time\nnpx claude-flow swarm monitor --interval 5\n\n# Generate hourly reports\nwhile true; do\n  npx claude-flow analysis performance-report \\\n    --format json \\\n    --output logs\u002Fperf-$(date +%Y%m%d-%H%M).json\n  sleep 3600\ndone\n```\n\n### CI\u002FCD Integration\n```yaml\n# .github\u002Fworkflows\u002Fperformance.yml\nname: Performance Analysis\non: [push, pull_request]\n\njobs:\n  analyze:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v2\n      - name: Run Performance Analysis\n        run: |\n          npx claude-flow analysis performance-report \\\n            --format json \\\n            --output performance.json\n      - name: Check Performance Thresholds\n        run: |\n          npx claude-flow bottleneck detect \\\n            --threshold 15 \\\n            --export bottlenecks.json\n      - name: Upload Reports\n        uses: actions\u002Fupload-artifact@v2\n        with:\n          name: performance-reports\n          path: |\n            performance.json\n            bottlenecks.json\n```\n\n### Custom Analysis Scripts\n```javascript\n\u002F\u002F scripts\u002Fanalyze-performance.js\nconst { exec } = require('child_process');\nconst fs = require('fs');\n\nasync function analyzePerformance() {\n  \u002F\u002F Run bottleneck detection\n  const bottlenecks = await runCommand(\n    'npx claude-flow bottleneck detect --format json'\n  );\n\n  \u002F\u002F Generate performance report\n  const report = await runCommand(\n    'npx claude-flow analysis performance-report --format json'\n  );\n\n  \u002F\u002F Analyze results\n  const analysis = {\n    bottlenecks: JSON.parse(bottlenecks),\n    performance: JSON.parse(report),\n    timestamp: new Date().toISOString()\n  };\n\n  \u002F\u002F Save combined analysis\n  fs.writeFileSync(\n    'analysis\u002Fcombined-report.json',\n    JSON.stringify(analysis, null, 2)\n  );\n\n  \u002F\u002F Generate alerts if needed\n  if (analysis.bottlenecks.critical.length > 0) {\n    console.error('CRITICAL: Performance bottlenecks detected!');\n    process.exit(1);\n  }\n}\n\nfunction runCommand(cmd) {\n  return new Promise((resolve, reject) => {\n    exec(cmd, (error, stdout, stderr) => {\n      if (error) reject(error);\n      else resolve(stdout);\n    });\n  });\n}\n\nanalyzePerformance().catch(console.error);\n```\n\n## Best Practices\n\n### 1. Regular Analysis\n- Run bottleneck detection after major changes\n- Generate weekly performance reports\n- Monitor trends over time\n- Set up automated alerts\n\n### 2. Threshold Tuning\n- Start with default threshold (20%)\n- Lower for production systems (10-15%)\n- Higher for development (25-30%)\n- Adjust based on requirements\n\n### 3. Fix Strategy\n- Always review before applying --fix\n- Test fixes in development first\n- Apply fixes incrementally\n- Monitor impact after changes\n\n### 4. Report Integration\n- Include in documentation\n- Share with team regularly\n- Track improvements over time\n- Use for capacity planning\n\n### 5. Continuous Optimization\n- Learn from each analysis\n- Build performance budgets\n- Establish baselines\n- Set improvement goals\n\n## Troubleshooting\n\n### Common Issues\n\n**High Memory Usage**\n```bash\n# Analyze memory bottlenecks\nnpx claude-flow bottleneck detect --threshold 10\n\n# Check cache performance\nnpx claude-flow cache manage --action stats\n\n# Review memory metrics\nnpx claude-flow memory usage\n```\n\n**Slow Task Execution**\n```bash\n# Identify slow tasks\nnpx claude-flow task status --detailed\n\n# Analyze coordination overhead\nnpx claude-flow bottleneck detect --time-range 1h\n\n# Check agent utilization\nnpx claude-flow agent metrics\n```\n\n**Poor Cache Performance**\n```bash\n# Analyze cache hit rates\nnpx claude-flow analysis performance-report --sections metrics\n\n# Review cache strategy\nnpx claude-flow cache manage --action analyze\n\n# Enable cache warming\nnpx claude-flow bottleneck detect --fix\n```\n\n## Integration with Other Skills\n\n- **swarm-orchestration**: Use performance data to optimize topology\n- **memory-management**: Improve cache strategies based on analysis\n- **task-coordination**: Adjust scheduling based on bottlenecks\n- **neural-training**: Train patterns from performance data\n\n## Related Commands\n\n- `npx claude-flow swarm monitor` - Real-time monitoring\n- `npx claude-flow token usage` - Token optimization analysis\n- `npx claude-flow cache manage` - Cache optimization\n- `npx claude-flow agent metrics` - Agent performance metrics\n- `npx claude-flow task status` - Task execution analysis\n\n## See Also\n\n- [Bottleneck Detection Guide](\u002Fworkspaces\u002Fclaude-code-flow\u002F.claude\u002Fcommands\u002Fanalysis\u002Fbottleneck-detect.md)\n- [Performance Report Guide](\u002Fworkspaces\u002Fclaude-code-flow\u002F.claude\u002Fcommands\u002Fanalysis\u002Fperformance-report.md)\n- [Performance Bottlenecks Overview](\u002Fworkspaces\u002Fclaude-code-flow\u002F.claude\u002Fcommands\u002Fanalysis\u002Fperformance-bottlenecks.md)\n- [Swarm Monitoring Documentation](..\u002Fswarm-orchestration\u002FSKILL.md)\n- [Memory Management Documentation](..\u002Fmemory-management\u002FSKILL.md)\n\n---\n\n**Version**: 1.0.0\n**Last Updated**: 2025-10-19\n**Maintainer**: Claude Flow Team\n",{"name":5,"tags":42,"author":44,"version":45,"category":29,"description":7},[24,35,43,34,28,25],"optimization","Claude Flow Team","1.0.0","main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002Fruvnet\u002Fperformance-analysis",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":56,"prompt":66,"zipAvailable":67},[57,60,63],{"tool":58,"command":59},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill performance-analysis",{"tool":61,"command":62},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill performance-analysis",{"tool":64,"command":65},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill performance-analysis","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fruvnet\u002Fperformance-analysis\u002FSKILL.md",true,[69],{"path":70,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":74},"skill-report.json","REFERENCE","参考文档",16987,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fruvnet\u002Fperformance-analysis\u002Fskill-report.json",[76,86,96,105,111,118],{"skillNo":77,"name":78,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":82,"publishedAt":37},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[81],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[83,84,85],"model","model hierarchy","model hierarchy skill",{"skillNo":87,"name":88,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":92,"publishedAt":37},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[91],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[93,94,95],"MCP","zoom","zoom mcp",{"skillNo":97,"name":98,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":37},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[102,103,104,94],"sdk","zoom apps sdk","apps",{"skillNo":106,"name":107,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":37},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[107],{"skillNo":112,"name":113,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":117,"publishedAt":37},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[116],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[113],{"skillNo":119,"name":120,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":37},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[120]]