Agent skill

LoopX Self Repair

by loopx-project in loopx-project/loopx

Diagnoses surprising LoopX behavior, such as stale recommendations or tiny progress, assigns it to the responsible layer and repairs it at the lowest durable level.

Apache-2.0Auto-check passedAgent Workflows

Install LoopX Self Repair

skills CLI
$ npx skills add loopx-project/loopx --skill loopx-self-repair -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install loopx-project/loopx loopx-self-repair --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/loopx-project/loopx.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/loopx-self-repair .claude/skills/loopx-self-repair && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
loopx-self-repair
GitHub stars
6.2k
Token cost
~2.2k tokens
SKILL.md length
1,050 words
Files
8 (incl. scripts, references)
Skills in repo
12
Repo updated
First seen
Licence
Apache-2.0

At a glance

Diagnoses surprising LoopX behavior, such as stale recommendations or tiny progress, assigns it to the responsible layer and repairs it at the lowest durable level.

  • Works in 7 steps: Pause delivery selection. Do not spend… → Reuse evidence before collecting more.… → Look up the symptom. Run `python3… → …
  • A LoopX task makes unexpectedly small progress
  • SKILL.md covers Repair Loop, Upstream Issue Escalation, Vision / Replan Writeback and Evidence Discipline, plus 1 more section
  • Runs Python scripts from its folder

What it does

The skill turns an unexpected LoopX behavior into a durable fix rather than an apology or a one-off explanation. It applies when a task makes unexpectedly small progress, follows a stale or contradictory recommended_action, skips a higher-priority blocked item for fallback work, reports vague owner or user gates, loses todo projection, misaligns a benchmark with the real product path, or mixes temporary artifacts into commits.

The repair loop starts by pausing delivery selection until control-plane facts explain why the current work is valid, then reuses evidence from the failed command's structured response before gathering more. A script, scripts/find_pattern.py, looks a symptom or error code up in a pattern catalog, and its --id option reads the full guidance without loading the whole catalog.

The responsible layer is then named: an agent mistake, a state projection or quota payload bug, an active-state authoring gap, a benchmark harness mismatch, or a docs and process gap. Repair happens at the lowest durable layer, from writing back correct state after a one-off mistake to fixing CLI status or quota projection with a focused smoke test. Reference files cover repair patterns, targeted diagnostics and escalating issues upstream.

When your agent uses it

  • A LoopX task makes unexpectedly small progress
  • The agent follows a stale or contradictory recommended_action
  • Finding the root cause of why the LoopX harness behaved unexpectedly
  • Temporary artifacts keep ending up in commits

Example prompts

  • “Why did this LoopX task stop after one tiny change? Find the root cause and fix it.”
  • “The agent ignored the blocked high-priority item and did fallback work. Diagnose and repair it.”
  • “Look up this LoopX error code in the repair patterns and tell me which layer is at fault.”

Requirements

  • A LoopX installation
  • Python 3 to run scripts/find_pattern.py

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Pause delivery selection. Do not spend quota or continue adapter work
  2. Reuse evidence before collecting more. Start with the current failed
  3. Look up the symptom. Run `python3 scripts/find_pattern.py --query
  4. Assign the responsible layer. Separate
  5. Repair at the lowest durable layer.
  6. Validate before resuming. Run the smallest smoke or CLI check that would
  7. Write back the lesson. Update active goal state, docs, contributor

What it can do on your machine

Read from SKILL.md and the folder at commit 8205c8b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

LoopX Self Repair loads about 2.2k tokens when it runs, and up to ~62k if it reads all its reference files. Until then it costs about 131 tokens; SKILL.md has 1,050 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~131
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~62k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from loopx-project/loopx at commit 8205c8b, republished under its Apache-2.0 licence (© loopx-project). 1,050 words, ~2,217 tokens.

