From Loop Engine
Methodology and guardrails for AI loop engineering — running autonomous act→verify→repeat loops in Claude Code. Use when designing or running an iterative loop, writing success criteria, choosing a verify command, or deciding loop guardrails.
How this skill is triggered — by the user, by Claude, or both
Slash command
/loop-engine:loop-engineeringThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Loop engineering** is designing AI work as iterative cycles — *act → observe → verify →
Loop engineering is designing AI work as iterative cycles — act → observe → verify → repeat — that continue until a verifiable goal is met, instead of a single one-shot response. One-shot generation can't catch runtime errors, adapt to environment quirks, or confirm its output actually works; a loop closes that feedback gap. With agentic coding, quality is usually determined by the loop design (error handling, context across iterations, scoping, verification) more than by the base model.
Use a loop when the number of steps can't be predicted up front, the agent must adapt to intermediate results, and there is a way to check success (tests, type-checks, a reproducible command). Skip the loop for trivial, single-step edits.
Gate the loop on a deterministic check — a command that exits 0 only when the work is
correct (npm test, pytest, tsc --noEmit, cargo build). Deterministic checks scale and
are trustworthy; LLM self-evaluation adds cost and can hallucinate "done". Use a
completion-promise string only when no command can express success.
--max-iterations so the loop is bounded./loop-engine:plan "<goal>" — design a loop (plan + verifiable criteria + verify command)
without running it; delegates to the loop-planner agent./loop-engine:start "<goal>" --verify "<cmd>" --max-iterations <N> — start the loop. A Stop
hook re-runs the verify command each turn and re-injects the goal + failure output until it
passes, the iteration cap is hit, or no progress is detected./loop-engine:status — inspect iteration count and the last verify result./loop-engine:stop — cancel the active loop.When running inside a loop, on each turn: read the re-injected verify output, make one concrete change toward the goal, re-run the verify command yourself, then yield. Don't repeat approaches that already failed.
npx claudepluginhub juliosaraiva/claude-code-loop-pluging --plugin loop-engineGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.