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.
npx agentmods add skills/xonika9/agent-skills/x9-loop-engineeringnpx skills add xonika9/agent-skills --skill x9-loop-engineeringgit clone --depth 1 https://github.com/xonika9/agent-skillsWrote 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.
[](https://agentmods.dev/skills/xonika9/agent-skills/x9-loop-engineering)<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>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.
| Model | Per session | Once 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 |
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.
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, orBLOCKED.
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.
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.
- 5d ago First seen · 75 lines · 133 tokens per session scan A 8ea70e144e58
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.
Other skills, from other repositories
e2e-automator
Build robust end-to-end test suites with Playwright or Cypress. Covers page objects, fixtures, visual testing, and CI integration.
agent-harness-fault-injection
Use when an agent workflow needs deterministic recovery evidence for sandbox, MCP/tool, worker, checkpoint, memory, or orchestration failures.
architecture-decision-records
Comprehensive patterns for creating, maintaining, and managing Architecture Decision Records (ADRs) that capture the context and rationale behind significant technical decisions.
agent-framework-azure-ai-py
Build persistent agents on Azure AI Foundry using the Microsoft Agent Framework Python SDK.
analytics-tracking
Design, audit, and improve analytics tracking systems that produce reliable, decision-ready data.
api-security
Authorized security assessment of REST, GraphQL, WebSocket, and SOAP APIs: discovery, authentication and authorization flaws (BOLA/IDOR, JWT/OAuth), rate-limit testing, and a structured multi-phase methodology.