loop-engineering
Skill5 starsChanged 5 months agoMITView on GitHub
Help the user turn a rough idea into a full-context, detailed loop-engineering prompt and goal. Classifies the loop, walks the building blocks, scaffolds durable memory, and emits a ready-to-run prompt for /loop. Use when the user wants to design a loop, build an autonomous/self-running agent loop, automate a recurring task as a loop, or says 'loop engineering' / 'design a loop' / 'make this a loop'.
- Deletes or force-pushes
- Commits and pushes
33 other projects use a version of this.
Adopted by
Most recently taken up by
- vpeetla-ai/venkat-ai-platformtheir own version, first seen Nov 8, 2026
- Mark393295827/graph-engineering-architecturestheir own version, first seen Nov 8, 2026
- jggomez/expert-ai-developer-skillstheir own version, first seen Nov 6, 2026
- Hakkadaikon/hymmetheir own version, first seen Oct 26, 2026
- vpeetla-ai/swarm-agent-patterntheir own version, first seen Oct 20, 2026
- axross/skillstheir own version, first seen Oct 13, 2026
Used with
Projects with it also use aegis-gateway, deploy-vercel-render and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
vpeetla-aiSkillaegis-gateway
Integrate AegisAI gateway before tool side effects (notify, publish, deploy). Use when adding Slack/Telegram/WhatsApp notify, content publish, or any irreversible external action in VAP, AegisLoop, or ai-content-factory.
Also in 6 projects that use this
vpeetla-aiSkilldeploy-vercel-render
Deploy vpeetla-ai demos: Vercel static/Next.js frontends, Render FastAPI backends, env vars, free tier gotchas. Use when shipping demos, fixing deploy failures, or adding render.yaml / vercel.json.
Also in 6 projects that use this
HermeticOrmusSkilllanggraph-orchestration
LangGraph stateful multi-agent graphs with categorical coordination patterns and cyclic workflows. Use when building stateful AI agent systems, implementing multi-agent orchestration with conditional routing, creating cyclic workflows with persistence, or designing graph-based AI pipelines with checkpointing and human-in-the-loop patterns.
Also in 6 projects that use this
junimnjwSkillagentic-engineering
Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing.
Also in 7 projects that use this
- +8 more from vpeetla-ai
Other versions33 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 33
- bojieli/ai-agent-book-projects★ 53ksame name
- bojieli/ai-agent-book★ 53ksame name
- huytieu/COG-second-brain★ 1.3ksame name
- akitaonrails/my-skills★ 283same name
- jggomez/expert-ai-developer-skills★ 31same name
- aiconnai/agentshield★ 21same name
- sxivansx/loop-engineering★ 10same name
- Mark393295827/graph-engineering-architectures★ 4same name
- aiconnai/engram★ 3same name
- Connected-Mate/fable-mindset★ 2same name
23 more not listed
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.
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 3 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 27 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 14
Do NOT emit the final loop prompt, run anything, install any hook/cron, or invoke /loop or /schedule until you have presented the design …
- Distinctive: line 21
Create a todo per item and complete them in order:
- Very specific: line 58
Run scripts/scan-harness.sh --project-dir <project>.
- Very specific: line 63
Read the idea and define det vs non-det (see loop-patterns.md §5).
- Distinctive: line 71
ONLY what you can't infer.
- Very specific: line 85
Ask the user for hard rules the loop must never cross — forbidden paths (migrations, prod config), forbidden commands (git push origin …
- Very specific: line 91
Ask for a time/cadence (interval like 15m, or a cron/specific time), or skip → run as goal (self-paced until done).
- Very specific: line 100
Run scripts/init-memory.sh --topic <topic> --project-dir <project>.
- Very specific: line 107
Write docs/loops-engineering/YYYY-MM-DD-<topic>.md covering: classification + why, goal, building-block choices, env, the 7 things, …
“Common” is measured: kept by at least 6 in 10 of the 27 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
Loop Engineer
Turn a rough idea into a full-context, detailed loop — a ready-to-run prompt + goal, backed by durable memory. You design the system that prompts the agent; you do not run it.
Reference (read before the dialogue): reference/loop-patterns.md.
<HARD-GATE>
Do NOT emit the final loop prompt, run anything, install any hook/cron, or invoke /loop
or /schedule until you have presented the design and the user has approved it. The skill
produces a design + memory + prompt; the human decides when it runs.
</HARD-GATE>Checklist
Create a todo per item and complete them in order:
- Scan harness — run
scripts/scan-harness.sh. - Classify the loop — deterministic vs non-deterministic.
- Walk the building blocks — gap-only questions, one at a time.
- Guardrails — ask for restrictions the loop must never cross (skippable).
- Scheduling — ask for a time/cadence, or skip → run as goal.
- Design state schema — critique the goal, derive the minimal state.
- Init memory — run
scripts/init-memory.sh, then author goal-specific state files. - Write design doc —
docs/loops-engineering/YYYY-MM-DD-<topic>.md. - Self-review — dispatch the
reference/loop-design-reviewer.mdsubagent. - Approval gate — present design; on approval, emit the loop prompt + run instructions.
Flow
digraph loop_engineer {
"Scan harness" -> "Classify det/non-det";
"Classify det/non-det" -> "Non-det?";
"Non-det?" -> "Ask goal" [label="yes"];
"Non-det?" -> "Walk building blocks" [label="no"];
"Ask goal" -> "Walk building blocks";
"Walk building blocks" -> "Guardrails (skippable)";
"Guardrails (skippable)" -> "Scheduling (or skip)";
"Scheduling (or skip)" -> "Design state schema";
"Design state schema" -> "Init memory + author state";
"Init memory + author state" -> "Write design doc";
"Write design doc" -> "Self-review subagent";
"Self-review subagent" -> "User approves?";
"User approves?" -> "Write design doc" [label="changes"];
"User approves?" -> "Emit loop prompt + run instructions" [label="yes"];
}Steps in detail
1. Scan harness
Run scripts/scan-harness.sh --project-dir <project>. It returns JSON:
{ skills[], agents[], mcp[], hooks[], gitWorktreeCapable }. Use it to prefill which
skills/sub-agents/MCP the loop can leverage and whether a worktree env is feasible.
2. Classify
Read the idea and define det vs non-det (see loop-patterns.md §5).
- Deterministic → a real pass/fail check exists (tests/build/lint/audit).
- Non-deterministic → ask the user for the goal; if no measurable check can be derived, the verification gate is AI-as-judge against that goal. State your classification and reasoning so the user can override.
3. Walk the building blocks (gap-only)
One question at a time, multiple-choice when possible. Prefill from the scan + idea; ask ONLY what you can't infer.
| Block | Ask / infer |
| Scheduling | (handled in step 5) |
| Worktree | ask: isolated git worktree, or current dir (only offer worktree if gitWorktreeCapable) |
| Skills | which scanned skills to leverage (prefill) |
| MCP | which scanned MCP servers to use (prefill) |
| Sub-agents | maker/checker split? default ON for non-trivial loops. Prefer reusing scanned agents[] for the implementer/checker roles when a fit exists |
Also resolve 7-things gaps: verification gate, termination condition + max iterations, error handling, cost/budget.
4. Guardrails (skippable)
Ask the user for hard rules the loop must never cross — forbidden paths (migrations,
prod config), forbidden commands (git push origin main, rm -rf), forbidden actions
(deleting data, paid API calls). User may skip. This is distinct from the verification
gate: gate = done?, guardrails = allowed? (see loop-patterns.md §6).
5. Scheduling (or skip)
Ask for a time/cadence (interval like 15m, or a cron/specific time), or skip → run as
goal (self-paced until done). This drives the run instruction emitted at the end
(loop-patterns.md §8).
6. Design state schema
Critique the goal: what must persist so the next iteration/agent knows where things
stand after a context reset? Apply the rubric (loop-patterns.md §7). Keep it minimal.
7. Init memory + author state
Run scripts/init-memory.sh --topic <topic> --project-dir <project>. It creates the
memory dir + generic run-log.md and budget.md. Then you author the goal-specific
state file(s) with Write (e.g. STATE.md, queue.md, classifications.json) matching
your schema. If guardrails were given, write guardrails.md. Fill the real
max-iterations/budget into budget.md.
8. Write design doc
Write docs/loops-engineering/YYYY-MM-DD-<topic>.md covering: classification + why, goal,
building-block choices, env, the 7 things, guardrails, scheduling/run mode, the derived
state (with file list), and the assembled loop prompt.
9. Self-review
Dispatch the subagent from reference/loop-design-reviewer.md. Fix any blocking issues
inline before presenting.
10. Approval gate → emit
Present the design. On approval ONLY, emit:
- the filled loop-prompt skeleton (
loop-patterns.md§11), and - the run instruction for the chosen mode (
loop-patterns.md§8) — e.g./loop 15m <prompt>, a/scheduleroutine, or self-paced/loop <prompt>.
Tell the user they can review the doc + memory files, then run it themselves.
Principles
- One question at a time; multiple-choice preferred; ask only gaps.
- YAGNI on state and features.
- The human runs the loop. The skill stops at the approval gate.
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.

