/who-ate-my-flops:initfrom who-ate-my-flops
Guides users through initial setup for PyTorch performance optimization, creating a contract.md and instrumentation for later automated optimization.
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.
step 0: how much MLSys the user knows, so you can talk to them in their language. step 1: the repo, the environment, and the script to optimize. step 2: the instrumentation that keeps the optimization loop correct. step 3: anything else you and the user find worth preparing. step 4: init ends.
Write what you prepare into a contract.md, using the template at
<plugin root>/template/contract.md, where the plugin root is the directory two
levels above this SKILL.md, which Claude Code also exposes as
${CLAUDE_PLUGIN_ROOT}. It records what you and the user agreed on. The user reads
it too, so keep it short.
During init, do not change code logic, do not build a worktree, and do not run experiments unless the user tells you to. They expect init to finish quickly.
The user has very little attention to spare. Say what you need in the most direct and shortest wording you can.
Let the user see which step of init they are standing in.
Before you ask anything about the job, ask how well the user knows ML systems. Give them two examples to place themselves against:
Anything in between is fine. Write the answer into the reader line of
contract.md, in their words.
Write for that reader for the rest of init, and in every report they read later. An MLSys engineer wants the technique and the number and no explanation. An algorithm engineer wants to hear what the change does to their training, in the words they already use: batches, steps, memory, loss. Explain a systems term the first time it comes up, or leave it out. If you are unsure whether they followed, ask once; do not check after every message.
run line in the contract
names that converted version.Briefly propose a few places to check correctness based on the workload, such as the loss, model outputs, or tensor shapes. Ask the user: "What else should we check?" Agree on the check locations before writing the instrumentation plan.
Name the recorder in the plan, and prefer one the repo already has rather than
installing a new one. imp_genai ships research/core/probe.
Write the plan into the contract's ## Correctness Instrumentation Plan section.
That is the section optimize reads before it puts the calls in.
Do not modify the code here during the init.
Depending on the job, there may be more to settle. For example:
Write these into contract.md at ## Everything else section.
They can come from your own reading of the code and then get confirmed, or the user can propose them.
Ask the user to read contract.md and confirm that it describes the job they want
optimized. Note contract.md should be written concisely for human to understand (recommend humanizer tool). Once they confirm, tell them to run
the optimize skill, /who-ate-my-flops:optimize in Claude Code and
$who-ate-my-flops:optimize in Codex, and the optimization runs on its
own from there. After that point you do not go back to the user with questions.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
pytorch, performance-optimization, contract, instrumentation, mlsys
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./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.npx claudepluginhub openperfagent/who-ate-my-flops --plugin who-ate-my-flopsOther plugins' skills for the same job