ワンクリックで
when-profiling-performance-use-performance-profiler
Comprehensive performance profiling, bottleneck detection, and optimization system
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Comprehensive performance profiling, bottleneck detection, and optimization system
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Creates specialized AI agents with optimized system prompts using the official 4-phase SOP methodology from Desktop .claude-flow, combined with evidence-based prompting techniques and Claude Agent SDK implementation. Use this skill when creating production-ready agents for specific domains, workflows, or tasks requiring consistent high-quality performance with deeply embedded domain knowledge.
Creates sophisticated workflow cascades coordinating multiple micro-skills with sequential pipelines, parallel execution, conditional branching, and Codex sandbox iteration. Enhanced with multi-model routing (Gemini/Codex), ruv-swarm coordination, memory persistence, and audit-pipeline patterns for production workflows.
Loop 3 of the Three-Loop Integrated Development System. CI/CD automation with intelligent failure recovery, root cause analysis, and comprehensive quality validation. Receives implementation from Loop 2, feeds failure patterns back to Loop 1. Achieves 100% test success through automated repair and theater validation. v2.0.0 with explicit agent SOPs.
Comprehensive PR review using multi-agent swarm with specialized reviewers for security, performance, style, tests, and documentation. Provides detailed feedback with auto-fix suggestions and merge readiness assessment.
Comprehensive dependency mapping, analysis, and visualization tool for software projects
Automated comprehensive code documentation generation with API docs, README files, inline comments, and architecture diagrams
| name | when-profiling-performance-use-performance-profiler |
| version | 1.0.0 |
| description | Comprehensive performance profiling, bottleneck detection, and optimization system |
| author | Claude Code |
| category | performance |
| complexity | HIGH |
| tags | ["performance","profiling","optimization","benchmarking","mece"] |
| agents | ["performance-analyzer","performance-benchmarker","coder","optimizer"] |
| components | ["subagent","slash-command","mcp-tool"] |
| dependencies | ["claude-flow@alpha","perf (Linux)","instruments (macOS)","clinic.js (Node.js)"] |
When profiling performance, use performance-profiler to measure, analyze, and optimize application performance across CPU, memory, I/O, and network dimensions.
/profile [path] [--mode quick|standard|deep] [--target cpu|memory|io|network|all]
Task("Performance Profiler", "Profile ./app with deep CPU and memory analysis", "performance-analyzer")
mcp__performance-profiler__analyze({
project_path: "./app",
profiling_mode: "standard",
targets: ["cpu", "memory", "io"],
generate_optimizations: true
})
{
"project": "my-app",
"profiling_mode": "standard",
"duration_seconds": 300,
"baseline": {
"requests_per_second": 1247,
"avg_response_time_ms": 123,
"p95_response_time_ms": 456,
"p99_response_time_ms": 789,
"cpu_usage_percent": 67,
"memory_usage_mb": 512,
"error_rate_percent": 0.1
},
"bottlenecks": [
{
"type": "cpu",
"severity": "high",
"function": "processData",
"time_percent": 34.5,
"calls": 123456,
"avg_time_ms": 2.3,
"recommendation": "Optimize algorithm complexity from O(n²) to O(n log n)"
}
],
"optimizations": [...],
"estimated_improvement": {
"throughput_increase": "3.2x",
"latency_reduction": "68%",
"memory_reduction": "45%"
}
}
Interactive SVG flame graph showing call stack with time proportions
Memory allocation breakdown with retention paths
Prioritized list of actionable improvements with code examples
/profile ./my-app --mode quick --target cpu
/profile ./my-app --mode deep --target memory --detect-leaks
/profile ./my-app --mode standard --target all --optimize --benchmark
/profile ./my-app --mode standard --target io --database --explain-queries
// Step 1: Initialize profiling swarm
mcp__claude-flow__swarm_init({ topology: "star", maxAgents: 5 })
// Step 2: Spawn specialized agents
[Parallel Execution]:
Task("CPU Profiler", "Profile CPU usage and identify hot paths in ./app", "performance-analyzer")
Task("Memory Profiler", "Analyze heap usage and detect memory leaks", "performance-analyzer")
Task("I/O Profiler", "Profile file system and database operations", "performance-analyzer")
Task("Network Profiler", "Analyze network requests and identify slow endpoints", "performance-analyzer")
Task("Optimizer", "Generate optimization recommendations based on profiling data", "optimizer")
// Step 3: Implementation agent applies optimizations
[Sequential Execution]:
Task("Coder", "Implement recommended optimizations from profiling analysis", "coder")
Task("Benchmarker", "Run benchmark suite and validate improvements", "performance-benchmarker")
{
"profiling": {
"sampling_rate_hz": 99,
"stack_depth": 128,
"include_native_code": false,
"track_allocations": true
},
"thresholds": {
"cpu_hot_path_percent": 10,
"memory_leak_growth_mb": 10,
"slow_query_ms": 100,
"slow_request_ms": 1000
},
"optimization": {
"auto_apply": false,
"require_approval": true,
"run_tests_before": true,
"run_benchmarks_after": true
},
"output": {
"flame_graph": true,
"heap_snapshot": true,
"call_tree": true,
"recommendations": true
}
}
Solution: Check for excessive small function calls, increase sampling rate, or use instrumentation
Solution: Run heap snapshot comparison to identify leak sources
Solution: Use EXPLAIN ANALYZE, check for missing indexes, analyze query plans
Solution: Profile I/O operations, check for blocking synchronous calls