performance-profiler — Claude Code skill for profiling
This skill investigates CPU, memory, I/O, and database bottlenecks in Node.js, Python, and Go apps. Use it when tracking down a slow endpoint or rising memory use.
/plugin marketplace add alirezarezvani/claude-skills
/plugin install engineering-advanced-skills@claude-code-skillsWhat performance-profiler does
The skill covers CPU and memory profiling, leak detection, garbage-collection pressure, bundle analysis, and slow database queries. Its listed tools include flamegraphs, py-spy, pprof, heap snapshots, EXPLAIN ANALYZE, and slow query logs. Load tests use k6 or Artillery. It calls for a baseline measurement before changes and another measurement afterward.
The package includes scripts/performance_profiler.py, which scans a project for performance risk indicators; pass --json for output intended for CI. Python 3 is needed to run the script. Deeper profiling also depends on having a workload and the relevant tools for the application. Install it when you can validate a suspected bottleneck with measurements; otherwise, its optimization guidance has little to verify against.
What it helps with
- trace a bottleneck behind a slow endpoint
- check for memory leaks and rising memory use
- inspect a bundle size increase
- find slow queries and N+1 patterns
- load-test an app before launch
Example prompts for the agent
- Scan this project for performance risk indicators and return JSON.
- Investigate why this endpoint is slow. Measure first, then identify the bottleneck.
- Memory use keeps growing. Help me check for a leak and measure it.
How to install performance-profiler
1Plugin marketplace
/plugin marketplace add alirezarezvani/claude-skills/plugin install engineering-advanced-skills@claude-code-skillsThis installs the whole engineering-advanced-skills plugin with all its skills
2Skills CLI (Vercel)
npx skills add alirezarezvani/claude-skills --skill performance-profiler -a claude-code3Manually: put the files in place
~/.claude/skills/performance-profiler/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/performance-profiler/
Manually: put the files in place
.agents/skills/performance-profiler/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/performance-profiler/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install alirezarezvani/claude-skills performance-profiler2Manually: put the files in place
.github/skills/performance-profiler/SKILL.mdPlatform CLI
gemini skills install https://github.com/alirezarezvani/claude-skills --path engineering/skills/performance-profilerManually: put the files in place
.devin/skills/performance-profiler/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set349
The whole set →Similar
Questions about performance-profiler
How do I install performance-profiler in Claude Code?
Run npx skills add alirezarezvani/claude-skills --skill performance-profiler -a claude-code.
What does performance-profiler do?
It helps investigate CPU, memory, I/O, bundle size, and database query performance in Node.js, Python, and Go apps. It uses before-and-after measurements to check changes.
Which tools does it use for load testing?
The skill lists k6 and Artillery for load testing. Running its project analysis script requires Python 3.
Source text
SKILL.md · MIT
--- name: "performance-profiler" description: "Systematic performance profiling for Node.js, Python, and Go applications. Identifies CPU, memory, and I/O bottlenecks, generates flamegraphs, analyzes bundle sizes, optimizes database queries, runs load tests with k6 and Artillery. Always measures before and after. Use when investigating a slow endpoint, planning a performance budget, or hunting a memory leak in production." --- # Performance Profiler **Tier:** POWERFUL **Category:** Engineering **Domain:** Performance Engineering --- ## Overview Systematic performance profiling for Node.js, Python, and Go applications. Identifies CPU, memory, and I/O bottlenecks; generates flamegraphs; analyzes bundle sizes; optimizes database queries; detects memory leaks; and runs load tests with k6 and Artillery. Always measures before and after. ## Core Capabilities - **CPU profiling** — flamegraphs for Node.js, py-spy for Python, pprof for Go - **Memory profiling** — heap snapshots, leak detection, GC pressure - **Bundle analysis** — webpack-bundle-analyzer, Next.js bundle analyzer - **Database optimization** — EXPLAIN ANALYZE, slow query log, N+1 detection - **Load testing** — k6 scripts, Artillery scenarios, ramp-up patterns - **Before/after measurement** — establish baseline, profile, optimize, verify --- ## When to Use - App is slow and you don't know where the bottleneck is - P99 latency exceeds SLA before a release - Memory usage grows over time (suspected leak) - Bundle size increased after adding dependencies - Preparing for a traffic spike (load test before launch) - Database queries taking >100ms --- ## Quick Start ```bash # Analyze a project for performance risk indicators python3 scripts/performance_profiler.py /path/to/project # JSON output for CI integration python3 scripts/performance_profiler.py /path/to/project --json # Custom large-file threshold python3 scripts/performance_profiler.py /path/to/project --large-file-threshold-kb 256 ``` --- ## Golden Rule: Measure First ```bash # Establish baseline BEFORE any optimization # Record: P50, P95, P99 latency | RPS | error rate | memory usage # Wrong: "I think the N+1 query is slow, let me fix it" # Right: Profile → confirm bottleneck → fix → measure again → verify improvement ``` --- ## Node.js Profiling → See references/profiling-recipes.md for details ## References - [references/profiling-recipes.md](references/profiling-recipes.md) — Node.js/Python/Go profiling commands, flamegraph generation, heap snapshots - [references/optimization-playbook.md](references/optimization-playbook.md) — before/after measurement template, quick-win optimization checklist (DB/Node/bundle/API), common pitfalls, best practices
© Alireza Rezvani · MIT · alirezarezvani/claude-skills