outlinedriven/odin-codex-plugin/perf-profile

Claude Code and agent skill by outlinedriven/odin-codex-plugin

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Hotspot detection and performance root-cause analysis: flamegraph interpretation, allocation tracking, latency profiling, regression measurement. Use when a workload misses its latency, throughput, or memory budget; when a benchmark regresses; or before optimizing any hot path (no optimization without a profile).

Install

npx vskill@latest install outlinedriven/odin-codex-plugin/perf-profile

SKILL.md

Performance is a contract with reality. Intuition about hot paths is wrong more often than right. Capture, locate, hypothesize, optimize, re-measure, prove the regression with a benchmark — then defend the win with an invariant.

When to Apply / NOT

Apply: latency or throughput SLO violation; memory pressure (RSS growth, GC churn); benchmark regression; pre-optimization scoping; cold-start vs steady-state cost split; cache locality / branch-prediction concerns.

NOT apply: defect with wrong outputs; architectural redesign; micro-optimization without budget pressure; untested code (write tests first).

Anti-patterns

  • Optimize without profile: intuition-driven changes.
  • Single-run benchmarks: variance dominates. Use hyperfine --warmup 3 --min-runs 10.
  • Profile in debug build: optimizer-disabled binaries lie.
  • Confuse flat profile with call-graph: self-time vs total-time tell different stories.
  • Ignoring tail latency: p50 stays flat while p99 explodes.
  • Cherry-picking the win: re-measure end-to-end.
  • Allocation blind spot: CPU profiler hides GC.
  • Forgetting the regression guard.

Workflow (language-neutral)

  1. Define budget — restate target metric: latency p95 < X ms, throughput > Y rps, RSS < Z MB.
  2. Establish baseline — run unoptimized workload under hyperfine plus profiler. Save raw artifacts.
  3. Capture profile — sampled CPU profile → flamegraph; allocation profile if memory-bound; latency histogram for tail.
  4. Locate hotspot — top self-time function or widest plateau. Cross-check with allocation profile.
  5. Hypothesize — one falsifiable claim with predicted delta.
  6. Optimize minimally — smallest change targeting the hypothesis.
  7. Re-profile — capture same metric; differential flamegraph.
  8. Prove the win — hyperfine 'baseline' 'optimized' --warmup 3 --min-runs 10.
  9. Guard the win — add CI benchmark with regression bound.

Reading Flamegraphs

  • Wide plateau on top: hot self-time function — primary target.
  • Narrow towers: deep call chains — examine for over-abstraction.
  • Repeated motifs: same callee under many parents — candidate for inlining or caching.
  • Missing frames: rebuild with -fno-omit-frame-pointer / RUSTFLAGS=-C force-frame-pointers=yes.
  • Differential flamegraph (`hotspot --diff`): red = added cost, blue = removed.

Parallel Tooling

FamilyCPU samplingMemory / allocDifferential / benchmark
Systems (C/C++/Rust)perf record + flamegraph, samply, valgrind --tool=callgrindvalgrind --tool=massif, heaptrack, dhathyperfine, criterion, iai-callgrind
Pythonpy-spy record, scalene, cProfile + snakevizscalene (memory mode), tracemalloc, memraypytest-benchmark, hyperfine
Gogo tool pprof (cpu profile), runtime/pprofgo tool pprof (heap), runtime.MemStatsgo test -bench -benchmem, benchstat
Java/Kotlinasync-profiler, JFR (jcmd JFR.start)JFR allocation events, Eclipse MAT on heap dumpJMH, hyperfine
JavaScript/TypeScriptChrome DevTools, node --prof, clinic flameChrome heap snapshot, clinic doctortinybench, mitata, hyperfine
OCamllandmarks, magic-tracememtrace + memtrace-viewer, Statmemprofbechamel, core_bench, hyperfine

Use procs (not ps). Use bat -P -p -n (not cat). Use difft (not diff). Use hyperfine (not time).

Constitutional Rules

  1. No optimization without a profile.
  2. One hypothesis per iteration.
  3. Re-measure end-to-end.
  4. Variance-aware comparison with hyperfine --warmup --min-runs.
  5. Guard every win in CI bench.
  6. Correctness first — keep TDD green.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
15
Repository forks
2
7-day trend score
14

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/outlinedriven/odin-codex-plugin/perf-profile/badge)](https://verified-skill.com/skills/outlinedriven/odin-codex-plugin/perf-profile)

Something wrong with this skill or its page? Tell us.