agentleFS
OpenPerfAgentOpenPerfAgent/who-ate-my-flops/skills/init/SKILL.md

init

Skill35 starsChanged 43 days agoApache-2.0View on GitHub

Work 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.

137 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use daily-arxiv, exp-eval and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • LambenthanSkill

    daily-arxiv

    每日从 arXiv 拉取新论文,过滤相关性,auto-ingest 高优先级论文,检测 SOTA 更新

    Also in 5 projects that use this

  • LambenthanSkill

    exp-eval

    实验判决门:Review LLM 独立评判实验结果 → 4 种判决路径 → 自动更新 claims confidence、ideas status、graph edges

    Also in 5 projects that use this

  • skyllwtSkill

    exp-pilot-eval

    Pilot result evaluation — read pilot results, apply success criteria, update idea page (pilot_result, failure_reason if failed), generate PILOT_VERDICT_REPORT. Called by /ideate Phase 5 after /exp-pilot-run.

    Also in 4 projects that use this

  • skyllwtSkill

    exp-pilot-run

    Pilot experiment execution — read Pilot Spec YAML, write pilot code, run experiment(Confirm with the user before operation and require the applicant to conduct manual inspection), return results. Called by /ideate Phase 5. Does NOT modify wiki pages or judge pass/fail.

    Also in 4 projects that use this

  • gaebalaiSkill

    codex-system

    PROACTIVELY consult Codex CLI, your highly capable supporter with exceptional reasoning and task completion abilities. Codex is a trusted expert you should ALWAYS consult BEFORE making decisions on: design choices, implementation approaches, debugging strategies, refactoring plans, or any non-trivial problem. When uncertain, consult Codex. Don't hesitate - Codex provides better analysis. Explicit triggers: "think deeper", "analyze", "second opinion", "consult codex".

    Also in 3 projects that use this

  • +6 more from Lambenthan
  • +1 more from skyllwt

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 7 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 125 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Write what you prepare into a contract.md, using the template at <plugin root>/template/contract.md, where the plugin root is the directory …

    line 15
  2. Distinctive:

    Before you ask anything about the job, ask how well the user knows ML systems.

    line 31
  3. Distinctive:

    Write for that reader for the rest of init, and in every report they read later.

    line 42
  4. Distinctive:

    Ask the user for anything you cannot infer, for instance in a fresh session.

    line 54
  5. Distinctive:

    If the checkout is dirty, talk it through with the user.

    line 55
  6. Very specific:

    Write the plan into the contract's ## Correctness Instrumentation Plan section.

    line 71
  7. Distinctive:

    Do not modify the code here during the init.

    line 74
  8. Distinctive:

    Test files that matter and must not break.

    line 83
  9. Very specific:

    Write these into contract.md at ## Everything else section.

    line 86
  10. Distinctive:

    Ask the user to read contract.md and confirm that it describes the job they want optimized.

    line 93

“Common” is measured: kept by at least 6 in 10 of the 125 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Set up an automatic PyTorch performance run

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.

Step 0: how much MLSys the user knows

Before you ask anything about the job, ask how well the user knows ML systems. Give them two examples to place themselves against:

  • "I am an MLSys engineer. I could do these optimizations myself, I would rather not spend the time."
  • "I am an algorithm engineer. I do not know systems, and I will not recognise most of your optimization techniques."

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.

Step 1: the repo, environment, script, and hardware

  • Infer the repo, environment, script, and hardware from context first, then have the user confirm them. The user is the one who guarantees that the script and environment run and that the hardware is free.
  • Ask the user for anything you cannot infer, for instance in a fresh session.
  • If the checkout is dirty, talk it through with the user. What you decide has to fit the worktree layout used later.
  • Once the user hands over the script: if it was written for real training, use the convert-to-benchmark-script skill to turn it into one that suits performance work, and have the user confirm the changes. The run line in the contract names that converted version.

Step 2: the instrumentation that keeps the optimization loop correct

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.

Step 3: everything else

Depending on the job, there may be more to settle. For example:

  1. What changes are allowed? For example: adjusting system configs, enabling existing acceleration features with small code edits, installing faster backends, changing Python-level workflow code, or modifying Triton/CUDA kernels?
  2. Test files that matter and must not break.
  3. Hints from the user: is startup slow, or the steady step, or something else?

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.

Step 4: init ends

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.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.