What problem does it solve?
Performance issues are often hard to diagnose and easy to accidentally worsen without clear evidence, so this Skill provides a profile-driven method to identify bottlenecks and apply safe optimizations that you can verify with benchmarks.
Core Features & Use Cases
- Profile-first workflow: guides you through collecting and reading CPU/heap/trace data, focusing on signals like cumulative cost and distinguishing user-land cause from runtime noise.
- Prioritized optimization plan: ranks fixes by impact/risk and enforces a “do first / do second / do last / skip” decision rule to prevent low-value tuning.
- One-change-at-a-time safety: requires tests first, immediate benchmark after each change, and clear stopping heuristics (e.g., <5% gain within noise).
- Pattern catalog for common bottlenecks: includes practical, reusable patterns like caching, pre-allocation, fast-reject, pooling, batching, vendor chunk partitioning, and concurrent-fetch dedup.
- Agent-ready tooling support: provides scripts for frontend Lighthouse/bundle analysis and Go pprof extraction, plus language modules for runtime-specific commands.
Quick Start
Use the perf-optimization skill to analyze a slow page by first running the recommended profiling script, then applying one optimization at a time based on the profile findings and validating the result with before/after benchmarks.