loop
/loop
Orchestrate a goal through subagent iterations. Use when the user gives a goal to run "the loop" on — decomposes the goal, dispatches one subagent per iteration with fresh context, verifies each result before memory is committed.
- Author
- slogsdon ↗
- Repository
- loop-and-gate-foundation ↗
- Licence
- MIT
- Last repository change
- 30.09.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 30.09.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Orchestrate a goal through subagent iterations. Use when the user gives a goal to run "the loop" on — decomposes the goal, dispatches one subagent per iteration with fresh context, verifies each result before memory is committed.
Triggers from the description
Original author description
Orchestrate a goal through subagent iterations. Use when the user gives a goal to run "the loop" on — decomposes the goal, dispatches one subagent per iteration with fresh context, verifies each result before memory is committed.
How it works
- Why this shape
- Steps
- Rules
SKILL.md preview
---
name: loop
description: Orchestrate a goal through subagent iterations. Use when the user gives a goal to run "the loop" on — decomposes the goal, dispatches one subagent per iteration with fresh context, verifies each result before memory is committed.
---
# Loop
One job: drive a goal to done through iterations, keeping the human in the
gate. You (the main session) NEVER do the work yourself — you orchestrate,
verify, and commit. Subagents do the work, one iteration each, each with a
fresh context.
## Why this shape
- Each subagent starts clean — no confusion carryover between iterations
(the fresh-context property that makes loops reliable).
- Your context stays small: goal, iteration summaries, verdicts. You can
run many iterations in one sitting without rotting your own window.
- You verify every iteration BEFORE its memory writes are committed —
self-improvement only compounds on verified work.
## Steps
1. Use the `session-start` skill yourself (load MEMORY.md, latest daily +
reflection) so you can decompose and judge with context.
2. Break the goal into iteration-sized tasks: each completable by one agent
in one run, with a pass/fail check you can state up front. Show the user
the task list. Adjust if they object.
3. For each task, dispatch ONE fresh-context subagent — the Agent tool, general-purpose (Claude Code), or the `subagent` tool with
`agent: "worker"` and `context: "fresh"` (pi) —
with this brief:
```
You are one iteration of an agent loop in <repo path>.
1. Read vault/MEMORY.md, the latest note in vault/Daily/, and the latest
note in vault/Reflections/. Apply the reflection's lesson.
2. Do exactly this task: <task>. Done means: <pass/fail criteria>.
3. Follow skills/capture/SKILL.md to save any durable facts to
vault/Knowledge/ (update existing notes over creating duplicates).
4. Follow skills/reflect/SKILL.md steps 1-3 to log the session and write
a reflection — but do NOT git commit (the orchestrator commits).
5. Return: what you did, what you captured, outcome
(done/partial/blocked), and your one-sentence lesson.
```
Run iterations SEQUENTIALLY — subagents write shared memory files
(daily note, MEMORY.md). Parallel iterations corrupt them. Parallel is
fine only for read-only research subagents that write nothing.
4. Verify the iteration: check the task's pass/fail criteria yourself
(read the output, run the check, inspect `git -C <base> diff` of the vault —
`<base>` = `cat ~/.config/loop-and-gate/vault`, or the clone's `vault/`).
- Pass → read `git -C <base> status --porcelain` first, then commit only the
paths this iteration wrote (never `add -A` — the vault may auto-sync
mid-iteration and sweep someone else's work into your commit):
`git -C <base> add <paths> && git -C <base> commit -m "chore: loop iteration — <task>"`.
Any repo code/skill changes commit separately in this repo.
- Fail → `git -C <base> checkout -- <those same paths>` to discard its writes, then
re-dispatch once with your feedback appended to the brief. Two fails →
stop and ask the user.
5. Between iterations, give the user one line: task, verdict, lesson. This
is the human gate — pause if they want to steer.
6. When all tasks are done (or you're blocked), use the `reflect` skill
yourself to close out the orchestration session: what the loop achieved,
what the decomposition got wrong, one lesson.
## Rules
- Never parallelize memory-writing subagents.
- Never commit an unverified iteration. Verification is what separates
compounding from thrashing.
- If a subagent's reflection contradicts your verification (it says done,
the check fails), record YOUR verdict in the daily note — external
verification outranks self-report.
- Improvement passes (the improve skill) stay in the main session,
interactive. Never delegate improve to a subagent.
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · slogsdon/loop-and-gate-foundation | 100 | MIT |
| mickeyyaya/evolve-loop | 100 | Apache-2.0 |
| relai-ai/agent-eval-loop | 100 | Apache-2.0 |
| SethGammon/Citadel | 100 | MIT |
| alirezarezvani/claude-skills | 100 | MIT |
| x-cmd/x-cmd | 100 | Apache-2.0 |
| in-the-loop-labs/pair-review | 100 | Apache-2.0 |
| railly/skills | 100 | MIT |
| Mineru98/skills-store | 100 | MIT |
Database snapshot: 13.11.2026 · package version 3d7b46c7bca3 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 91orchestrate
Orchestrate one natural-language goal into parallel tmux Claude Code sessions. It decomposes the goal (with your approval), plans each task with wiki-plan, implements and reviews, runs an integration test, and merges after your confirmation. Use to build a goal across multiple… - 95ralph-loop
Execute an autonomous development loop that picks one task per iteration, implements it, verifies it, and commits the result — each iteration in a fresh context window. Use when user runs /ralph, mentions "ralph loop", "autonomous loop", "builder verifier", "run tasks… - 90harness-loop
Run a large goal as a loop with one check, a progress file on disk and a turn cap. Uses the deliver workflow for multi-file work. Use when the user asks you to keep going until a big goal is finished. - 90goal-loop
Run a task as a goal loop. Write a contract (goals, exit criteria, checks, budget), work, verify with an independent agent, repeat on FAIL until PASS or budget. Use for "goal loop", "verify until done", or exit criteria plus a verifier. - 100goal-harness
Turn a fuzzy task into a goal with five elements — a concrete outcome, a verification that proves it, constraints that fence the scope, an iteration policy, and error handling — plus a rubric, then run it as an executor-reviewer loop that stops only when the rubric passes or a… - 100goal-loop
Draft /goal prompts and explain persistent agent loops. Use for goal or Ralph loops, autonomous run setup, monitoring, and troubleshooting.