autonomous-loop
Skill3 starsChanged 8 days agoMITView on GitHub
Run an agent autonomously in a goal-driven loop until measurable done-criteria pass, using a cheap/fast worker model for the iterations and escalating to a top-ranked supervisor model only for analysis, correct patterns and test design. Use when the user asks to "keep going until it works", "run until tests pass", "work autonomously", "loop until done", or wants to cut cost by letting a strong model supervise a cheaper one. Includes stop conditions and no-progress detection so the loop can never spin forever.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- phant0um/claude-skillstheir own version, first seen Nov 29, 2026
- felipeam86/pipe-skillstheir own version, first seen Nov 15, 2026
- asiridalugoda/autonomous-looptheir own version, first seen Sep 16, 2026
- BechsteinDigital/claude-shiplooptheir own version, first seen Jul 14, 2026
- adamziel/Skillstheir own version, first seen May 12, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- felipeam86/pipe-skills★ 25same name
- BechsteinDigital/claude-shiploop★ 4same name
- adamziel/Skills★ 1same name
- asiridalugoda/autonomous-loop★ 1same name
- phant0um/claude-skills★ 0same 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 repository26 other files it gives its agents.
- skills/ai-integration/references/agents.mdAGENTS.md
- agent-behaviorSkill
- agent-orchestraSkill
- ai-integrationSkill
- analysisSkill
- brand-ipSkill
- codebase-analysisSkill
- commerce-integrationsSkill
- company-setupSkill
- content-socialSkill
- daily-assistantSkill
- diagrams-mappingSkill
- growth-operationsSkill
- guided-discoverySkill
- infrastructure-planningSkill
- market-researchSkill
- memorySkill
- plannerSkill
- product-buildSkill
- researchSkill
- root-cause-analysisSkill
- security-operationsSkill
- software-engineeringSkill
- token-economySkill
- visual-designSkill
- workflow-automationSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 4 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
Write LOOP_STATE.md (template: references/state-template.md) with:
- Distinctive: line 29
If the done criteria are not checkable, ask the supervisor to write the test first.
- Distinctive: line 41
Run the done-criteria command (or the fastest relevant subset).
- Distinctive: line 45
Keep iterations cheap: read only what the step needs, never re-read unchanged files, summarize long output to the error signature.
- Very specific: line 80
Only then mark STATUS: DONE in LOOP_STATE.md.
- Distinctive: line 84
Stop and report to the user (never silently continue) when:
“Common” is measured: kept by at least 6 in 10 of the 5 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
Autonomous Loop (Worker + Supervisor)
Goal: reach a verifiable outcome with minimal expensive-model tokens. The worker does all the typing. The supervisor only thinks, at checkpoints.
Roles
| Role | Model tier | Does | Never does |
| Worker | cheap/fast (tier 2–3) | edits, runs commands, runs tests, updates state file | redefines the goal, declares done without proof |
| Supervisor | top-ranked (tier 1) | approves plan, diagnoses stalls, shows the correct pattern, designs tests, signs off | writes the bulk of the code, runs long iterations |
Map tiers to concrete models in references/model-tiers.md. If only one model is available, play both roles but keep the supervisor checkpoints as explicit, separate review passes.
Step 0 — Contract (before any loop)
Write LOOP_STATE.md (template: references/state-template.md) with:
- Goal — one sentence.
- Done criteria — machine-checkable: a command that exits 0, tests that pass, a metric threshold. No vague criteria ("looks good").
- Budget — max iterations (default 15), max supervisor calls (default 4), time/token cap if known.
- Scope fence — files/dirs the worker may touch.
If the done criteria are not checkable, ask the supervisor to write the test first. No test, no loop.
Step 1 — Supervisor checkpoint: plan approval
Send the supervisor only: goal, done criteria, relevant file list, and a ≤15-line worker plan. Supervisor replies in the fixed format below. Worker proceeds only after approval.
Step 2 — Worker iteration (repeat)
Each iteration is small and ends with verification:
- Pick the next single step from the plan.
- Make the change (smallest diff that could work).
- Run the done-criteria command (or the fastest relevant subset).
- Append one line to the log in
LOOP_STATE.md:#n | step | result | error signature. - Done criteria pass → go to Step 4. Otherwise continue.
Keep iterations cheap: read only what the step needs, never re-read unchanged files, summarize long output to the error signature.
Step 3 — Stall detection → escalate
Escalate to the supervisor immediately when any is true:
- Same error signature in 3 consecutive iterations.
- A diff is reverted or re-applied (oscillation A→B→A).
- 3 iterations with no change in passing-test count.
- Worker is about to touch files outside the scope fence.
- Worker is unsure why something works or fails.
Escalation packet (keep it short — this is where tokens are saved):
- Goal + done criteria
- Last 5 log lines
- The failing output, trimmed to the essential 20–40 lines
- The smallest relevant code excerpt(s)
- What has already been tried
Supervisor reply format (always)
DIAGNOSIS: <root cause in 1–3 sentences, with evidence>
CORRECT PATTERN: <the idiom/approach to use; short code sketch if needed>
TEST: <test to add or change that proves the fix>
NEXT STEPS: <1–3 concrete worker steps>
STOP?: continue | change approach | abort (reason)The supervisor must not produce a full implementation unless the worker failed twice on the same pattern.
Step 4 — Done verification (supervisor sign-off)
Before declaring success:
- Worker runs the full done-criteria command fresh and pastes the result.
- Supervisor reviews the final diff for: shortcuts (skipped/deleted tests, hardcoded outputs, disabled checks), scope violations, obvious regressions.
- Only then mark
STATUS: DONEinLOOP_STATE.md.
Hard stop conditions
Stop and report to the user (never silently continue) when:
- Iteration budget or supervisor-call budget is exhausted.
- Supervisor says
abort. - The fix requires credentials, destructive actions, or decisions only the user can make.
Final report: status, what passed, what did not, log summary, recommended next step.
Anti-patterns
- Deleting or weakening tests to make the loop "pass".
- Calling the supervisor every iteration (defeats the cost model).
- Sending whole files or full logs to the supervisor.
- Changing the done criteria mid-loop without user approval.
- Retrying the identical action after a failure.
For tool-specific setup (Claude Code subagents, API orchestration, other agents) see references/implementations.md.
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.