Download SKILL.mdSave it as .claude/skills/loopx-self-repair/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
loopx-self-repair
description
Diagnose and repair LoopX control-plane drift or agent behavior drift. Use when a LoopX task makes unexpectedly small progress, follows a stale or contradictory recommended_action, ignores a higher-priority blocked item while doing fallback work, reports vague owner/user gates, loses todo projection, misaligns benchmark treatment with the real product path, mixes temporary artifacts into commits, or when the user asks for root-cause analysis, self-repair, or why the harness/agent behaved unexpectedly.

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

  1. Pause delivery selection. Do not spend quota or continue adapter work until the control-plane facts explain why that work is valid.
  2. Reuse evidence before collecting more. Start with the current failed command's structured response, error code and operation identity. An already loaded packet is evidence for that observation, not permission for a later write. Fetch fresh authority when required by its admission/lease contract. Read targeted diagnostics when deciding which missing fact to collect or investigating slow commands. Do not run diagnose, status, quota and history as a fixed preflight: diagnose already composes status and quota work. Recording an already-understood repair Todo does not require rediscovering the incident.
  3. Look up the symptom. Run python3 scripts/find_pattern.py --query '<error code or symptom terms>' from this skill directory, or invoke its absolute path. Use --id <returned-id> to read the relevant full guidance. Search instructions explain pagination and fallback. Do not load the complete catalog, paginate it into context, or reread unchanged references already available in this task. If no pattern fits, diagnose from current facts and add one after the fix.
  4. 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.
  5. Repair at the lowest durable layer.
    • If it is a one-off agent mistake, write back the correct state/todo and size the next scoped effort to its verifiable result, evidence and risk.
    • 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_v0 packet with replan_trigger_summary through normal loopx refresh-state --vision-* fields, using the same --agent-id as the current lane, or --agent-vision-json for 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.
  6. Validate before resuming. Run the smallest smoke or CLI check that would have caught the issue, plus loopx check on changed public surfaces when docs/contracts changed.
  7. Write back the lesson. Update active goal state, docs, contributor tasks, or this skill so the same failure mode is visible next time.

Upstream Issue Escalation

A public GitHub issue is an optional final escalation, not a default side effect of self-repair. Consider it only when the responsible layer is a reusable LoopX product, CLI, skill, installer, or control-plane gap and durable upstream tracking adds value beyond the local repair or PR.

Read references/upstream-issue-escalation.md before publishing anything. Invoking this skill never grants publication permission. The guarded path must:

  1. reject private, project-specific, support-only, and security-sensitive reports;
  2. reduce the evidence to a minimal public-safe reproduction and scan the draft with loopx check;
  3. search open and closed issues by a stable fingerprint before creating one;
  4. auto-submit only under explicit current-turn approval or durable owner opt-in; otherwise show the exact draft and ask once for confirmation;
  5. create at most one issue per repair turn, then record the existing or new issue URL in the relevant LoopX todo/evidence writeback.

If qualification, authority, authentication, boundary scanning, or duplicate search is uncertain, preserve the draft and stop before publication. Prefer a direct fix or PR when no separate issue is needed for coordination.

Show full SKILL.md (427 more words)Show less

Vision / Replan Writeback

Use the bounded vision contract when self-repair discovers that LoopX did not notice a missing outcome, route, or acceptance condition by itself. The packet is the bridge from human or agent insight to quota-visible replan state:

json
{
  "schema_version": "goal_vision_replan_contract_v0",
  "state": "vision_drift_detected",
  "vision_patch": {
    "vision_summary": "Name the corrected route or acceptance target.",
    "acceptance_summary": "Name the machine-visible condition that must hold.",
    "replan_trigger_summary": "Name why the current frontier is insufficient."
  },
  "todo_delta": ["create_successor"]
}

Record it with normal inline refresh-state --vision-summary --vision-acceptance --vision-replan-trigger fields using the same --agent-id that ran the repair. Use --agent-vision-json when a generated patch is clearer than a command line. Replan closes only through a typed semantic observation or an atomic Todo transition bound with --replan-obligation-id, a typed --action-kind, and a stable --target-key or Explore node ref; do not append a second --autonomous-replan-recorded repair ACK. A vision patch without a runnable Todo is still useful: quota should-run can promote its replan_trigger_summary into goal_frontier_projection.acceptance_gaps[] when the advancement frontier is empty.

If the repair concludes that the existing per-agent vision is still correct, close the required checkpoint with --vision-unchanged-reason instead of writing a fake patch. If a material refresh-state lacks both a patch and an unchanged/no-follow-up decision, LoopX should preserve a per-agent vision_checkpoint_v0 with decision=missing_required so the same agent's next quota check can enter replan. A scheduler wake alone is not a material vision boundary: when quota explicitly projects a normally admitted open advancement Todo as delivery_boundary=in_flight_continuation, use the projected settlement command and do not invent a vision patch. The next heartbeat keeps that same Todo selected only after accountable outcome_progress; Todo completion, blocker/gap, durable Next Action change, replan, or terminal closeout must return to the strict semantic checkpoint.

