[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BP1TTRTJS9F1MAB6VBDCZQ":3,"skill-same:01M7BP1TTRTJS9F1MAB6VBDCZQ":57},{"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":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":34,"commitSha":35,"skillDirectory":36,"forksCount":37,"repositoryHtmlUrl":38,"repositoryHomepageUrl":39,"ownerHtmlUrl":40,"ownerBlogUrl":6,"ownerDescription":41,"updatedAt":42,"install":43,"resources":56},"01M7BP1TTRTJS9F1MAB6VBDCZQ","performance-analysis",null,"Comprehensive performance analysis, bottleneck detection, and optimization recommendations for Claude Flow swarms","YYC-Cube\u002FYYC3-Knowledge-Base","YYC-Cube","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F235006543?v=4","01M79J2PH4SWD2X0825X6PN748","yyc3","01M79J2PHVK3F6ZBYT8K2SCZCW",1,"MIT","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Agent-智能体\u002FYYC3-Agent-智能体-ruflo\u002Fv2\u002F.claude\u002Fskills\u002Fperformance-analysis\u002FSKILL.md",[],[],"2026-11-15 14:19:17",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":24,"author":31,"version":32,"category":33,"description":7},[25,26,27,28,29,30],"performance","bottleneck","optimization","profiling","metrics","analysis","Claude Flow Team","1.0.0","monitoring","main","87afe6ce96220accf50a345dea46784c8c9f210e","YYC3-Agent-智能体\u002FYYC3-Agent-智能体-ruflo\u002Fv2\u002F.claude\u002Fskills\u002Fperformance-analysis",0,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base","https:\u002F\u002Fkb.yyc3.top\u002F","https:\u002F\u002Fgithub.com\u002FYYC-Cube","万象归元于云枢 | 深栈智启新纪元","2026-11-10 10:37:32",{"source":8,"skillName":5,"commands":44,"prompt":54,"zipAvailable":55},[45,48,51],{"tool":46,"command":47},"npx","npx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill performance-analysis",{"tool":49,"command":50},"bunx","bunx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill performance-analysis",{"tool":52,"command":53},"pnpm","pnpm dlx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill performance-analysis","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Agent-智能体\u002FYYC3-Agent-智能体-ruflo\u002Fv2\u002F.claude\u002Fskills\u002Fperformance-analysis\u002FSKILL.md",true,[],[58,65,72,79,86,93],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M7CTDWHERCXPQCP0K03A86AS","vercel-sandbox","Run agent-browser + Chrome inside Vercel Sandbox microVMs for browser automation from any Vercel-deployed app. Use when the user needs browser automation in a Vercel app (Next.js, SvelteKit, Nuxt, Remix, Astro, etc.), wants to run headless Chrome without binary size limits, needs persistent browser sessions across commands, or wants ephemeral isolated browser environments. Triggers include \"Vercel Sandbox browser\", \"microVM Chrome\", \"agent-browser in sandbox\", \"browser automation on Vercel\", or any task requiring Chrome in a Vercel Sandbox.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fvercel-sandbox\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7CTD8D2BNJY54S65M47HEJA","slack","Interact with Slack workspaces using browser automation. Use when the user needs to check unread channels, navigate Slack, send messages, extract data, find information, search conversations, or automate any Slack task. Triggers include \"check my Slack\", \"what channels have unreads\", \"send a message to\", \"search Slack for\", \"extract from Slack\", \"find who said\", or any task requiring programmatic Slack interaction.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fslack\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M7CTCSSB8ZP3Q58C3YZDZK1W","electron","Automate Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify, etc.) using agent-browser via Chrome DevTools Protocol. Use when the user needs to interact with an Electron app, automate a desktop app, connect to a running app, control a native app, or test an Electron application. Triggers include \"automate Slack app\", \"control VS Code\", \"interact with Discord app\", \"test this Electron app\", \"connect to desktop app\", or any task requiring automation of a native Electron application.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Felectron\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M7CTCBJY76688V4DCZGWFHGQ","dogfood","Systematically explore and test a web application to find bugs, UX issues, and other problems. Use when asked to \"dogfood\", \"QA\", \"exploratory test\", \"find issues\", \"bug hunt\", \"test this app\u002Fsite\u002Fplatform\", or review the quality of a web application. Produces a structured report with full reproduction evidence -- step-by-step screenshots, repro videos, and detailed repro steps for every issue -- so findings can be handed directly to the responsible teams.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fdogfood\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M7CTC4H0FFGVEAQR9PA4GA1A","agent-browser","Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to \"open a website\", \"fill out a form\", \"click a button\", \"take a screenshot\", \"scrape data from a page\", \"test this web app\", \"login to a site\", \"automate browser actions\", or any task requiring programmatic web interaction.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fagent-browser\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M7CTBKVFYBG78FDSABSDJTTQ","shadcn","Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI, including chat interfaces. Provides project context, component docs, and usage examples. Applies when working with shadcn\u002Fui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for \"shadcn init\", \"create an app with --preset\", \"switch to --preset\", and for building a design system or applying a DESIGN.md or brand spec to shadcn\u002Fui.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-UI-界面组件\u002FYYC3-UI-界面组件-ui\u002Fskills\u002Fshadcn\u002FSKILL.md",[],[]]