loop-builder
Skill0 starsChanged 35 days agoMITView on GitHub
Prepare a long unattended agent run with a spending limit, a stopping condition you can check, and progress saved to files. Use when asked for unattended work, a resumable loop, or to keep Claude Code or Codex working until a verified outcome. Builds and validates the loop; launches only when execution is requested.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- AndyMelnykov/pm-loopstheir own version, first seen Oct 20, 2026
- criscatalyst/loop-buildertheir own version, first seen Sep 1, 2026
- TheMattBerman/loop-kittheir own version, first seen Jun 24, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- TheMattBerman/loop-kit★ 9same name
- criscatalyst/loop-builder★ 2same name
- AndyMelnykov/pm-loops★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository9 other files it gives its agents.
- AGENTS.mdAGENTS.md
- define-doneSkill
- interrogateSkill
- jevifySkill
- opascopeSkill
- openrouterSkill
- optimizeSkill
- planningSkill
- session-handoffSkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 6 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Read shared.md first. Keep the loop in the shared task directory.
- Distinctive: line 14
Read references/contract.md before writing its files.
- Distinctive: line 26
Read project instructions at every scope the work will touch.
- Distinctive: line 35
Write CHECKLIST.md with pending items matching the contract, NOTES.md with a checkpoint and decisions section, BLOCKERS.md with no …
- Distinctive: line 38
Run the checks once to establish the baseline.
- Very specific: line 42
Run python3 "KIT" loop validate "/full/task/path", then loop seal with that path.
- Distinctive: line 49
If asked only to build a loop, deliver the artifact path, baseline findings and the concrete launch command, then stop.
“Common” is measured: kept by at least 6 in 10 of the 3 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.
Files
Build an unattended Claude Code or Codex loop
Read shared.md first. Keep the loop in the shared task directory. Read references/contract.md before writing its files.
The portable core is an outcome, immutable criteria, durable context and independently runnable proofs. The launcher is a small foreground Python process. Neither runtime needs native goal commands or model aliases.
Build
- Identify the intended outcome and what would prove it. Use prior answers and inspected files first. Ask only for material missing choices. A focused job gets one item; a longer job gets a dependency-ordered checklist. Both use durable artifacts so a fresh runtime call has enough context.
- Read project instructions at every scope the work will touch. Put relevant complete constraint sections and the user's authority limits in SAFETY.md, with source paths. Include nested instructions in any worker's scope. Do not copy unrelated private context into a shareable loop.
- Fill CONTEXT.md with the objective, input paths, reference facts and settled decisions. Use stable headings. Fill loop.json with immutable item IDs, descriptions, dependencies, proof argument arrays and a final behavioral proof. Include verifier script paths for fingerprinting and output paths for progress detection. No proof may rely only on the worker's done claim.
- Write CHECKLIST.md with pending items matching the contract, NOTES.md with a checkpoint and decisions section, BLOCKERS.md with no unresolved entries unless actually blocked, and init.md with an explicit cold-read order.
- Run the checks once to establish the baseline. Expected task failures are allowed; missing tools, malformed proofs or nonexistent inputs are not a valid baseline. Read proof code before running it. It runs with the user's privileges, so only trusted checks are eligible.
- Run
python3 "KIT" loop validate "/full/task/path", thenloop sealwith that path. These validate structure and fingerprint criteria; they do not prove the task is complete. Never clobber an existing sealed/live loop. Reuse it to resume; create a new task for a reviewed change in scope or criteria.
Launch and resume
If asked only to build a loop, deliver the artifact path, baseline findings and the concrete launch command, then stop. If the user also asked to run it, use the appropriate command, within the already authorized scope:
python3 "KIT" loop run "/full/task/path" --runtime claude --steps 10 --seconds 300
python3 "KIT" loop run "/full/task/path" --runtime codex --steps 10 --seconds 300Replace KIT and the task path with actual resolved paths. Select the installed runtime requested by the user; leave their model selection intact. The runner starts fresh calls that read artifacts before each item, so it also resumes after context loss or a runtime switch. Inspect checkpoints and blockers before a subsequent explicit run. Clear a blocker only when its unblock condition is verified, preserving its history in NOTES.md.
Completion discipline
The worker updates deterministic item status only after showing actual proof. It never changes success criteria or verifier files. An independent reviewer must handle a judgment clause; if unavailable, record the missing review as a blocker, not a self-issued PASS. A reviewed scope amendment becomes a new sealed task linked to the old one, so removed requirements remain visible.
The runner checks all item proofs and the final proof itself. It detects criterion drift and stops for blockers, runtime failure, timeout, unchanged progress or budget exhaustion. None of those is completion. Exit 0 alone means all proofs passed. Read the completion artifact and inspect the resulting work before reporting success; a poor proof can still certify the wrong outcome.
Explain these limits: the launcher is not an OS sandbox or a scheduler; no automatic wakeup occurs. Runtime permissions may block an unattended action, and that is an actionable blocker. Do not bypass them to keep a loop alive.
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
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.

