run-loop

An unattended task runner for an Agentic Engineering implementation plan. It works through related tasks in dependency order, meaning it handles prerequisites before tasks that rely on them.

In plain words
What is it for?
Use it to run a named milestone, one task, or the next limited number of unblocked tasks until the work is complete or no task can proceed.
Why use it?
It removes the need to prompt the agent after every task while preserving checkpoints and independent verification.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/affectionatec/agentic-engineering/run-loop
Any agent
npx skills add affectionatec/agentic-engineering --skill run-loop
Clone the repo
git clone --depth 1 https://github.com/affectionatec/agentic-engineering

Made for: Claude Code, Codex.

Per session 119 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 909 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00119 $0.00909
Opus 5 $0.00060 $0.00454
Sonnet 5 $0.00024 $0.00182
Haiku 4.5 $0.00012 $0.00091

Measured yesterday against content hash 21d56df5235a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

run-loop scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/run-loop/SKILL.md · 57 lines

How it starts

The opening of the file, as written. The whole thing — 57 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Run 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 runnable
  • max-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

  1. AGENTS.md, docs/plans/implementation-plan.md, and docs/status.md exist. If not, stop and route to the using-agentic-engineering router — a loop without the chain is just unsupervised guessing.
  2. Working tree is clean and main is up to date.
  3. The In-Flight Checkpoint in docs/status.md is none. If it isn't, the previous session crashed — run the status-tracker recovery protocol first, then loop.

Loop body — per task

  1. Pick the next unblocked task for the target (STATUS module table + plan dependency order).
  2. Branch per the git-workflow skill: task/<task-id>-<slug> from up-to-date main.
  3. Build to the spec. Producer self-check: lint clean, full suite passing, test ratchet holds.
  4. Checkpoint docs/status.md: In-Flight Checkpoint updated, module table → 🔍.
  5. Ship: push the branch, open a draft PR whose description carries the task reference and done condition (git-workflow PR protocol).
  6. Verify: dispatch a fresh-context verifier with the task ID, branch name, and done-condition location — the bundled verifier sub-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.
  7. On PASS: STATUS module table → ✅ with verdict + PR references; flip the PR from draft to ready; proceed to the next task.
  8. 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.

Read the full file on GitHub · 57 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 57 lines · 119 tokens per session scan A 21d56df5235a

Subscribe to this mod's changes

run-loop is a skill published in the GitHub repository affectionatec/agentic-engineering (4 stars, last pushed 2mo ago), licensed MIT. It adds 119 tokens to every session and 909 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.