/who-ate-my-flops:diagnosefrom who-ate-my-flops
Profiles a job defined in contract.md, identifies the single largest wall-clock cost, and proposes one measured fix with a proven number. Stops after the first finding.
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, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
diagnose is a sequence of steps. Work through them one at a time and mark each one done as you go.
It stops after one finding, one fix and the measurement that proves it. The user
chose this over optimize because they want an answer in an hour rather than a
branch in a day, and a second finding they did not ask for costs them that hour.
Use the setup-baseline skill. It builds the worktree and the workspace, has
extract-computation-graph write records/computation_graph.json and
records/execution_schedule.json, then measures the base commit for speed, memory and
correctness, profiles it in full with torch-profile, and records it with
workspace.py add --verdict base. A workspace left in that shape is one
optimize can pick up later without profiling the base again.
The tolerance it derives is what step 3 reads the fix against. Without it a fix has no number for whether the job still computes the same thing.
Do not arm anything. The registry and the Claude Code
watchdog keep a campaign turning for hours, and this is one pass. They belong to
optimize.
setup-baseline left the traces under commits/<base sha>/trace/, the rendered
views beside them and the diagnosis at commits/<base sha>/report.md. This step
reads them and picks one.
Read all five views before naming anything. "The largest" is a claim about the other four, so ranking them is what earns it.
Take the top finding by what it costs in wall clock: the part not already hidden
behind other work, multiplied by its repeat count from records/computation_graph.json.
Do not rank by kernel time. A collective that is fully hidden costs nothing, and
a 2 ms stall on every one of forty blocks outranks a 60 ms one-off.
The finding carries everything torch-profile's ③ asks for. The code_anchor and
the cost ceiling are the two the user reads first.
Pick the fix by optimize's Tradeoffs: architecture, breadth, memory, precision.
Then prove it, on the same benchmark script and the same node:
Record it with workspace.py add, with the tradeoffs in the --why text.
A fix that does not hold still answers the question. The finding stands, the fix did not, and the number says by how much. Write that down rather than going after a second finding to rescue the run. Another fix for the same finding is in scope; the next finding is not.
Write latest-report.md for the reader named in contract.md, as short as you
can, carrying a status: closed line of its own:
code_anchor, what it costs as a ceilingoptimize works
through themWrite records/mistakes.md as you go, in the same turn you get something wrong.
workspace.py finish is optimize's loop condition and this is not a loop, so
do not run it. Stop here. The user decides whether to run publish-pr for an
issue and a PR, or optimize to keep going.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
9 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./convert-to-benchmark-scriptTurn the script a user really runs into a benchmark script an optimization loop can run over and over. Same shape as the real job, a few minutes long, repeatable, and leaving nothing behind. It produces the script and a table of what changed, and it does not run it./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.npx claudepluginhub openperfagent/who-ate-my-flops --plugin who-ate-my-flopsOther plugins' skills for the same job