performance-profiler
БесплатноЗапускает вложенные скриптыНе проверенPerformance profiling for Node.js, Python, and Go: CPU flamegraphs, memory leak detection, bundle analysis, query optimization, and k6 load testing. Use when…
от borghei★ 1 250 звёзд на GitHubОб этом скилле
Performance Profiler
Systematic performance profiling for Node.js, Python, and Go applications. Identifies CPU bottlenecks with flamegraphs, detects memory leaks with heap snapshots, analyzes bundle sizes, optimizes database queries, detects N+1 patterns, and runs load tests with k6 and Artillery. Enforces a measure-first methodology: establish baseline, identify bottleneck, fix, and verify improvement.
Golden Rule — Measure First: Profile → Confirm bottleneck → Fix → Measure again → Verify improvement. Every optimization needs baseline metrics, profiler evidence, the fix, post-fix metrics, and a delta. Full rule in references/cpu-and-memory-profiling.md.
Core Capabilities
- CPU profiling — Clinic.js/V8 flamegraphs (Node), py-spy/cProfile/scalene (Python), pprof (Go), Chrome DevTools (browser).
- Memory profiling — heap snapshots and before/after comparison, GC pressure analysis, leak detection, retained object graphs.
- Database optimization — EXPLAIN ANALYZE plan reading, N+1 detection and batching, slow query logs, missing-index identification, connection pool sizing.
- Bundle analysis — webpack/Next.js analyzers, tree-shaking, dynamic imports, heavy dependency identification.
- Load testing — k6 ramp-up scripts, SLA threshold enforcement in CI, P50/P95/P99 latency tracking, concurrent user simulation.
When to Use
- App is slow and you do not 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, or verifying no regressions after a dependency upgrade.
Clarify First
Before profiling, settle the inputs below. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.
- Runtime & symptom: Node / Python / Go and CPU / memory / bundle / query / load-spike (selects the profiler and toolchain).
- Baseline + SLA target: current numbers and the P95/P99 (or size) threshold to beat (measure-first needs both to verify a delta).
- Environment: local / staging / prod determines the safe profiling method and whether load testing is allowed.
Ask about the two or three inputs that matter most for this request, not the whole list. If the user wants a result straight away, produce it and state your assumptions at the top.
Tools Overview
| Tool | Input (JSON) | Key flags | Exit codes |
|---|---|---|---|
scripts/benchmark_reporter.py |
{"baseline": [...], "current": [...]}, each entry name, iterations, mean_ms, median_ms, min_ms, max_ms, p95_ms |
--regression-threshold 5, --improvement-threshold 5, --fail-on-regression, --json |
0 report; 1 regression with --fail-on-regression; 2 unreadable input |
scripts/bottleneck_detector.py |
Array or JSONL of requests: endpoint, duration_ms, optional queries (template, duration_ms) and spans (name, type, duration_ms) |
--latency-threshold, --cv-threshold, --json |
0 report; 2 unreadable input |
scripts/resource_analyzer.py |
Array of snapshots: timestamp plus cpu, memory, disk (number or {"percent": n}) |
--cpu-threshold, --memory-threshold, --disk-threshold, --json |
0 report; 2 unreadable input |
# from engineering/performance-profiler/
python3 scripts/benchmark_reporter.py assets/sample_benchmarks.json --fail-on-regression # exit 1: parse_invoice +50%
python3 scripts/bottleneck_detector.py assets/sample_request_log.json # slow GET /orders, N+1 confirmed
python3 scripts/resource_analyzer.py assets/sample_resources.json # memory climbing all day
Reference Documentation
Load the reference that matches the task — keep this file lean and pull detail on demand:
- references/cpu-and-memory-profiling.md — the full Measure-First rule, Node.js CPU profiling (Clinic.js flamegraphs, V8 CPU profiles), and memory leak detection (Node heap snapshots, Python memray/tracemalloc). Read when chasing CPU or memory issues.
- references/database-and-bundle.md — EXPLAIN ANALYZE workflow, N+1 detection patterns and middleware script, Next.js bundle analyzer setup, quick size checks, and the common-bundle-wins table. Read when optimizing queries or bundle size.
- references/load-testing-and-methodology.md — full k6 load-test script, the before/after measurement template, quick-win optimization checklist, common pitfalls, best practices, troubleshooting table, and success criteria. Read when load testing or documenting a win.
Anti-Patterns
Mistake: Optimizing before measuring. Why it matters: Intuition picks the wrong hotspot most of the
Установить performance-profiler в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл performance-profiler?
Performance profiling for Node.js, Python, and Go: CPU flamegraphs, memory leak detection, bundle analysis, query optimization, and k6 load testing. Use when diagnosing slow endpoints, memory growth, large bundles, or traffic spikes.
Как установить скилл performance-profiler?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл performance-profiler запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic