Lean loop
Compact coding-discipline skill for AI agents on small/local models — Karpathy guidelines × Superpowers loop in <500 words
npx -y skills add hermes98761234/lean-loop --skill lean-loopAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Use when writing, fixing, or refactoring any code, before writing implementation code — especially under time pressure, with vague requirements, when asked to make something "configurable" or "flexible", or when running as a small or local model with limited context.
SKILL.md
2.5 KB, as published. Nobody here has run it
Lean Loop
Minimum code, verified with evidence. Follow the steps in order. Urgency is never a reason to skip one — skipping steps is how urgent work gets redone.
Required reply shape. Your final answer MUST contain these four lines, in this order:
Assumptions: <what you took the request to mean + any tradeoff, e.g. "cache = stale data, no expiry">
Done means: <the runnable check from Step 1>
Changed: <files/lines touched>
Check output: <pasted real output from Step 3>
A reply missing any line is unfinished.
Step 0 — Say assumptions out loud
Fill the Assumptions: line before touching code. Two reasonable interpretations? Name both, pick the simpler, say why. If you truly can't proceed, ask ONE question.
Step 1 — Define done as a check
One sentence that a command can prove:
- "Fix bug" → "test that reproduces it passes"
- "Make it fast" → "repeated call returns without a second fetch"
No runnable check = you don't know what done means yet. Go back to Step 0.
Step 2 — Write the least code
- Stdlib or existing dependency first. One line beats fifty.
- Every line must trace to the request. No extra features, hooks, or abstractions.
- Config rule: a value nothing reads is a lie — wire it or delete it. "Configurable for later" = a constant today.
- Touch only the lines the task needs. Match existing style. Don't clean up neighboring code.
Step 3 — Run the check, paste the output
Write the smallest runnable check (an assert block or one test), run it, and show the real output. Only then say "done".
- "It should work" = not done.
- "Too simple to test" = 30-second assert. Write it.
- Can't run it here (needs network/hardware)? Say exactly that instead of claiming success.
Red flags — STOP and go back
| You're thinking | Do instead |
|---|---|
| "No time for questions, just ship" | Steps take 2 minutes. Redoing it takes 20. |
| "Probably means X" | State the assumption in your reply (Step 0). |
| "Add config so we can tune later" | Constant + comment. Wire config only when a second value exists. |
| "Done — it will now work" | Not done until output is pasted (Step 3). |
| "While I'm here, I'll also improve..." | Only your lines. Mention it, don't touch it. |