skills/dnyoussef/when-profiling-performance-use-performance-profiler/SKILL.md
Comprehensive performance profiling, bottleneck detection, and optimization system
npx skillsauth add aiskillstore/marketplace when-profiling-performance-use-performance-profilerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.