[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74AR40S3ACMZG3DPWH6WMA5":3,"skill-same:01M74AR40S3ACMZG3DPWH6WMA5":43},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":28,"install":29,"resources":42},"01M74AR40S3ACMZG3DPWH6WMA5","performance-analysis",null,"Comprehensive performance analysis, bottleneck detection, and optimization recommendations for Claude Flow swarms","aicreator350\u002FaurionOFFICIELLE","aicreator350","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F217751428?v=4","01M731QVHB22WCM6PDX5VFN1RV","01M731QVJ0TAD058M1SW9MY548",0,"MIT","https:\u002F\u002Fgithub.com\u002Faicreator350\u002FaurionOFFICIELLE\u002Fblob\u002Fmain\u002F.claude\u002F_archive\u002Fskills-batch2\u002Fperformance-analysis\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: performance-analysis\ndescription: |\n  Comprehensive performance analysis, bottleneck detection, and optimization recommendations for Claude Flow swarms\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,"description":7},"main","5593cf3c72898ea9fc67225d452fe38f866ba6dd",".claude\u002F_archive\u002Fskills-batch2\u002Fperformance-analysis","https:\u002F\u002Fgithub.com\u002Faicreator350\u002FaurionOFFICIELLE","https:\u002F\u002Fgithub.com\u002Faicreator350","2026-05-18 03:39:30",{"source":8,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add aicreator350\u002FaurionOFFICIELLE --skill performance-analysis",{"tool":35,"command":36},"bunx","bunx skills add aicreator350\u002FaurionOFFICIELLE --skill performance-analysis",{"tool":38,"command":39},"pnpm","pnpm dlx skills add aicreator350\u002FaurionOFFICIELLE --skill performance-analysis","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Faicreator350\u002FaurionOFFICIELLE\u002Fblob\u002Fmain\u002F.claude\u002F_archive\u002Fskills-batch2\u002Fperformance-analysis\u002FSKILL.md",true,[],[44,53,60,67,74,81],{"skillNo":45,"name":46,"nameZh":6,"description":47,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":48,"licenseFileUrl":49,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":18},"01M74CAJWR9WB6DX1HF2V461Y0","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Faicreator350\u002FaurionOFFICIELLE\u002Fblob\u002Fmain\u002Fskills\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Faicreator350\u002FaurionOFFICIELLE\u002Fblob\u002Fmain\u002Fskills\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":18},"01M74CAFWC2H75GJ81B39C9RSW","web-design-guidelines","Review UI code for Web Interface Guidelines compliance. Use when asked to \"review my UI\", \"check accessibility\", \"audit design\", \"review UX\", or \"check my site against best practices\".","https:\u002F\u002Fgithub.com\u002Faicreator350\u002FaurionOFFICIELLE\u002Fblob\u002Fmain\u002Fskills\u002Fweb-design-guidelines\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":18},"01M74CA9N2HTGCKJ93AE9NQMHA","vercel-react-view-transitions","Guide for implementing smooth, native-feeling animations using React's View Transition API (`\u003CViewTransition>` component, `addTransitionType`, and CSS view transition pseudo-elements). Use this skill whenever the user wants to add page transitions, animate route changes, create shared element animations, animate enter\u002Fexit of components, animate list reorder, implement directional (forward\u002Fback) navigation animations, or integrate view transitions in Next.js. Also use when the user mentions view transitions, `startViewTransition`, `ViewTransition`, transition types, or asks about animating between UI states in React without third-party animation libraries.","https:\u002F\u002Fgithub.com\u002Faicreator350\u002FaurionOFFICIELLE\u002Fblob\u002Fmain\u002Fskills\u002Fvercel-react-view-transitions\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":18},"01M74CA364D4EVDXZZQRVK1Z73","vercel-react-best-practices","React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React\u002FNext.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.","https:\u002F\u002Fgithub.com\u002Faicreator350\u002FaurionOFFICIELLE\u002Fblob\u002Fmain\u002Fskills\u002Fvercel-react-best-practices\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":18},"01M74C9YQZX1GVS18V0AYCYPZE","vercel-composition-patterns","React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.","https:\u002F\u002Fgithub.com\u002Faicreator350\u002FaurionOFFICIELLE\u002Fblob\u002Fmain\u002Fskills\u002Fvercel-composition-patterns\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":18},"01M74C9SEYD6F764Q1JACZX3A6","vercel-cli-with-tokens","Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. \"deploy to vercel\", \"set up vercel\", \"add environment variables to vercel\".","https:\u002F\u002Fgithub.com\u002Faicreator350\u002FaurionOFFICIELLE\u002Fblob\u002Fmain\u002Fskills\u002Fvercel-cli-with-tokens\u002FSKILL.md",[],[]]