Evidence Discipline

  • Do not read or commit raw private logs, trajectories, verifier output, credentials, internal links, or production material.
  • Do not solve contradictory payloads by guessing. If recommended_action, goal_boundary.write_scope, todos, and interaction contract disagree, treat that as a projection bug or state authoring bug first.
  • Do not let fallback work hide the primary blocker. When a higher-priority path is gated but safe fallback is valid, report both the concrete gate and the fallback progress.
  • Do not equate bounded work with a small operation. If turns repeatedly stop after setup or surface-only edits, check whether a verifiable result could have been reached within scope and budget. Repair the premature stop, not by imposing a minimum number of calls/files or ignoring explicit stop conditions.

Reference Routes

  • For known symptom-to-repair mappings, search with scripts/find_pattern.py; references/pattern-lookup.md explains the lookup, not a required full read.
  • For missing facts, slow commands and response truncation, read references/targeted-diagnostics.md.
  • For guarded public GitHub issue escalation, read references/upstream-issue-escalation.md.
  • For user/agent/state channel semantics, read ../../docs/state-interaction-model.md and ../../docs/concepts/interaction-pattern-catalog.md.
  • For quota and heartbeat decisions, read ../../docs/quota-allocation.md and ../../docs/heartbeat-automation-prompt.md.
  • For commit/PR hygiene failures, read ../../AGENTS.md.

© loopx-project, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 7 other files (scripts, references) in skills/loopx-self-repair of loopx-project/loopx.

  • SKILL.md
  • .loopx-skill-scope
  • agents/openai.yaml
  • references/pattern-lookup.md
  • references/repair-patterns.md
  • references/targeted-diagnostics.md
  • references/upstream-issue-escalation.md
  • scripts/find_pattern.py

Open the folder on GitHubat commit 8205c8b

Compare with similar skills

LoopX Self Repair next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

LoopX Self Repair compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
LoopX Self Repair this skillloopx-project/loopx6.2k—~2.2kAutomated safety check: PassApache-2.0
Flowfile Debugging PlaybookEdwardvaneechoud/Flowfile370—~6.3kAutomated safety check: PassMIT
Autoresearch Iteration Loopuditgoenka/autoresearch6.5k1 repos~2kAutomated safety check: PassMIT
Orca Run Replayiflytek/skillhub5.2k4 repos~3kAutomated safety check: PassApache-2.0
Build Failure Recoveryjsmastery-pro/jsm-agent-skill216—~1.8kAutomated safety check: PassMIT
Verification Before Completionforyourhealth111-pixel/Vibe-Skills3.6k—~1.1kAutomated safety check: PassApache-2.0

Similar skills

  • Flowfile Debugging Playbook

    Edwardvaneechoud/Flowfile

    Symptom-to-cause triage playbook for Flowfile (core/worker/kernel/frontend/AI) — covers "no such table" DB cascades (two distinct causes), import-time Alembic migration corruption, silent…

    370 GitHub stars~6.3k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Autoresearch Iteration Loop

    uditgoenka/autoresearch

    Runs an autonomous modify, verify, keep-or-discard loop against any metric, with subcommands for planning, debugging, fixing, security audits, shipping and more.

    6.5k GitHub starsUsed in 1 repo~2k tokens
    Agent WorkflowsAuto-check passed
  • Orca Run Replay

    iflytek/skillhub

    Answers questions about a past agent run from its recording, using causal graphs and replay, instead of reconstructing events from memory.

    5.2k GitHub starsUsed in 4 repos~3k tokens
    Agent WorkflowsAuto-check passed
  • Build Failure Recovery

    jsmastery-pro/jsm-agent-skill

    Diagnoses which of three failure modes a stalled AI-assisted build is in, then chooses a targeted fix, a hard reset or a rethink instead of more prompting.

    216 GitHub stars~1.8k tokensUpdated 3 mo ago
    Agent WorkflowsAuto-check passed
  • Verification Before Completion

    foryourhealth111-pixel/Vibe-Skills

    Completion-evidence route used before claiming work is complete, fixed, passing, committed, or PR-ready.

    3.6k GitHub stars~1.1k tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed
  • Investigates a session where Superpowers went wrong, reads the transcripts on disk and produces an evidence-cited report, optionally prepared as a bug report for the maintainers.

    296k GitHub starsUsed in 3 repos~1.7k tokens
    Agent WorkflowsAuto-check passed

More from loopx-project/loopx

