x9-loop-engineering

x9-loop-engineering is a skill for Claude Code, Codex from xonika9/agent-skills. It costs 133 tokens per session (1,608 once invoked), scanned A, original, MIT.

A guide for designing repeated workflows in which coding agents perform work, make decisions, and verify results over multiple steps. It covers orchestrators, specialist agents, branching workflows, and long-running processes.

In plain words
What is it for?
It is for designing agent loops, manager or orchestrator skills, multi-agent workflows, evaluator cycles, and reusable versions of recurring manual processes.
Why use it?
It helps decide whether a recurring task needs an agent loop and how much coordination it actually requires. It also keeps the workflow bounded by requiring durable state, checks, and clear stopping conditions.

Skill for Claude CodeCodex

Part of the x9-agent-skills plugin — 18 skills shipped together

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/xonika9/agent-skills/x9-loop-engineering
Any agent
npx skills add xonika9/agent-skills --skill x9-loop-engineering
Clone the repo
git clone --depth 1 https://github.com/xonika9/agent-skills

Made for: Claude Code, Codex.

Or install x9-agent-skills, the plugin that ships this one along with the rest of its 18 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for x9-loop-engineering

README.md
[![agentmods](https://agentmods.dev/badge/skills/xonika9/agent-skills/x9-loop-engineering.svg)](https://agentmods.dev/skills/xonika9/agent-skills/x9-loop-engineering)
Your own site
<a href="https://agentmods.dev/skills/xonika9/agent-skills/x9-loop-engineering"><img src="https://agentmods.dev/badge/skills/xonika9/agent-skills/x9-loop-engineering.svg" alt="Measured on agentmods" height="20"></a>
Per session 133 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,608 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.1 $0.00133 $0.01608
Opus 5 $0.00067 $0.00804
Sonnet 5 $0.00027 $0.00322
Haiku 4.5 $0.00013 $0.00161

Measured 5d ago against content hash 8ea70e144e58, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

x9-loop-engineering 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 5d ago.

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/x9-loop-engineering/SKILL.md · 75 lines

How it starts

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

Loop engineering

Design loops as bounded decision systems, not repeated prompts.

Qualify the loop

Build a loop only when the work recurs, its state can live in durable artifacts, and coordination or repeated verification is a meaningful part of the cost. If the task is one-off, state is only conversational, or human judgment dominates the work, recommend a bounded delegation or linear workflow instead of adding loop machinery.

Qualify the topology

Default to the smallest topology that can satisfy the contract:

  • one agent when one context, toolset, and authority boundary are sufficient;
  • a linear workflow when order matters but no branching or independent ownership is needed;
  • a static graph when work has stable parallel branches, specialist ownership, joins, or independent gates;
  • a dynamic graph only when evidence discovered at runtime can legitimately create, cancel, merge, or reorder work.

Add a node only when it provides distinct context, tools, authority, evidence, or parallel capacity. Do not create agents merely to simulate job titles, add agreeable reviewers, or make the workflow look multi-agent.

Invariants

Every production loop needs:

  • an explicit outcome, decision contract, and authority for each load-bearing decision;
  • the smallest sufficient topology, with a demonstrated responsibility for every added stage or node;
  • a boundary contract and receiving-side acceptance check for every handoff that can change downstream work;
  • explicit ownership for every shared state field and contended resource that exists;
  • durable state sufficient to resume without reconstructing hidden context when work must survive interruption;
  • an observable completion condition plus a bounded non-convergence condition;
  • evidence proportional to the consequence, independent when self-certification would be unsafe;
  • a human gate before irreversible or externally consequential actions unless standing authority explicitly covers them;
  • an honest terminal status such as COMPLETE, DEGRADED, NOT_PROVEN, or BLOCKED.

Read the full file on GitHub · 75 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 5d ago First seen · 75 lines · 133 tokens per session scan A 8ea70e144e58

Subscribe to this mod's changes

x9-loop-engineering is a skill published in the GitHub repository xonika9/agent-skills (4 stars, last pushed 9d ago), licensed MIT. It adds 133 tokens to every session and 1,608 once invoked, about $0.0007 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.