run-loop skill
Chain-aware unattended loop driver for the Agentic Engineering suite. Use ONLY when the user explicitly asks to run multiple implementation-plan tasks unattended — "run the loop", "run-loop M2", "work through milestone M2 without stopping", "run the next N tasks", "keep going until blocked". Never self-trigger for a single task or an ordinary coding request. Branch → build → draft PR → dispatch the verifier → checkpoint → repeat, until the target is reached, the circuit breaker trips (3 FAILs on one task), or the task budget is spent. Never merges.
- GitHub stars
- 5
- Files
- 1
- Last commit
- Jul 3, 2026
- License
- MIT
- Allowed tools
- —
What does the run-loop skill do?
run-loop is an agent skill. Chain-aware unattended loop driver for the Agentic Engineering suite. Use ONLY when the user explicitly asks to run multiple implementation-plan tasks unattended — "run the loop", "run-loop M2", "work through milestone M2 without stopping", "run the next N tasks", "keep going until blocked". Never self-trigger for a single task or an ordinary coding request. Branch → build → draft PR → dispatch the verifier → checkpoint → repeat, until the target is reached, the circuit breaker trips (3 FAILs on one task), or the task budget is spent. Never merges.
How to install the run-loop skill
Each command copies the skill folder into the client's skills directory. Restart the client or start a new session to load it.Install the run-loop skill in Plugin
/plugin marketplace add affectionatec/agentic-engineering /plugin install agentic-engineering@agentic-engineering
Install the run-loop skill in Claude Code
~/.claude/skills/run-loop/SKILL.md
$ npx degit affectionatec/agentic-engineering/skills/run-loop ~/.claude/skills/run-loopInstall the run-loop skill in Claude Code (project)
.claude/skills/run-loop/SKILL.md
$ npx degit affectionatec/agentic-engineering/skills/run-loop .claude/skills/run-loopInstall the run-loop skill in Codex
~/.agents/skills/run-loop/SKILL.md
$ npx degit affectionatec/agentic-engineering/skills/run-loop ~/.agents/skills/run-loopInstall the run-loop skill in Gemini CLI
~/.gemini/skills/run-loop/SKILL.md
$ npx degit affectionatec/agentic-engineering/skills/run-loop ~/.gemini/skills/run-loopInstall the run-loop skill in Claude.ai
npx degit affectionatec/agentic-engineering/skills/run-loop run-loop && zip -r run-loop.zip run-loop # claude.ai → Customize → Skills → + → Create skill → Upload a skill → run-loop.zip
SKILL.md
View on GitHubRun Loop
Drive the documentation chain end-to-end without per-task prompting. You are the producer; verification is dispatched to a fresh-context verifier, never self-graded; merging is never yours.
Target
Parse the user's instruction:
- A milestone (e.g.
M2) → run its tasks in dependency order until the milestone is done - A task ID (e.g.
M2-T3) → run exactly that task until-blocked→ keep taking the next unblocked task until nothing is runnablemax-tasks=N→ cap on tasks this run (default 5; the user must raise it explicitly for longer runs)
No target given → ask for one before looping. Do not guess.
Preconditions — abort with a clear message if unmet
AGENTS.md,docs/plans/implementation-plan.md, anddocs/status.mdexist. If not, stop and route to theusing-agentic-engineeringrouter — a loop without the chain is just unsupervised guessing.- Working tree is clean and
mainis up to date. - The In-Flight Checkpoint in
docs/status.mdisnone. If it isn't, the previous session crashed — run the status-tracker recovery protocol first, then loop.
Loop body — per task
- Pick the next unblocked task for the target (STATUS module table + plan dependency order).
- Branch per the git-workflow skill:
task/<task-id>-<slug>from up-to-date main. - Build to the spec. Producer self-check: lint clean, full suite passing, test ratchet holds.
- Checkpoint
docs/status.md: In-Flight Checkpoint updated, module table → 🔍. - Ship: push the branch, open a draft PR whose description carries the task reference and done condition (git-workflow PR protocol).
- Verify: dispatch a fresh-context verifier with the task ID, branch name, and done-condition location — the bundled
verifiersub-agent where the harness supports it, otherwise any fresh-context mechanism per the independent-verification skill (a fresh session or separate agent). Never verify your own work in this conversation. - On PASS: STATUS module table → ✅ with verdict + PR references; flip the PR from draft to ready; proceed to the next task.
- On FAIL: fix on the same branch (each round noted in the PR), re-dispatch the verifier. Three consecutive FAILs on one task stops the entire loop — escalate to the user with the verdict history.
Stop conditions — whichever comes first
- Target reached
- Circuit breaker: 3 consecutive FAILs on one task
max-tasksbudget spent- No unblocked tasks remain
- A precondition broke mid-run (e.g. the tree turned dirty outside your work)
Wind-down — always, even on abort
- Finalize
docs/status.md: module table, header block, handoff log entry; In-Flight Checkpoint reset tonone. - Report: tasks completed (with PR + verdict references), tasks failed (with the last verdict), tasks remaining, and exactly where and why the loop stopped.
Hard rules
- Never merge. The loop's output is a queue of verified draft→ready PRs. Merging belongs to the human gate, after a human has read each diff.
- Never weaken a done condition to make the loop converge — that is escalation, not negotiation.
- Checkpoint before every risky step. A crash must cost at most one task.
- AGENTS.md boundaries apply to every iteration — the loop is not a license to skip the chain.
Files in this skill
1run-loop skill questions
How do I install the run-loop skill in Claude Code?
Run npx degit affectionatec/agentic-engineering/skills/run-loop ~/.claude/skills/run-loop. Claude Code loads skills from ~/.claude/skills (all projects) or .claude/skills (one project) and uses a skill when its description matches the task.
Which clients can use the run-loop skill?
Any client that reads the Agent Skills format: Claude Code, Codex, Gemini CLI and claude.ai (upload as a ZIP). Scripts in the skill run only where the client allows code execution.