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 skills add d-oit/rust-2026-template --skill self-fix-loopgit clone --depth 1 https://github.com/d-oit/rust-2026-templateWrote 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/d-oit/rust-2026-template/self-fix-loop)<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.
<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>- NVIDIA SkillSpector warn
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.
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.00081 | $0.01229 |
| Opus 5.5 | $0.00032 | $0.00492 |
| Sonnet 5.5 | $0.00016 | $0.00246 |
| Haiku 4.5 | $0.00008 | $0.00123 |
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.
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:
- Commits all changes atomically
- Pushes to feature branch
- Creates/updates PR/MR
- Monitors CI (GitHub Actions or GitLab CI)
- On failure: diagnoses and fixes
- 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
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.
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.
- 22d ago Changed · -1 lines 436194302537
- 1mo ago Changed · +2 lines c21fc0376a5d
- 1mo ago First seen · 141 lines · 81 tokens per session scan A 3ffcd360bd26
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.
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.
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.
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.
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.
codew-release-qa-sweep
Use before claiming Codewhale release work is done: run the full gate sweep and list the manual QA targets.
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.