A single compact coding-discipline skill for AI agents — built for small and local models.
It distills two excellent but opposite-sized sources into one 457-word skill:
| Source | What we took |
|---|---|
| andrej-karpathy-skills | The 4 behavioral rules: surface assumptions, simplicity first, surgical changes, verifiable success criteria |
| obra/superpowers | The process loop (clarify → define done → test-first → evidence before "done") and the red-flags / rationalization-table technique |
Big models can follow a 14-skill methodology. Small models can't — long process docs fall out of context, and prose rules get skipped under pressure. lean-loop compensates with:
- One file, 5 steps, <500 words — fits in any context window
- A required 4-line reply template (
Assumptions / Done means / Changed / Check output) — structural slots bind small models where prose rules fail - A red-flags table countering the exact rationalizations observed in baseline testing
Step 0 Say assumptions out loud (incl. tradeoffs the user should know)
Step 1 Define done as a runnable check
Step 2 Write the least code (a config value nothing reads is a lie)
Step 3 Run the check, paste output ("should work" ≠ done)
Claude Code (plugin marketplace):
/plugin marketplace add hermes98761234/lean-loop
/plugin install lean-loop@lean-loop
Or as a plain personal skill: cp -r lean-loop/skills/lean-loop ~/.claude/skills/
Other agents — clone the repo, then one command per harness (the skill is one markdown file; each agent just reads it from its own location):
| Agent | Command (from your project root) |
|---|---|
| Codex CLI / App | sed '1,/^---$/d' lean-loop/skills/lean-loop/SKILL.md >> AGENTS.md |
| Cursor | mkdir -p .cursor/rules && cp lean-loop/adapters/cursor/lean-loop.mdc .cursor/rules/ |
| GitHub Copilot | sed '1,/^---$/d' lean-loop/skills/lean-loop/SKILL.md >> .github/copilot-instructions.md |
| Gemini CLI | sed '1,/^---$/d' lean-loop/skills/lean-loop/SKILL.md >> GEMINI.md |
| OpenCode / others | sed '1,/^---$/d' lean-loop/skills/lean-loop/SKILL.md >> AGENTS.md |
The sed strips the Claude-specific frontmatter; everything below it is plain agent-agnostic markdown. CI verifies adapters never drift from the canonical SKILL.md.
The skill was developed with the TDD-for-documentation method from superpowers' writing-skills:
- RED — baseline agent (Haiku), pressure scenario (urgent deadline + vague scope + "make it configurable" bait): produced dead config nothing read, claimed done without running anything, hid the cache-staleness tradeoff.
- GREEN — with the skill: wired constant, real test run, pasted output.
- REFACTOR — assumptions were still skipped under time pressure → made them a required template slot → full compliance on retest.
CI runs scripts/validate.py on every push: frontmatter validity, trigger-form description, and the <500-word budget.
MIT — see LICENSE. Sources credited above; go star them.