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
# 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
# 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 — Node.js/Python/Go profiling commands, flamegraph generation, heap snapshots
- references/optimization-playbook.md — before/after measurement template, quick-win optimization checklist (DB/Node/bundle/API), common pitfalls, best practices
Source: alirezarezvani/claude-skills → engineering/skills/performance-profiler/SKILL.md
1---2name: performance-profiler3description: "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."4category: engineering-core5source_repo: alirezarezvani/claude-skills6source_path: "engineering/skills/performance-profiler/SKILL.md"7source_url: https://github.com/alirezarezvani/claude-skills/blob/HEAD/engineering/skills/performance-profiler/SKILL.md8metadata:9 source: https://skillmd.com/skills/thedixitjain/performance-profiler10---111213# Performance Profiler1415**Tier:** POWERFUL 16**Category:** Engineering 17**Domain:** Performance Engineering 1819---2021## Overview2223Systematic 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.2425## Core Capabilities2627- **CPU profiling** — flamegraphs for Node.js, py-spy for Python, pprof for Go28- **Memory profiling** — heap snapshots, leak detection, GC pressure29- **Bundle analysis** — webpack-bundle-analyzer, Next.js bundle analyzer30- **Database optimization** — EXPLAIN ANALYZE, slow query log, N+1 detection31- **Load testing** — k6 scripts, Artillery scenarios, ramp-up patterns32- **Before/after measurement** — establish baseline, profile, optimize, verify3334---3536## When to Use3738- App is slow and you don't know where the bottleneck is39- P99 latency exceeds SLA before a release40- Memory usage grows over time (suspected leak)41- Bundle size increased after adding dependencies42- Preparing for a traffic spike (load test before launch)43- Database queries taking >100ms4445---4647## Quick Start4849```bash50# Analyze a project for performance risk indicators51python3 scripts/performance_profiler.py /path/to/project5253# JSON output for CI integration54python3 scripts/performance_profiler.py /path/to/project --json5556# Custom large-file threshold57python3 scripts/performance_profiler.py /path/to/project --large-file-threshold-kb 25658```5960---6162## Golden Rule: Measure First6364```bash65# Establish baseline BEFORE any optimization66# Record: P50, P95, P99 latency | RPS | error rate | memory usage6768# Wrong: "I think the N+1 query is slow, let me fix it"69# Right: Profile → confirm bottleneck → fix → measure again → verify improvement70```7172---7374## Node.js Profiling75→ See references/profiling-recipes.md for details7677## References7879- [references/profiling-recipes.md](references/profiling-recipes.md) — Node.js/Python/Go profiling commands, flamegraph generation, heap snapshots80- [references/optimization-playbook.md](references/optimization-playbook.md) — before/after measurement template, quick-win optimization checklist (DB/Node/bundle/API), common pitfalls, best practices8182---8384**Source:** [`alirezarezvani/claude-skills`](https://github.com/alirezarezvani/claude-skills) → `engineering/skills/performance-profiler/SKILL.md`