loopnext
Orchestrates deterministic agent loops by executing single verified task steps.
Install
mkdir -p .claude/skills/loopnext && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/13665" && unzip -o skill.zip -d .claude/skills/loopnext && rm skill.zipInstalls to .claude/skills/loopnext
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Continue a repository-owned state-machine agent loop one bounded, verified transition at a time. Use when the user says "loopnext", "$loopnext", "continue the loop", "continue the decomp loop", or asks Codex to act as an orchestrator for a serialized task loop stored in repo files such as GOAL, ROADMAP, STATE, LOG, or a loop runner script.Key capabilities
- →Read repository instructions and loop files
- →Run loop status commands
- →Execute exactly one active task or sub-milestone
- →Classify evidence produced by the step
- →Report current phase and verification results
How it works
This skill acts as a loop orchestrator, reading repository state and executing a single, verifiable step in a serialized task loop. It then reports the status and any manual test requirements.
Inputs & outputs
When to use loopnext
- →Continue automated decompilation loops
- →Execute verified task milestones
- →Monitor status of task runners
About this skill
Loopnext
Purpose
Act as the loop orchestrator, not an open-ended planner. The repo owns state; chat history does not.
For YFM3 decomp/recomp work, the state files are:
decomp/GOAL.mddecomp/ROADMAP.mddecomp/STATE.jsondecomp/LOG.mddecomp/scripts/decomp-state.ts
Operating Rules
- Read the repo instructions first:
AGENTS.md, then the loop files above when present. - Run the loop status command when available. For YFM3:
bun decomp:state status(bun decomp:loop statusis a compatibility alias). - Execute exactly one active task or the smallest verifiable sub-milestone needed to unblock that task.
- Do not create a backlog, broaden scope, start speculative work, or advance multiple conceptual phases.
- Prefer extending the loop runner/verifier over relying on prose.
- Keep generated binaries and local artifacts out of git.
- Classify the evidence produced by the step using
decomp/GOAL.md. - Do not request manual emulator testing when the artifact is byte-identical to the original disc.
- After a user confirms a real manual gate, record it through the loop runner and stop or proceed only to the next status check.
Continuation Policy
Default $loopnext behavior for the YFM3 decomp/recomp loop is: continue through
bounded, deterministic, verified non-manual milestones until the next real manual-test
gate is produced. A real manual gate must add evidence that hashing cannot provide; being
non-byte-identical is necessary for many manual gates, but not sufficient on its own.
Do not stop for manual testing just because a semantic no-op instruction was re-encoded. That is low-value bit churn unless it also produces an observable runtime signal or covers a meaningful integration risk. Prefer more byte-identical linked-source coverage or a real runtime probe such as a TTY/log signal.
For non-YFM3 loops, or when the repo does not define a clear continuation contract, fall back to one bounded milestone per invocation.
Continue through multiple deterministic loop steps only while each next step is already defined, verifiable, and non-manual. Stop when:
- a manual test is required,
- a verifier fails,
- a blocker appears,
- continuing would broaden scope beyond the current finite roadmap.
If the user confirms that a manual gate passed and invokes $loopnext, record the gate
through the loop runner first, then continue under the same default policy until the next
manual gate. If the user asks only to record or only for status, do not continue.
If the roadmap ends at an abstract placeholder, do not bounce the decision back to the user by default. First try to refine the roadmap to the next concrete, user-visible, testable milestone that moves toward decomp/GOAL.md. Stop for the user only when the remaining choice changes direction, risk, or scope rather than merely filling in the next obvious verification step.
Do not grow byte_replay_unit coverage as a substitute for recompilation progress. Once a byte-replay seed exists, the next loop target is source_generated_unit: bytes emitted from repo-controlled source logic rather than copied bytesLe.
Every final response must include one of:
Manual test: not requiredManual test: required: <exact action/path>
For every manual-test request, also include a concise Change under test: line.
This line should name the generated range and the behavioral/runtime reason manual testing
adds evidence. If no such line can be written honestly, keep advancing deterministic
automation instead of creating a manual gate.
Workflow
- Inspect state:
bun decomp:state status
- Read
decomp/STATE.jsonanddecomp/ROADMAP.md. - Identify the active phase and its pass condition.
- Implement one narrow change that makes the pass condition objectively checkable.
- Run the phase verifier or add one if the phase has no verifier yet.
- Run repo-required checks:
bun typecheck
bun lint
bun run test
- If the verifier passes, update state only through the loop runner or a documented legal transition.
- Report:
- current phase
- evidence class
- source-generated executable bytes
- byte-replay executable bytes
- changed files
- commands run
- verification result
- next gate or exact manual action
- manual test status
When not to use it
- →The task requires open-ended planning
- →The task involves creating a backlog or broadening scope
- →The task requires speculative work or advancing multiple conceptual phases
Limitations
- →The skill executes exactly one active task or the smallest verifiable sub-milestone
- →The skill does not create a backlog, broaden scope, start speculative work, or advance multiple conceptual phases
- →The skill stops when a manual test is required, a verifier fails, a blocker appears, or continuing would broaden scope
How it compares
This skill ensures bounded, verified progress through a state machine by executing one step at a time, preventing scope creep and ensuring reproducibility, unlike open-ended planning.
Compared to similar skills
loopnext side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| loopnext (this skill) | 0 | 1mo | Review | Intermediate |
| autonomous-agents | 10 | 6mo | No flags | Advanced |
| agent-goal-planner | 2 | 6mo | No flags | Advanced |
| planner | 1 | 6mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
autonomous-agents
davila7
Autonomous agents are AI systems that can independently decompose goals, plan actions, execute tools, and self-correct without constant human guidance. The challenge isn't making them capable - it's making them reliable. Every extra decision multiplies failure probability. This skill covers agent loops (ReAct, Plan-Execute), goal decomposition, reflection patterns, and production reliability. Key insight: compounding error rates kill autonomous agents. A 95% success rate per step drops to 60% b
agent-goal-planner
ruvnet
Agent skill for goal-planner - invoke with $agent-goal-planner
planner
solatis
Interactive planning and execution for complex tasks. Use when user asks to use or invoke planner skill.
hierarchical-coordinator
MadAppGang
Prevent goal drift in long-running multi-agent workflows using a coordinator agent that validates outputs against original objectives at checkpoints. Use when orchestrating 3+ agents, multi-phase features, complex implementations, or any workflow where agents may lose sight of original requirements. Trigger keywords - "hierarchical", "coordinator", "anti-drift", "checkpoint", "validation", "goal-alignment", "decomposition", "phase-gate", "shared-state", "drift detection".
workflow-router
parcadei
Goal-based workflow orchestration - routes tasks to specialist agents based on user goals
loki-mode
davila7
Multi-agent autonomous startup system for Claude Code. Triggers on "Loki Mode". Orchestrates 100+ specialized agents across engineering, QA, DevOps, security, data/ML, business operations, marketing, HR, and customer success. Takes PRD to fully deployed, revenue-generating product with zero human intervention. Features Task tool for subagent dispatch, parallel code review with 3 specialized reviewers, severity-based issue triage, distributed task queue with dead letter handling, automatic deployment to cloud providers, A/B testing, customer feedback loops, incident response, circuit breakers, and self-healing. Handles rate limits via distributed state checkpoints and auto-resume with exponential backoff. Requires --dangerously-skip-permissions flag.