LoopX is a provider-neutral control plane that gives long-running AI-agent work persistent state, decisions, governance, recovery, and handoffs across different agent harnesses. It is for managing and reviewing durable work performed by Codex, Claude Code, Cursor, dsh, or custom agent systems.
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/huangruiteng/loopx/loopx-self-repairnpx skills add huangruiteng/loopx --skill loopx-self-repairgit clone --depth 1 https://github.com/huangruiteng/loopxWrote 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/huangruiteng/loopx/loopx-self-repair)<a href="https://agentmods.dev/skills/huangruiteng/loopx/loopx-self-repair"><img src="https://agentmods.dev/badge/skills/huangruiteng/loopx/loopx-self-repair.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 | $0.00102 | $0.01831 |
| Opus 5 | $0.00051 | $0.00915 |
| Sonnet 5 | $0.00020 | $0.00366 |
| Haiku 4.5 | $0.00010 | $0.00183 |
Grade A, and why
loopx-self-repair 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 — 158 lines — stays where its author put it; the contents beside it link to each section on GitHub.
LoopX Self Repair
Use this skill to turn a surprising LoopX behavior into a durable fix, not only an apology or a one-off explanation.
Repair Loop
-
Pause delivery selection. Do not spend quota or continue adapter work until the control-plane facts explain why that work is valid.
-
Build a compact evidence packet. Prefer structured surfaces:
git status --short --branch loopx --format json diagnose --goal-id <goal-id> loopx --format json status --goal-id <goal-id> --limit 20 loopx --format json quota should-run --goal-id <goal-id> [--agent-id <agent-id>] loopx --format json history --goal-id <goal-id> --limit 5statusdefaults to the registry/dashboard view, but accepts--goal-idwhen the repair needs one goal-focused projection. Usediagnose --goal-idfor the richer goal-specific agent reasoning packet. Also inspect the project-local registry and the registry-declared active state file when relevant. Use the shared global registry for heartbeat/quota truth. -
Classify the failure. Read
references/repair-patterns.mdand match the symptoms to a known pattern. If no pattern fits, add one after the fix. -
Assign the responsible layer. Separate:
- agent behavior mistake;
- state projection or quota payload bug;
- active-state authoring gap;
- benchmark harness mismatch;
- docs/process hygiene gap.
-
Repair at the lowest durable layer.
- If it is a one-off agent mistake, write back the correct state/todo and continue with a larger bounded batch.
- If the machine projection misled the agent, fix CLI/status/quota projection and add a focused smoke.
- If the user correction changes the goal acceptance, says the agent missed
the intended loop, or exposes a product bottleneck that is not visible in
quota/status, write a bounded
goal_vision_replan_contract_v0packet withreplan_trigger_summarythrough normalloopx refresh-state --vision-*fields, using the same--agent-idas the current lane, or--agent-vision-jsonfor generated multi-field patches, before returning to delivery. If the next executable step is already known, also add or link the concrete successor todo; do not leave the correction only in chat or an incident note. - If a design rule is missing, update the interaction model or todo list before implementing broad behavior.
- If benchmark evidence is not attributable, add posthoc trace/parity checks before claiming uplift or regression.
-
Validate before resuming. Run the smallest smoke or CLI check that would have caught the issue, plus
loopx checkon changed public surfaces when docs/contracts changed. -
Write back the lesson. Update active goal state, docs, contributor tasks, or this skill so the same failure mode is visible next time.
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 · 158 lines · 102 tokens per session scan A 57c1f7f03695
loopx-self-repair is a skill published in the GitHub repository huangruiteng/loopx (5,609 stars, last pushed today), licensed Apache-2.0. It adds 102 tokens to every session and 1,831 once invoked, about $0.0005 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-30.
Other skills, from other repositories
deep-research
Autonomous multi-step deep research engine implementing an iterative Think → Search → Extract → Synthesize → Stop loop. The LLM drives every decision: what to search, what's relevant, what's missing, and when to stop. Produces a cited, magazine-quality report with inline citations, category- specific formatting, and…
image-studio
Generate, edit and upscale AI images via fal.ai through a three-stage studio workflow — brainstorm a strong prompt with the user, prototype cheaply and iterate on feedback, then produce a finalised image. Use when the user wants image generation or editing through the local fal.ai helper workflow, including requests…
skill-maintainer
Track upstream drift and sync adapted skill libraries.
website-scraping
Generic playbook for extracting structured data from any website — hotel prices, flight fares, e-commerce listings, real estate, jobs, competitor product catalogues, anything where the goal is to turn one or more URLs into clean records on disk. Use this skill whenever the user mentions scraping, harvesting…
library-rag
Semantic search over a personal library using Nemotron-3-Embed-1B embeddings + sqlite-vec. Index books, documents, any text corpus; query by meaning. Includes EPUB→Markdown conversion and MCP server for auto-available search tools.
news-monitoring
Recurring topic/news monitoring with web search, multi-language sources, digest formatting, and automated delivery via Hermes cron jobs. Covers search strategy, source selection, Chinese-language platforms, and digest templates.