/agent-loop-skill:agent-loop-skillfrom agent-loop-skill
Turns open-ended agent tasks into repeatable loops with contracts, disk-backed state, role separation, verification traces, restart criteria, and harness cleanup. Use for multi-step coding, research, design, debugging, or cross-session tasks needing planning and recovery.
Ships in agent-loop-skill. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Use this skill to turn an open-ended agent task into a repeatable loop that can run, verify, recover, and finish without relying only on chat context.
Do not use the full loop for trivial one-line answers, simple typo fixes, or single commands with obvious output.
When the task is non-trivial:
.agent-loop/contract.md..agent-loop/progress.md..agent-loop/log.md.Convert the request into a loop before doing the work.
Define:
If chat messages are repeating without progress, stop and write the loop to disk.
Use three roles by default:
Add a Referee only when the roles disagree. The Referee arbitrates; it does not expand scope.
Before writing final code or content, write .agent-loop/contract.md.
Use this structure:
Goal:
In scope:
Out of scope:
Definition of done:
Acceptance criteria:
Validation commands:
Subjective scoring criteria:
Risk assumptions:
Stop conditions:
Restart conditions:
Final deliverables:
Avoid vague criteria. Each item must be checkable through command output, screenshot, trace, log, diff, checklist, or scorecard.
For long work, maintain these files:
.agent-loop/contract.md
.agent-loop/progress.md
.agent-loop/log.md
Use optional files only when useful:
.agent-loop/state.json
.agent-loop/scorecard.md
.agent-loop/defects.md
.agent-loop/traces/
If these files cannot describe the state clearly, split the task.
Append to .agent-loop/log.md; do not rewrite history.
Restart from the contract when:
Before restarting, append the failure reason and evidence to .agent-loop/log.md.
For design, writing, UX, product, architecture, or taste-heavy work, write the scoring criteria before judging the result.
Default dimensions:
| Dimension | Question |
|---|---|
| Functionality | Does it solve the real target problem? |
| Simplicity | Does it avoid unnecessary abstraction and scope? |
| Craft | Are details, naming, flow, and edge cases handled well? |
| Originality | Does it show judgment instead of copying a template? |
Score 0-10 and write one sentence of evidence per dimension.
When references exist, compare against at least one strong sample, one weak sample, and the current output.
Judge from evidence, not intuition.
Useful traces include:
If trace evidence conflicts with intuition, trust the trace and create a smaller reproduction.
Before delivery, inspect whether the harness still helps.
Review:
Delete, archive, or justify anything that should not remain in the final project.
At the end of each round, update .agent-loop/progress.md:
Current bottleneck:
Why this is the bottleneck:
How the next round will verify it is solved:
When coding is solved, planning may become the bottleneck. When planning is solved, verification may become the bottleneck. Keep looking for the current constraint.
Only finish when:
.agent-loop/progress.md has no unresolved blocker.agent-loop/log.md explains key decisions and failed attemptsUse agent-loop-skill for this task. Write the contract first, keep state in .agent-loop, separate Planner/Generator/Evaluator, verify each round with traces, and restart if the same acceptance item fails twice.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub dososo/agent-loop-skill --plugin agent-loop-skillOther plugins' skills for the same job