self-fix-loop

self-fix-loop is a skill for Claude Code, Codex from d-oit/rust-2026-template. It costs 83 tokens per session (1,381 once invoked), scanned A, original, MIT.

An automated workflow that repeatedly commits changes, pushes them, checks CI, investigates failures, and applies fixes. CI means automated checks run by services such as GitHub Actions or GitLab CI.

In plain words
What is it for?
Use it when a branch or pull request has failing GitHub or GitLab checks and needs several fix-and-retry cycles.
Why use it?
It reduces the manual work of watching failed checks, finding their causes, and sending repeated fixes until the checks pass.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents; installed under .agents/ (shared by several agents).

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is - Run quality gate: bash scripts/quality-gates.sh --only <failed-area>.

Good fit Use it when a branch or pull request has failing GitHub or GitLab checks and needs several fix-and-retry cycles.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/d-oit/rust-2026-template
agentmods
npx agentmods add skills/d-oit/rust-2026-template/self-fix-loop

Made for: Claude Code, Codex.

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 self-fix-loop

README.md
[![agentmods](https://agentmods.dev/badge/skills/d-oit/rust-2026-template/self-fix-loop/github.svg)](https://agentmods.dev/skills/d-oit/rust-2026-template/self-fix-loop)
Your own site
<a href="https://agentmods.dev/skills/d-oit/rust-2026-template/self-fix-loop"><img src="https://agentmods.dev/badge/skills/d-oit/rust-2026-template/self-fix-loop/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for self-fix-loop

Your own site · 80×15
<a href="https://agentmods.dev/skills/d-oit/rust-2026-template/self-fix-loop"><img src="https://agentmods.dev/badge/skills/d-oit/rust-2026-template/self-fix-loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 83 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,381 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 124
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • high Tool Misuse · line 140
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
How audits are shown
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.00083 $0.01381
Opus 5.5 $0.00033 $0.00552
Sonnet 5.5 $0.00017 $0.00276
Haiku 4.5 $0.00008 $0.00138

Measured 19d ago against content hash 5b5109fcef25, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

self-fix-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 19d 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.

.agents/skills/self-fix-loop/SKILL.md · 145 lines

How it starts

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

Self-Fix Loop Skill

When to Use

Automated self-learning cycle: commit → push → monitor → analyze failures → fix → retry until all CI checks pass.

Self-Fix Threshold: If 2+ identical or near-identical failures occur, stop fixing and diagnose the root cause. Transient flaps are not a license to loop.

Before the first fix: capture the baseline. Record the failing check names, the head commit of the branch, and whether the failures also exist on main at the merge base. Without this you cannot tell "my fix worked" from "the flake moved".

Overview

Continuous improvement loop that:

  1. Commits all changes atomically
  2. Pushes to feature branch
  3. Creates/updates PR/MR
  4. Monitors CI (GitHub Actions or GitLab CI)
  5. On failure: diagnoses and fixes
  6. Repeats until ALL checks pass

Platform Detection

Auto-detect from git remote:

REMOTE=$(git remote get-url origin)
if echo "$REMOTE" | grep -qi "github"; then
  PLATFORM="github"; CLI="gh"
elif echo "$REMOTE" | grep -qi "gitlab"; then
  PLATFORM="gitlab"; CLI="glab"
fi

CLI Command Mapping

Action GitHub (gh) GitLab (glab)
Check CI gh pr checks glab ci status
Create PR/MR gh pr create glab mr create
View logs gh run view --log-failed glab ci view

Arguments

Argument Description Default
--max-retries N Maximum fix iterations 5
--platform github|gitlab Force platform auto-detect
--auto-research Use web research on failures true
--fix-issues Attempt automatic fixes true
--strict-validation ALL checks must pass true
--timeout SECONDS Per-iteration timeout 1800
--dry-run Simulate without pushing false

Loop Phases

[Start]
   ↓
Phase 1: COMMIT & PUSH
   - Stage changes (pick the files for this fix; never blanket-stage)
   - Run quality gate: bash scripts/quality-gates.sh --only <failed-area>
     (it is `cargo xtask quality run` under the hood; full gate = no --only)
   - Atomic commit (Conventional Commits format — commitlint enforces it)
   - Push to feature branch
   ↓
Phase 2: CREATE/UPDATE PR/MR
   - Create new PR/MR or update existing
   ↓
Phase 3: MONITOR CI
   - Poll GitHub Actions / GitLab CI
   - Wait for all checks complete
   ↓
Phase 4: ANALYZE FAILURES
   - Identify failed checks
   - Extract error messages
   - Categorize failure type
   ↓
Phase 5: FIX (if failures)
   - Diagnose root cause
   - Apply fixes
   - Commit fix
   ↓
Phase 6: RETRY LOOP
   - If retries remaining → Phase 1
   - If max retries → FAIL
   - If all pass → SUCCESS

Read the full file on GitHub · 145 lines

Files

What ships with it

1 file 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. 19d ago Changed · +3 lines · +2 tokens per session 5b5109fcef25
  2. 2mo ago Changed · -1 lines 436194302537
  3. 2mo ago Changed · +2 lines c21fc0376a5d
  4. 3mo ago First seen · 141 lines · 81 tokens per session scan A 3ffcd360bd26

Subscribe to this mod's changes

self-fix-loop is a skill published in the GitHub repository d-oit/rust-2026-template (15 stars, last pushed 3d ago), licensed MIT. It adds 83 tokens to every session and 1,381 once invoked, about $0.0003 per session on Opus 5.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.

Related

self-fix-loop compared with skills from other repositories

self-fix-loop next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
self-fix-loopd-oit/rust-2026-templateSkill153d agoMITA83Claude Code, Codex
publish-rustOpen-Agent-Tools/General-OAT-SkillsSkill32mo agoApache-2.0A33Claude Code
obsidian-mobile-synckevinnft/ai-agent-skillsSkill154mo agoMITB45Claude Code, Codex
fix-issueAndreiBozantan/svelte-axum-templateSkill22mo agoMITA65Claude Code, Codex
update-v8-versionopeninterpreter/openinterpreterSkill69kyesterdayApache-2.0A86Codex
worktreeget-bb/bbSkill6.3ktodayMITA33Claude Code, Codex
dwsPinvou/pinvou-agentSkill3.0kyesterdayMITA193Claude Code, Codex