# Perf

> The general profile-driven perf loop for any language or runtime: baseline, profile, fix the real hot path, re-measure. Use for /perf, "this is slow", or optimization work.

- Skill: `outthislife/perf` (Agent Skill)
- Install (CLI): `npx skillmds@latest add outthislife/perf`
- Raw SKILL.md: https://api.skillmd.com/api/skills/outthislife/perf/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: outthislife (https://skillmd.com/u/outthislife)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/outthislife/perf

---


# Perf

The general performance loop. Profiling (CPU profile, flamegraph, memory
snapshot, trace) is the usual tool, but the loop is the same regardless of which
one fits.

## Loop

1. Reproduce the slow path and capture a baseline number — time, memory, FPS,
   request latency, whatever matters here.
2. Profile to find the real hot path: CPU profile / flamegraph / memory snapshot
   / trace as fits. Reuse the repo's existing profiler; don't build a parallel
   harness.
3. Read the profile, not your intuition — fix the actual hot path.
4. Re-measure. Record before/after in the PR title/description.
5. Ship in topical commits (`pr-update`), `clean`, keep CI green.

## Don't

- Optimize by guess before profiling.
- Fiddle with the measurement system instead of improving perf.
- Run a full suite or profile that overwhelms the machine — scope the run.
- Report gains you didn't measure.