All 12 skills in this repo
  • LoopX PR Program Manager

    loopx-project/loopx

    Tracks a group of pull or merge requests across repositories as durable LoopX state: inventory, reconcile changes, keep priorities and a roadmap, and monitor over time.

    6.2k GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • LoopX Auto-Research Worker

    loopx-project/loopx

    Role playbook for a LoopX worker running an auto-research lane, with execution checklists, artifact contracts and stop conditions.

    6.2k GitHub stars~3.5k tokensUpdated today
    Auto-check passed
  • LoopX Benchmark Operator

    loopx-project/loopx

    Operates or analyzes a LoopX-managed benchmark experiment: launching runs, maintaining the experiment board, qualifying integrity, and writing case insights.

    6.2k GitHub stars~3.6k tokensUpdated today
    Auto-check passed
  • LoopX Doc Registry

    loopx-project/loopx

    Registers durable project materials such as design docs, SOPs and research notes in a LoopX project's own registry so future agents can find them without raw URLs or private content.

    6.2k GitHub stars~707 tokensUpdated today
    Auto-check passed
  • LoopX PR Review

    loopx-project/loopx

    Runs an evidence-backed pull request review through the loopx CLI and posts bilingual reviews: a full Chinese review plus one concise English verdict.

    6.2k GitHub stars~3.3k tokensUpdated today
    Auto-check passed
  • LoopX Project Lifecycle

    loopx-project/loopx

    Connects and configures LoopX projects and Goals, repairs project-local state and stale status, syncs registry entries and diagnoses CLI routing.

    6.2k GitHub stars~14k tokensUpdated today
    Auto-check passed

Questions about LoopX Self Repair

What does LoopX Self Repair do?

Diagnoses surprising LoopX behavior, such as stale recommendations or tiny progress, assigns it to the responsible layer and repairs it at the lowest durable level. The skill turns an unexpected LoopX behavior into a durable fix rather than an apology or a one-off explanation. It applies when a task makes unexpectedly small progress, follows a stale or contradictory recommended_action, skips a higher-priority blocked item for fallback work, reports vague owner or user gates, loses todo projection, misaligns a benchmark with the real product path, or mixes temporary artifacts into commits.

When should I use LoopX Self Repair?

LoopX Self Repair fits situations like: A LoopX task makes unexpectedly small progress; the agent follows a stale or contradictory recommended_action; finding the root cause of why the LoopX harness behaved unexpectedly; temporary artifacts keep ending up in commits.

How do I install LoopX Self Repair in Claude Code?

Run `npx skills add loopx-project/loopx --skill loopx-self-repair -a claude-code`. Or copy the skill folder (skills/loopx-self-repair in loopx-project/loopx) into .claude/skills/loopx-self-repair in your project. Claude Code loads it when a task matches its description.

How do I install LoopX Self Repair in Codex?

Run `npx skills add loopx-project/loopx --skill loopx-self-repair -a codex`. Or copy the skill folder (skills/loopx-self-repair in loopx-project/loopx) into .agents/skills/loopx-self-repair in your project. Codex loads it when a task matches its description.

Can I use LoopX Self Repair in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add loopx-project/loopx --skill loopx-self-repair -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/loopx-self-repair, .gemini/skills/loopx-self-repair, .github/skills/loopx-self-repair and .opencode/skills/loopx-self-repair in your project.

What does LoopX Self Repair need to run?

Going by SKILL.md and its folder, LoopX Self Repair needs Python for the scripts in its folder. Our summary lists: A LoopX installation; Python 3 to run scripts/find_pattern.py.

Does LoopX Self Repair access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is LoopX Self Repair safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does LoopX Self Repair use?

LoopX Self Repair is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does LoopX Self Repair use?

About 2.2k tokens (SKILL.md is roughly 8.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 60k tokens, read only when the agent opens those files.

What are the alternatives to LoopX Self Repair?

Skills that share tags, products or a category with LoopX Self Repair: Flowfile Debugging Playbook (Edwardvaneechoud/Flowfile, 370 stars), Autoresearch Iteration Loop (uditgoenka/autoresearch, 6.5k stars), Orca Run Replay (iflytek/skillhub, 5.2k stars) and Build Failure Recovery (jsmastery-pro/jsm-agent-skill, 216 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains LoopX Self Repair?

loopx-project (a GitHub organization) maintains it in loopx-project/loopx, which has 6,167 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on October 7, 2026.

Source: loopx-project/loopx on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.