/who-ate-my-flops:convert-to-benchmark-scriptfrom who-ate-my-flops
Converts a user's real training/inference script into a short, repeatable benchmark script for optimization loops: same job shape, under 8 minutes, deterministic, and side-effect free.
Ships in who-ate-my-flops. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
In: the script the user actually runs.
Out: a new script that does the same job within a few minutes (mostly by reducing total steps), gives the same answer twice, and leaves nothing behind.
optimize's setup smoke-runs it 3
times and reads the tolerance off those runs, so drift you leave in here comes
back there as a tolerance too wide to gate anything on.Reach for the script's own flag or an environment variable every time. A deleted line is a change to their code that nobody agreed to.
Estimate the cost before you switch anything off. You cannot measure it here, so do the arithmetic on paper:
bytes on disk / write bandwidth x saves per runeval batches x 1/3 of a train step / steps between evalsDivide either by the run's total wall clock. Under a few percent, turn it off. Above that, either measure it as a phase of its own rather than buried in steady-state step time, or turn it off and record the exclusion, with your estimate, in the contract's Anything else row. An exclusion nobody wrote down becomes a speedup that never shows up in the real job.
| how | why it matters | |
|---|---|---|
| trackers: wandb, tensorboard, mlflow | the script's own flag, or WANDB_MODE=disabled | the loop makes hundreds of runs, and every one of them lands on a real dashboard |
| checkpoint writes | the script's own flag | the loop runs hundreds of times, so price the disk as well as the clock before you leave it on |
| eval or validation loops inside training | flag them off, or measure them as their own phase | otherwise every Nth steady-state step has an eval buried in it |
| uploads and notifications: hub pushes, slack, mail on finish | flag | same as trackers, and harder to take back |
the output directories the script picks for itself: ./outputs, ./wandb, ./lightning_logs, ./checkpoints | route them all through one flag or environment variable | the workspace does not exist yet during init, so optimize points that flag at its runs/ and nothing lands in a candidate commit |
If the whole job fits the budget, run it whole. Judge that on the real job: a 5 minute smoke config belonging to a 10 hour run is still the 10 hour run's benchmark.
If you have to cut, keep both phases:
Run enough warmup steps that step time stops changing, then at least 5 to 10 steady steps after it. With fewer, the profiler has nowhere to place its capture window, and a real speedup cannot be told apart from run-to-run noise.
You are allowed to use a smaller dataset where it cuts overhead. It moves the numbers as well as the clock, starting with dataset initialization time, so record what you cut.
The mode sets the step count. It does not relax anything under "the same job".
| speed | accuracy | |
|---|---|---|
| what it has to show | warmup and steady state, told apart | the quantities the contract's What must not change row names |
| steps | the floor above. More buys nothing | what the check needs: bit-exact settles in a few steps, a convergence check cannot be short |
| determinism | seeds fixed, torch.use_deterministic_algorithms left off because it costs speed | seeds fixed, data order fixed, deterministic algorithms on when the check is bit-exact |
Show the user a table first: what you changed, the flag or environment variable it maps to, and why. Anything you had to leave alone because fixing it would mean editing their code goes in the same table, as a limitation. Then have them confirm it.
Keep it short. Reading it costs the user attention, and attention is the scarce
thing in init.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub openperfagent/who-ate-my-flops --plugin who-ate-my-flops9 skills in this plugin
/clean-upDeliver a finished optimization run as a branch the user can merge. Cherry-pick the commits that changed the workload onto the base, hardcode the A/B flags, re-verify on the shipped code, strip the checkpoint calls in a last commit, and leave the user standing on that branch with a handover./diagnoseProfile the job defined in contract.md, name the one thing it loses most time to, and propose a single fix with a measured number behind it. It stops at the first finding. optimize is this same work repeated until nothing worth doing is left./extract-computation-graphRead a PyTorch job's code into two files in the workspace’s records/ directory. records/computation_graph.json says what is computed: the module tree down to op level, with a code anchor and a repeat count on every entry. records/execution_schedule.json says when and where it is computed and what moves between devices: phases, the data path onto the GPU, host to device copies and their sync points, the collectives between GPUs, and which overlaps are intended. It reads code and runs nothing. Use it to build either file, and to rebuild one when the code has moved under it./initWork with the user to pin down which PyTorch job gets optimized, write contract.md, and put the correctness instrumentation in place. The optimize skill later reads the contract.md written here and optimizes on its own. Every piece of alignment with the user happens in init, all of it./optimizeOptimize the torch job defined in contract.md with no further input. Profile, edit, and check correctness in a loop, then hand back one clean optimized branch./publish-prWrite the pull request description and one issue for a finished campaign into proposed-pr-description.md and proposed-issue.md, for the user to review and post. Says what the PR may claim, what goes in each section and in what order, and how it is worded. Fills template/pr-description.md and template/issue.md; the filled examples are the .example.md files next to them. It pushes nothing and opens nothing.Other plugins' skills for the same job