[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6ESQYRR7TZC7T55Y6C9JAXY":3,"skill-same:01M6ESQYRR7TZC7T55Y6C9JAXY":138},{"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":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":63,"commitSha":64,"skillDirectory":65,"forksCount":66,"repositoryHtmlUrl":67,"repositoryHomepageUrl":68,"ownerHtmlUrl":69,"ownerBlogUrl":6,"ownerDescription":70,"updatedAt":71,"install":72,"resources":85},"01M6ESQYRR7TZC7T55Y6C9JAXY","when-analyzing-performance-use-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\u002Fdnyoussef\u002Fwhen-analyzing-performance-use-performance-analysis\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"when analyzing performance use performance analysis","performance analysis","use","analyzing","performance","analysis","Tools","recommendations","active","bottleneck analysis","bottleneck","swarm","flow","Optimization","monitoring","metrics","benchmark","perf","optimization recommendations","workflow","2026-11-10 10:12:30",false,"---\nname: when-analyzing-performance-use-performance-analysis\ndescription: Comprehensive performance analysis, bottleneck detection, and optimization recommendations for Claude Flow swarms\nversion: 1.0.0\ntags:\n  - performance\n  - analysis\n  - bottleneck\n  - optimization\n  - profiling\ncategory: performance\nagents:\n  - performance-analyzer\n  - performance-benchmarker\n  - perf-analyzer\ncomplexity: advanced\nestimated_duration: 30-60 minutes\nprerequisites:\n  - Claude Flow installed\n  - Active swarm or workflow\n  - Performance monitoring tools\noutputs:\n  - Performance metrics\n  - Bottleneck analysis\n  - Optimization recommendations\n  - Benchmark results\n---\n\n# Performance Analysis SOP\n\n## Overview\n\nComprehensive performance analysis for Claude Flow swarms including bottleneck detection, profiling, benchmarking, and actionable optimization recommendations.\n\n## Agents & Responsibilities\n\n### performance-analyzer\n**Role:** Analyze system performance and identify issues\n**Responsibilities:**\n- Collect performance metrics\n- Analyze resource utilization\n- Identify bottlenecks\n- Generate analysis reports\n\n### performance-benchmarker\n**Role:** Run performance benchmarks and comparisons\n**Responsibilities:**\n- Execute benchmark suites\n- Compare performance across configurations\n- Establish performance baselines\n- Validate improvements\n\n### perf-analyzer\n**Role:** Deep performance profiling and optimization\n**Responsibilities:**\n- Profile code execution\n- Analyze memory usage\n- Optimize critical paths\n- Recommend improvements\n\n## Phase 1: Establish Baseline\n\n### Objective\nMeasure current performance and establish baseline metrics.\n\n### Scripts\n\n```bash\n# Collect baseline metrics\nnpx claude-flow@alpha performance baseline \\\n  --duration 300 \\\n  --interval 5 \\\n  --output baseline-metrics.json\n\n# Run benchmark suite\nnpx claude-flow@alpha benchmark run \\\n  --type swarm \\\n  --iterations 10 \\\n  --output benchmark-results.json\n\n# Profile system resources\nnpx claude-flow@alpha performance profile \\\n  --include-cpu \\\n  --include-memory \\\n  --include-network \\\n  --output resource-profile.json\n\n# Collect agent metrics\nnpx claude-flow@alpha agent metrics --all --format json > agent-metrics.json\n\n# Store baseline\nnpx claude-flow@alpha memory store \\\n  --key \"performance\u002Fbaseline\" \\\n  --file baseline-metrics.json\n\n# Generate baseline report\nnpx claude-flow@alpha performance report \\\n  --type baseline \\\n  --metrics baseline-metrics.json \\\n  --output baseline-report.md\n```\n\n### Key Baseline Metrics\n\n**Swarm-Level:**\n- Total throughput (tasks\u002Fmin)\n- Average latency (ms)\n- Resource utilization (%)\n- Error rate (%)\n- Coordination overhead (ms)\n\n**Agent-Level:**\n- Task completion rate\n- Response time (ms)\n- CPU usage (%)\n- Memory usage (MB)\n- Idle time (%)\n\n**System-Level:**\n- Total CPU usage (%)\n- Total memory usage (MB)\n- Network bandwidth (MB\u002Fs)\n- Disk I\u002FO (MB\u002Fs)\n\n### Memory Patterns\n\n```bash\n# Store performance baseline\nnpx claude-flow@alpha memory store \\\n  --key \"performance\u002Fbaseline\u002Ftimestamp\" \\\n  --value \"$(date -Iseconds)\"\n\nnpx claude-flow@alpha memory store \\\n  --key \"performance\u002Fbaseline\u002Fmetrics\" \\\n  --value '{\n    \"throughput\": 145.2,\n    \"latency\": 38.5,\n    \"utilization\": 0.78,\n    \"errorRate\": 0.012,\n    \"timestamp\": \"'$(date -Iseconds)'\"\n  }'\n```\n\n## Phase 2: Profile System\n\n### Objective\nDeep profiling of system components to identify performance characteristics.\n\n### Scripts\n\n```bash\n# Profile swarm execution\nnpx claude-flow@alpha performance profile-swarm \\\n  --duration 300 \\\n  --sample-rate 100 \\\n  --output swarm-profile.json\n\n# Profile individual agents\nfor AGENT in $(npx claude-flow@alpha agent list --format json | jq -r '.[].id'); do\n  npx claude-flow@alpha performance profile-agent \\\n    --agent-id \"$AGENT\" \\\n    --duration 60 \\\n    --output \"profiles\u002Fagent-$AGENT.json\"\ndone\n\n# Profile memory usage\nnpx claude-flow@alpha memory profile \\\n  --show-hotspots \\\n  --show-leaks \\\n  --output memory-profile.json\n\n# Profile network communication\nnpx claude-flow@alpha performance profile-network \\\n  --show-latency \\\n  --show-bandwidth \\\n  --output network-profile.json\n\n# Generate flamegraph\nnpx claude-flow@alpha performance flamegraph \\\n  --input swarm-profile.json \\\n  --output flamegraph.svg\n\n# Analyze CPU hotspots\nnpx claude-flow@alpha performance hotspots \\\n  --type cpu \\\n  --threshold 5 \\\n  --output cpu-hotspots.json\n```\n\n### Profiling Analysis\n\n```bash\n# Identify slow functions\nSLOW_FUNCTIONS=$(jq '[.profile[] | select(.time > 100)]' swarm-profile.json)\n\n# Identify memory hogs\nMEMORY_HOGS=$(jq '[.memory[] | select(.usage > 100)]' memory-profile.json)\n\n# Identify network bottlenecks\nNETWORK_ISSUES=$(jq '[.network[] | select(.latency > 50)]' network-profile.json)\n\necho \"Slow Functions: $(echo $SLOW_FUNCTIONS | jq length)\"\necho \"Memory Hogs: $(echo $MEMORY_HOGS | jq length)\"\necho \"Network Issues: $(echo $NETWORK_ISSUES | jq length)\"\n```\n\n## Phase 3: Analyze Issues\n\n### Objective\nIdentify and categorize performance issues and bottlenecks.\n\n### Scripts\n\n```bash\n# Run comprehensive analysis\nnpx claude-flow@alpha performance analyze \\\n  --input swarm-profile.json \\\n  --detect-bottlenecks \\\n  --detect-memory-leaks \\\n  --detect-deadlocks \\\n  --output analysis-results.json\n\n# Identify bottlenecks by type\nnpx claude-flow@alpha performance bottlenecks \\\n  --categorize \\\n  --priority-order \\\n  --output bottleneck-report.json\n\n# Analyze agent performance\nnpx claude-flow@alpha agent analyze-performance \\\n  --all \\\n  --identify-underperformers \\\n  --output agent-analysis.json\n\n# Analyze coordination overhead\nnpx claude-flow@alpha performance coordination-overhead \\\n  --calculate \\\n  --breakdown \\\n  --output coordination-analysis.json\n\n# Root cause analysis\nnpx claude-flow@alpha performance root-cause \\\n  --issue \"high-latency\" \\\n  --trace-back \\\n  --output root-cause-analysis.json\n```\n\n### Issue Classification\n\n**Critical Issues:**\n- Deadlocks\n- Memory leaks\n- Complete performance degradation\n- System instability\n\n**High Priority:**\n- Bottlenecks causing >30% slowdown\n- High error rates (>5%)\n- Resource exhaustion\n- Coordination failures\n\n**Medium Priority:**\n- Moderate slowdowns (10-30%)\n- Suboptimal resource utilization\n- Inefficient algorithms\n- Poor load balancing\n\n**Low Priority:**\n- Minor optimizations (\u003C10% impact)\n- Code style issues\n- Documentation gaps\n\n### Memory Patterns\n\n```bash\n# Store analysis results\nnpx claude-flow@alpha memory store \\\n  --key \"performance\u002Fanalysis\u002Fissues\" \\\n  --value '{\n    \"critical\": 0,\n    \"high\": 3,\n    \"medium\": 8,\n    \"low\": 12,\n    \"timestamp\": \"'$(date -Iseconds)'\"\n  }'\n\n# Store bottleneck information\nnpx claude-flow@alpha memory store \\\n  --key \"performance\u002Fanalysis\u002Fbottlenecks\" \\\n  --file bottleneck-report.json\n```\n\n## Phase 4: Optimize Performance\n\n### Objective\nApply optimizations based on analysis and measure improvements.\n\n### Scripts\n\n```bash\n# Get optimization recommendations\nnpx claude-flow@alpha performance recommend \\\n  --based-on analysis-results.json \\\n  --prioritize \\\n  --output recommendations.json\n\n# Apply automatic optimizations\nnpx claude-flow@alpha performance optimize \\\n  --recommendations recommendations.json \\\n  --auto-apply safe-optimizations\n\n# Manual optimizations\n# 1. Fix identified bottlenecks\n# 2. Optimize hot paths\n# 3. Reduce coordination overhead\n# 4. Improve resource utilization\n\n# Optimize swarm topology\nnpx claude-flow@alpha swarm optimize-topology \\\n  --based-on analysis-results.json\n\n# Optimize agent allocation\nnpx claude-flow@alpha agent rebalance \\\n  --strategy performance-optimized\n\n# Optimize memory usage\nnpx claude-flow@alpha memory optimize \\\n  --reduce-footprint \\\n  --clear-unused\n\n# Apply neural optimizations\nnpx claude-flow@alpha neural train \\\n  --pattern convergent \\\n  --iterations 10\n```\n\n### Optimization Techniques\n\n**Parallelization:**\n```bash\n# Increase parallelism for independent tasks\nnpx claude-flow@alpha swarm configure \\\n  --max-parallel-tasks 8\n```\n\n**Caching:**\n```bash\n# Enable result caching\nnpx claude-flow@alpha performance cache \\\n  --enable \\\n  --strategy lru \\\n  --max-size 1000\n```\n\n**Load Balancing:**\n```bash\n# Rebalance agent workloads\nnpx claude-flow@alpha swarm rebalance \\\n  --strategy adaptive \\\n  --target-variance 0.1\n```\n\n**Resource Allocation:**\n```bash\n# Optimize resource allocation\nnpx claude-flow@alpha agent configure --all \\\n  --memory-limit auto \\\n  --cpu-limit auto\n```\n\n## Phase 5: Validate Results\n\n### Objective\nMeasure improvements and validate optimization effectiveness.\n\n### Scripts\n\n```bash\n# Collect post-optimization metrics\nnpx claude-flow@alpha performance baseline \\\n  --duration 300 \\\n  --output optimized-metrics.json\n\n# Run comparison benchmark\nnpx claude-flow@alpha benchmark run \\\n  --type swarm \\\n  --iterations 10 \\\n  --output optimized-benchmark.json\n\n# Compare before\u002Fafter\nnpx claude-flow@alpha performance compare \\\n  --baseline baseline-metrics.json \\\n  --current optimized-metrics.json \\\n  --output improvement-report.json\n\n# Calculate improvements\nTHROUGHPUT_IMPROVEMENT=$(jq '.improvements.throughput.percentage' improvement-report.json)\nLATENCY_IMPROVEMENT=$(jq '.improvements.latency.percentage' improvement-report.json)\n\necho \"Throughput improved by: $THROUGHPUT_IMPROVEMENT%\"\necho \"Latency improved by: $LATENCY_IMPROVEMENT%\"\n\n# Validate improvements meet targets\nnpx claude-flow@alpha performance validate \\\n  --improvements improvement-report.json \\\n  --targets performance-targets.json\n\n# Generate final report\nnpx claude-flow@alpha performance report \\\n  --type comprehensive \\\n  --include-baseline \\\n  --include-analysis \\\n  --include-optimizations \\\n  --include-results \\\n  --output final-performance-report.md\n\n# Archive performance data\nnpx claude-flow@alpha performance archive \\\n  --output performance-archive-$(date +%Y%m%d).tar.gz\n```\n\n### Validation Criteria\n\n**Minimum Improvements:**\n- Throughput: +15%\n- Latency: -20%\n- Resource utilization: More balanced (variance \u003C10%)\n- Error rate: -50% or \u003C1%\n\n**Validation Checks:**\n```bash\n# Check if improvements meet targets\nif (( $(echo \"$THROUGHPUT_IMPROVEMENT >= 15\" | bc -l) )); then\n  echo \"✓ Throughput target met\"\nelse\n  echo \"✗ Throughput target not met\"\nfi\n\nif (( $(echo \"$LATENCY_IMPROVEMENT >= 20\" | bc -l) )); then\n  echo \"✓ Latency target met\"\nelse\n  echo \"✗ Latency target not met\"\nfi\n```\n\n## Success Criteria\n\n- [ ] Baseline established\n- [ ] System profiled\n- [ ] Issues identified and categorized\n- [ ] Optimizations applied\n- [ ] Improvements validated\n\n### Performance Targets\n- Throughput improvement: ≥15%\n- Latency reduction: ≥20%\n- Resource utilization variance: \u003C10%\n- Error rate: \u003C1%\n- Optimization overhead: \u003C5%\n\n## Best Practices\n\n1. **Baseline First:** Always establish baseline before optimizing\n2. **Measure Everything:** Comprehensive metrics collection\n3. **Identify Bottlenecks:** Focus on critical path\n4. **Incremental Optimization:** Apply optimizations incrementally\n5. **Validate Improvements:** Always measure after optimizing\n6. **Document Changes:** Record all optimization actions\n7. **Regression Testing:** Ensure optimizations don't break functionality\n8. **Continuous Monitoring:** Track performance over time\n\n## Common Issues & Solutions\n\n### Issue: No Performance Improvement\n**Symptoms:** Metrics unchanged after optimization\n**Solution:** Re-analyze bottlenecks, verify optimizations applied correctly\n\n### Issue: Performance Regression\n**Symptoms:** Performance worse after optimization\n**Solution:** Rollback changes, re-evaluate optimization strategy\n\n### Issue: Inconsistent Results\n**Symptoms:** Performance varies significantly between runs\n**Solution:** Increase measurement duration, check for external factors\n\n## Integration Points\n\n- **advanced-swarm:** For topology optimization\n- **swarm-orchestration:** For coordination optimization\n- **cascade-orchestrator:** For workflow optimization\n\n## References\n\n- Performance Analysis Methodologies\n- Profiling Techniques\n- Optimization Patterns\n- Benchmarking Best Practices\n","# Performance Analysis SOP\n\n## Overview\n\nComprehensive performance analysis for Claude Flow swarms including bottleneck detection, profiling, benchmarking, and actionable optimization recommendations.\n\n## Agents & Responsibilities\n\n### performance-analyzer\n**Role:** Analyze system performance and identify issues\n**Responsibilities:**\n- Collect performance metrics\n- Analyze resource utilization\n- Identify bottlenecks\n- Generate analysis reports\n\n### performance-benchmarker\n**Role:** Run performance benchmarks and comparisons\n**Responsibilities:**\n- Execute benchmark suites\n- Compare performance across configurations\n- Establish performance baselines\n- Validate improvements\n\n### perf-analyzer\n**Role:** Deep performance profiling and optimization\n**Responsibilities:**\n- Profile code execution\n- Analyze memory usage\n- Optimize critical paths\n- Recommend improvements\n\n## Phase 1: Establish Baseline\n\n### Objective\nMeasure current performance and establish baseline metrics.\n\n### Scripts\n\n```bash\n# Collect baseline metrics\nnpx claude-flow@alpha performance baseline \\\n  --duration 300 \\\n  --interval 5 \\\n  --output baseline-metrics.json\n\n# Run benchmark suite\nnpx claude-flow@alpha benchmark run \\\n  --type swarm \\\n  --iterations 10 \\\n  --output benchmark-results.json\n\n# Profile system resources\nnpx claude-flow@alpha performance profile \\\n  --include-cpu \\\n  --include-memory \\\n  --include-network \\\n  --output resource-profile.json\n\n# Collect agent metrics\nnpx claude-flow@alpha agent metrics --all --format json > agent-metrics.json\n\n# Store baseline\nnpx claude-flow@alpha memory store \\\n  --key \"performance\u002Fbaseline\" \\\n  --file baseline-metrics.json\n\n# Generate baseline report\nnpx claude-flow@alpha performance report \\\n  --type baseline \\\n  --metrics baseline-metrics.json \\\n  --output baseline-report.md\n```\n\n### Key Baseline Metrics\n\n**Swarm-Level:**\n- Total throughput (tasks\u002Fmin)\n- Average latency (ms)\n- Resource utilization (%)\n- Error rate (%)\n- Coordination overhead (ms)\n\n**Agent-Level:**\n- Task completion rate\n- Response time (ms)\n- CPU usage (%)\n- Memory usage (MB)\n- Idle time (%)\n\n**System-Level:**\n- Total CPU usage (%)\n- Total memory usage (MB)\n- Network bandwidth (MB\u002Fs)\n- Disk I\u002FO (MB\u002Fs)\n\n### Memory Patterns\n\n```bash\n# Store performance baseline\nnpx claude-flow@alpha memory store \\\n  --key \"performance\u002Fbaseline\u002Ftimestamp\" \\\n  --value \"$(date -Iseconds)\"\n\nnpx claude-flow@alpha memory store \\\n  --key \"performance\u002Fbaseline\u002Fmetrics\" \\\n  --value '{\n    \"throughput\": 145.2,\n    \"latency\": 38.5,\n    \"utilization\": 0.78,\n    \"errorRate\": 0.012,\n    \"timestamp\": \"'$(date -Iseconds)'\"\n  }'\n```\n\n## Phase 2: Profile System\n\n### Objective\nDeep profiling of system components to identify performance characteristics.\n\n### Scripts\n\n```bash\n# Profile swarm execution\nnpx claude-flow@alpha performance profile-swarm \\\n  --duration 300 \\\n  --sample-rate 100 \\\n  --output swarm-profile.json\n\n# Profile individual agents\nfor AGENT in $(npx claude-flow@alpha agent list --format json | jq -r '.[].id'); do\n  npx claude-flow@alpha performance profile-agent \\\n    --agent-id \"$AGENT\" \\\n    --duration 60 \\\n    --output \"profiles\u002Fagent-$AGENT.json\"\ndone\n\n# Profile memory usage\nnpx claude-flow@alpha memory profile \\\n  --show-hotspots \\\n  --show-leaks \\\n  --output memory-profile.json\n\n# Profile network communication\nnpx claude-flow@alpha performance profile-network \\\n  --show-latency \\\n  --show-bandwidth \\\n  --output network-profile.json\n\n# Generate flamegraph\nnpx claude-flow@alpha performance flamegraph \\\n  --input swarm-profile.json \\\n  --output flamegraph.svg\n\n# Analyze CPU hotspots\nnpx claude-flow@alpha performance hotspots \\\n  --type cpu \\\n  --threshold 5 \\\n  --output cpu-hotspots.json\n```\n\n### Profiling Analysis\n\n```bash\n# Identify slow functions\nSLOW_FUNCTIONS=$(jq '[.profile[] | select(.time > 100)]' swarm-profile.json)\n\n# Identify memory hogs\nMEMORY_HOGS=$(jq '[.memory[] | select(.usage > 100)]' memory-profile.json)\n\n# Identify network bottlenecks\nNETWORK_ISSUES=$(jq '[.network[] | select(.latency > 50)]' network-profile.json)\n\necho \"Slow Functions: $(echo $SLOW_FUNCTIONS | jq length)\"\necho \"Memory Hogs: $(echo $MEMORY_HOGS | jq length)\"\necho \"Network Issues: $(echo $NETWORK_ISSUES | jq length)\"\n```\n\n## Phase 3: Analyze Issues\n\n### Objective\nIdentify and categorize performance issues and bottlenecks.\n\n### Scripts\n\n```bash\n# Run comprehensive analysis\nnpx claude-flow@alpha performance analyze \\\n  --input swarm-profile.json \\\n  --detect-bottlenecks \\\n  --detect-memory-leaks \\\n  --detect-deadlocks \\\n  --output analysis-results.json\n\n# Identify bottlenecks by type\nnpx claude-flow@alpha performance bottlenecks \\\n  --categorize \\\n  --priority-order \\\n  --output bottleneck-report.json\n\n# Analyze agent performance\nnpx claude-flow@alpha agent analyze-performance \\\n  --all \\\n  --identify-underperformers \\\n  --output agent-analysis.json\n\n# Analyze coordination overhead\nnpx claude-flow@alpha performance coordination-overhead \\\n  --calculate \\\n  --breakdown \\\n  --output coordination-analysis.json\n\n# Root cause analysis\nnpx claude-flow@alpha performance root-cause \\\n  --issue \"high-latency\" \\\n  --trace-back \\\n  --output root-cause-analysis.json\n```\n\n### Issue Classification\n\n**Critical Issues:**\n- Deadlocks\n- Memory leaks\n- Complete performance degradation\n- System instability\n\n**High Priority:**\n- Bottlenecks causing >30% slowdown\n- High error rates (>5%)\n- Resource exhaustion\n- Coordination failures\n\n**Medium Priority:**\n- Moderate slowdowns (10-30%)\n- Suboptimal resource utilization\n- Inefficient algorithms\n- Poor load balancing\n\n**Low Priority:**\n- Minor optimizations (\u003C10% impact)\n- Code style issues\n- Documentation gaps\n\n### Memory Patterns\n\n```bash\n# Store analysis results\nnpx claude-flow@alpha memory store \\\n  --key \"performance\u002Fanalysis\u002Fissues\" \\\n  --value '{\n    \"critical\": 0,\n    \"high\": 3,\n    \"medium\": 8,\n    \"low\": 12,\n    \"timestamp\": \"'$(date -Iseconds)'\"\n  }'\n\n# Store bottleneck information\nnpx claude-flow@alpha memory store \\\n  --key \"performance\u002Fanalysis\u002Fbottlenecks\" \\\n  --file bottleneck-report.json\n```\n\n## Phase 4: Optimize Performance\n\n### Objective\nApply optimizations based on analysis and measure improvements.\n\n### Scripts\n\n```bash\n# Get optimization recommendations\nnpx claude-flow@alpha performance recommend \\\n  --based-on analysis-results.json \\\n  --prioritize \\\n  --output recommendations.json\n\n# Apply automatic optimizations\nnpx claude-flow@alpha performance optimize \\\n  --recommendations recommendations.json \\\n  --auto-apply safe-optimizations\n\n# Manual optimizations\n# 1. Fix identified bottlenecks\n# 2. Optimize hot paths\n# 3. Reduce coordination overhead\n# 4. Improve resource utilization\n\n# Optimize swarm topology\nnpx claude-flow@alpha swarm optimize-topology \\\n  --based-on analysis-results.json\n\n# Optimize agent allocation\nnpx claude-flow@alpha agent rebalance \\\n  --strategy performance-optimized\n\n# Optimize memory usage\nnpx claude-flow@alpha memory optimize \\\n  --reduce-footprint \\\n  --clear-unused\n\n# Apply neural optimizations\nnpx claude-flow@alpha neural train \\\n  --pattern convergent \\\n  --iterations 10\n```\n\n### Optimization Techniques\n\n**Parallelization:**\n```bash\n# Increase parallelism for independent tasks\nnpx claude-flow@alpha swarm configure \\\n  --max-parallel-tasks 8\n```\n\n**Caching:**\n```bash\n# Enable result caching\nnpx claude-flow@alpha performance cache \\\n  --enable \\\n  --strategy lru \\\n  --max-size 1000\n```\n\n**Load Balancing:**\n```bash\n# Rebalance agent workloads\nnpx claude-flow@alpha swarm rebalance \\\n  --strategy adaptive \\\n  --target-variance 0.1\n```\n\n**Resource Allocation:**\n```bash\n# Optimize resource allocation\nnpx claude-flow@alpha agent configure --all \\\n  --memory-limit auto \\\n  --cpu-limit auto\n```\n\n## Phase 5: Validate Results\n\n### Objective\nMeasure improvements and validate optimization effectiveness.\n\n### Scripts\n\n```bash\n# Collect post-optimization metrics\nnpx claude-flow@alpha performance baseline \\\n  --duration 300 \\\n  --output optimized-metrics.json\n\n# Run comparison benchmark\nnpx claude-flow@alpha benchmark run \\\n  --type swarm \\\n  --iterations 10 \\\n  --output optimized-benchmark.json\n\n# Compare before\u002Fafter\nnpx claude-flow@alpha performance compare \\\n  --baseline baseline-metrics.json \\\n  --current optimized-metrics.json \\\n  --output improvement-report.json\n\n# Calculate improvements\nTHROUGHPUT_IMPROVEMENT=$(jq '.improvements.throughput.percentage' improvement-report.json)\nLATENCY_IMPROVEMENT=$(jq '.improvements.latency.percentage' improvement-report.json)\n\necho \"Throughput improved by: $THROUGHPUT_IMPROVEMENT%\"\necho \"Latency improved by: $LATENCY_IMPROVEMENT%\"\n\n# Validate improvements meet targets\nnpx claude-flow@alpha performance validate \\\n  --improvements improvement-report.json \\\n  --targets performance-targets.json\n\n# Generate final report\nnpx claude-flow@alpha performance report \\\n  --type comprehensive \\\n  --include-baseline \\\n  --include-analysis \\\n  --include-optimizations \\\n  --include-results \\\n  --output final-performance-report.md\n\n# Archive performance data\nnpx claude-flow@alpha performance archive \\\n  --output performance-archive-$(date +%Y%m%d).tar.gz\n```\n\n### Validation Criteria\n\n**Minimum Improvements:**\n- Throughput: +15%\n- Latency: -20%\n- Resource utilization: More balanced (variance \u003C10%)\n- Error rate: -50% or \u003C1%\n\n**Validation Checks:**\n```bash\n# Check if improvements meet targets\nif (( $(echo \"$THROUGHPUT_IMPROVEMENT >= 15\" | bc -l) )); then\n  echo \"✓ Throughput target met\"\nelse\n  echo \"✗ Throughput target not met\"\nfi\n\nif (( $(echo \"$LATENCY_IMPROVEMENT >= 20\" | bc -l) )); then\n  echo \"✓ Latency target met\"\nelse\n  echo \"✗ Latency target not met\"\nfi\n```\n\n## Success Criteria\n\n- [ ] Baseline established\n- [ ] System profiled\n- [ ] Issues identified and categorized\n- [ ] Optimizations applied\n- [ ] Improvements validated\n\n### Performance Targets\n- Throughput improvement: ≥15%\n- Latency reduction: ≥20%\n- Resource utilization variance: \u003C10%\n- Error rate: \u003C1%\n- Optimization overhead: \u003C5%\n\n## Best Practices\n\n1. **Baseline First:** Always establish baseline before optimizing\n2. **Measure Everything:** Comprehensive metrics collection\n3. **Identify Bottlenecks:** Focus on critical path\n4. **Incremental Optimization:** Apply optimizations incrementally\n5. **Validate Improvements:** Always measure after optimizing\n6. **Document Changes:** Record all optimization actions\n7. **Regression Testing:** Ensure optimizations don't break functionality\n8. **Continuous Monitoring:** Track performance over time\n\n## Common Issues & Solutions\n\n### Issue: No Performance Improvement\n**Symptoms:** Metrics unchanged after optimization\n**Solution:** Re-analyze bottlenecks, verify optimizations applied correctly\n\n### Issue: Performance Regression\n**Symptoms:** Performance worse after optimization\n**Solution:** Rollback changes, re-evaluate optimization strategy\n\n### Issue: Inconsistent Results\n**Symptoms:** Performance varies significantly between runs\n**Solution:** Increase measurement duration, check for external factors\n\n## Integration Points\n\n- **advanced-swarm:** For topology optimization\n- **swarm-orchestration:** For coordination optimization\n- **cascade-orchestrator:** For workflow optimization\n\n## References\n\n- Performance Analysis Methodologies\n- Profiling Techniques\n- Optimization Patterns\n- Benchmarking Best Practices\n",{"name":5,"tags":44,"agents":47,"outputs":51,"version":56,"category":23,"complexity":57,"description":7,"prerequisites":58,"estimated_duration":62},[23,24,29,45,46],"optimization","profiling",[48,49,50],"performance-analyzer","performance-benchmarker","perf-analyzer",[52,53,54,55],"Performance metrics","Bottleneck analysis","Optimization recommendations","Benchmark results","1.0.0","advanced",[59,60,61],"Claude Flow installed","Active swarm or workflow","Performance monitoring tools","30-60 minutes","main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002Fdnyoussef\u002Fwhen-analyzing-performance-use-performance-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":73,"prompt":83,"zipAvailable":84},[74,77,80],{"tool":75,"command":76},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill when-analyzing-performance-use-performance-analysis",{"tool":78,"command":79},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill when-analyzing-performance-use-performance-analysis",{"tool":81,"command":82},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill when-analyzing-performance-use-performance-analysis","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fdnyoussef\u002Fwhen-analyzing-performance-use-performance-analysis\u002FSKILL.md",true,[86,92,98,102,106,110,114,118,122,126,130,134],{"path":87,"resourceType":88,"resourceTypeDesc":89,"sizeBytes":90,"sourceHtmlUrl":91},"process-diagram.gv","OTHER","其他",1186,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fdnyoussef\u002Fwhen-analyzing-performance-use-performance-analysis\u002Fprocess-diagram.gv",{"path":93,"resourceType":94,"resourceTypeDesc":95,"sizeBytes":96,"sourceHtmlUrl":97},"PROCESS.md","REFERENCE","参考文档",1797,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fdnyoussef\u002Fwhen-analyzing-performance-use-performance-analysis\u002FPROCESS.md",{"path":99,"resourceType":94,"resourceTypeDesc":95,"sizeBytes":100,"sourceHtmlUrl":101},"README.md",904,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fdnyoussef\u002Fwhen-analyzing-performance-use-performance-analysis\u002FREADME.md",{"path":103,"resourceType":94,"resourceTypeDesc":95,"sizeBytes":104,"sourceHtmlUrl":105},"references\u002Fokf\u002Fconcepts\u002Fanomaly-triage.md",871,"https:\u002F\u002Fgithub.com\u002Feugenelim\u002Fagent-ready-repo\u002Fblob\u002Fmain\u002Fpacks\u002F_okf-pilot-cost-engineering\u002F.apm\u002Fskills\u002Fcost-engineering\u002Freferences\u002Fokf\u002Fconcepts\u002Fanomaly-triage.md",{"path":107,"resourceType":94,"resourceTypeDesc":95,"sizeBytes":108,"sourceHtmlUrl":109},"references\u002Fokf\u002Fconcepts\u002Fattribution-model.md",573,"https:\u002F\u002Fgithub.com\u002Feugenelim\u002Fagent-ready-repo\u002Fblob\u002Fmain\u002Fpacks\u002F_okf-pilot-cost-engineering\u002F.apm\u002Fskills\u002Fcost-engineering\u002Freferences\u002Fokf\u002Fconcepts\u002Fattribution-model.md",{"path":111,"resourceType":94,"resourceTypeDesc":95,"sizeBytes":112,"sourceHtmlUrl":113},"references\u002Fokf\u002Fconcepts\u002Fbudget-guardrails.md",613,"https:\u002F\u002Fgithub.com\u002Feugenelim\u002Fagent-ready-repo\u002Fblob\u002Fmain\u002Fpacks\u002F_okf-pilot-cost-engineering\u002F.apm\u002Fskills\u002Fcost-engineering\u002Freferences\u002Fokf\u002Fconcepts\u002Fbudget-guardrails.md",{"path":115,"resourceType":94,"resourceTypeDesc":95,"sizeBytes":116,"sourceHtmlUrl":117},"references\u002Fokf\u002Fconcepts\u002Fforecast-review.md",547,"https:\u002F\u002Fgithub.com\u002Feugenelim\u002Fagent-ready-repo\u002Fblob\u002Fmain\u002Fpacks\u002F_okf-pilot-cost-engineering\u002F.apm\u002Fskills\u002Fcost-engineering\u002Freferences\u002Fokf\u002Fconcepts\u002Fforecast-review.md",{"path":119,"resourceType":94,"resourceTypeDesc":95,"sizeBytes":120,"sourceHtmlUrl":121},"references\u002Fokf\u002Fconcepts\u002Findex.md",497,"https:\u002F\u002Fgithub.com\u002Feugenelim\u002Fagent-ready-repo\u002Fblob\u002Fmain\u002Fpacks\u002F_okf-pilot-cost-engineering\u002F.apm\u002Fskills\u002Fcost-engineering\u002Freferences\u002Fokf\u002Fconcepts\u002Findex.md",{"path":123,"resourceType":94,"resourceTypeDesc":95,"sizeBytes":124,"sourceHtmlUrl":125},"references\u002Fokf\u002Fconcepts\u002Fprovenance-and-safety.md",651,"https:\u002F\u002Fgithub.com\u002Feugenelim\u002Fagent-ready-repo\u002Fblob\u002Fmain\u002Fpacks\u002F_okf-pilot-cost-engineering\u002F.apm\u002Fskills\u002Fcost-engineering\u002Freferences\u002Fokf\u002Fconcepts\u002Fprovenance-and-safety.md",{"path":127,"resourceType":94,"resourceTypeDesc":95,"sizeBytes":128,"sourceHtmlUrl":129},"references\u002Fokf\u002Fconcepts\u002Funit-economics.md",661,"https:\u002F\u002Fgithub.com\u002Feugenelim\u002Fagent-ready-repo\u002Fblob\u002Fmain\u002Fpacks\u002F_okf-pilot-cost-engineering\u002F.apm\u002Fskills\u002Fcost-engineering\u002Freferences\u002Fokf\u002Fconcepts\u002Funit-economics.md",{"path":131,"resourceType":94,"resourceTypeDesc":95,"sizeBytes":132,"sourceHtmlUrl":133},"references\u002Fokf\u002Findex.md",175,"https:\u002F\u002Fgithub.com\u002Feugenelim\u002Fagent-ready-repo\u002Fblob\u002Fmain\u002Fpacks\u002F_okf-pilot-cost-engineering\u002F.apm\u002Fskills\u002Fcost-engineering\u002Freferences\u002Fokf\u002Findex.md",{"path":135,"resourceType":94,"resourceTypeDesc":95,"sizeBytes":136,"sourceHtmlUrl":137},"skill-report.json",14834,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fdnyoussef\u002Fwhen-analyzing-performance-use-performance-analysis\u002Fskill-report.json",[139,148,157,166,172,178],{"skillNo":140,"name":141,"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":142,"categories":143,"keywords":144,"publishedAt":39},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[145,146,147],"model","model hierarchy","model hierarchy skill",{"skillNo":149,"name":150,"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":151,"categories":152,"keywords":153,"publishedAt":39},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[154,155,156],"MCP","zoom","zoom mcp",{"skillNo":158,"name":159,"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":160,"categories":161,"keywords":162,"publishedAt":39},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[163,164,165,155],"sdk","zoom apps sdk","apps",{"skillNo":167,"name":168,"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":169,"categories":170,"keywords":171,"publishedAt":39},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[168],{"skillNo":173,"name":174,"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":175,"categories":176,"keywords":177,"publishedAt":39},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[174],{"skillNo":179,"name":180,"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":181,"categories":182,"keywords":183,"publishedAt":39},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[180]]