self-fix-loop

self-fix-loop is a skill for Claude Code, Codex from d-oit/rust-2026-template. It costs 81 tokens per session (1,229 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: installed under .agents/ (shared by several agents).

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 with agentmods
npx agentmods add skills/d-oit/rust-2026-template/self-fix-loop
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.

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

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 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,229 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.00081 $0.01229
Opus 5.5 $0.00032 $0.00492
Sonnet 5.5 $0.00016 $0.00246
Haiku 4.5 $0.00008 $0.00123

Measured 22d ago against content hash 436194302537, 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 22d 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 · 142 lines

How it starts

The opening of the file, as written. The whole thing — 142 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+ similar errors occur during the loop, pause and diagnose the root cause before attempting another fix.

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 all changes
   - Run quality gate
   - Atomic commit
   - 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 · 142 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. 22d ago Changed · -1 lines 436194302537
  2. 1mo ago Changed · +2 lines c21fc0376a5d
  3. 1mo 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 (14 stars, last pushed today), licensed MIT. It adds 81 tokens to every session and 1,229 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

Other skills, from other repositories

publish-rust

Verify and release a Rust crate or workspace. Bumps version, commits, tags, pushes. CI-driven by default; --local publishes directly.

Open-Agent-Tools/General-OAT-Skills · 33 tokens

fix-issue

Fixes a bug, implements a missing feature, or implements one slice of a larger feature, starting from a GitHub issue link, number, or direct text description. Trigger when the user gives a GitHub issue URL/reference/description and asks to fix, implement, resolve, or work on it.

AndreiBozantan/svelte-axum-template · 65 tokens

obsidian-mobile-sync

Setup Obsidian mobile sync via GitHub (free) or Obsidian Sync (paid). Includes GitHub CLI automation, MGit/Working Copy setup, and Mnemosyne integration patterns.

kevinnft/ai-agent-skills · 45 tokens

update-v8-version

Update Codex's pinned v8 / rustyv8 versions, validate the release-candidate path, and investigate failed V8 canary or artifact builds. Use when asked to bump V8, update rustyv8 artifacts, prepare or validate a V8 release candidate, check v8-canary, or diagnose why a V8 version update no longer builds.

openinterpreter/openinterpreter · 86 tokens

codew-release-qa-sweep

Use before claiming Codewhale release work is done: run the full gate sweep and list the manual QA targets.

Hmbown/CodeWhale · 31 tokens

merge-seed

Merge upstream React Starter Kit updates (the seed remote) into main, preserving this project's identity, scope, and behavior. Use when asked to sync, pull, or merge the seed / starter kit / upstream template.

kriasoft/react-starter-kit · 49 tokens