rust-perflisted
Install: claude install-skill decebal/curated-claude-skills
# Rust Performance Skill
A phased playbook for diagnosing and fixing Rust perf issues. Each phase answers a different question; do not skip ahead. **Never run PGO/BOLT until a hotspot is confirmed and a representative workload exists** — otherwise you optimize for the wrong path.
## Phase 0 — Repo detection (always run first)
Before suggesting any tool, grep the repo for what's already wired up. Adapt recommendations to what exists.
| Detect | Command | If present |
|---|---|---|
| hotpath instrumentation | `grep -l 'hotpath' Cargo.toml crates/*/Cargo.toml apps/*/Cargo.toml 2>/dev/null` | Start triage with `--features hotpath`. See Phase 1a. |
| Custom allocator | `grep -r '#\[global_allocator\]' src/ crates/ apps/ 2>/dev/null` | Skip the allocator swap recommendation. |
| criterion benches | Check for `[[bench]]` in Cargo.toml, `benches/` dir | Propose iai-callgrind *alongside* it for CI gates, not as replacement. |
| tracing in use | `grep -r 'tracing::' --include='*.rs' -l | head -1` | Offer tracing-flame as zero-cost signal. |
| HTTP server | Axum/actix/hyper imports | Offer pprof-rs endpoint for in-prod profiling. |
| CI perf gates | `.github/workflows/*perf*.yml` or `*profile*.yml` | Extend the existing gate rather than making a new one. |
| Build runner | `test -f Makefile \|\| test -f Taskfile.yml \|\| test -f justfile` | Use the matching template in Phase 6a (`makefile-perf.mk` / `taskfile-perf.yml` / `justfile-perf.just`). Don't add a second runner. |
State wha