self-healing-loop

self-healing-loop is a skill for Claude Code from ivy00johns/Skill-Madness. It costs 208 tokens per session (2,911 once invoked), scanned A, original, MIT.

An automated workflow that watches production or continuous-integration error signals, investigates actionable failures, fixes them in a branch, verifies the fix, and opens a pull request for review.

In plain words
What is it for?
Use it to respond to failing builds, error-log findings, alerts, or channel notifications on a schedule. It can reproduce the problem, trace its root cause, test that the error is gone, and prepare a pull request.
Why use it?
It reduces the manual work of noticing recurring failures, finding their causes, and preparing fixes. Production changes still require a human to merge and deploy them.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the skill-madness plugin — 80 skills shipped together

Good fit Use it to respond to failing builds, error-log findings, alerts, or channel notifications on a schedule. It can reproduce the problem, trace its root cause, test that the error is gone, and prepare a pull request.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ivy00johns/skill-madness/self-healing-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 ivy00johns/Skill-Madness --skill self-healing-loop
Clone the repo
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness

Made for: Claude Code.

Or install skill-madness, the plugin that ships this one along with the rest of its 80 skills.

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-healing-loop

README.md
[![agentmods](https://agentmods.dev/badge/skills/ivy00johns/skill-madness/self-healing-loop/github.svg)](https://agentmods.dev/skills/ivy00johns/skill-madness/self-healing-loop)
Your own site
<a href="https://agentmods.dev/skills/ivy00johns/skill-madness/self-healing-loop"><img src="https://agentmods.dev/badge/skills/ivy00johns/skill-madness/self-healing-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-healing-loop

Your own site · 80×15
<a href="https://agentmods.dev/skills/ivy00johns/skill-madness/self-healing-loop"><img src="https://agentmods.dev/badge/skills/ivy00johns/skill-madness/self-healing-loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 208 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,911 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.
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.00208 $0.02911
Opus 5 $0.00104 $0.01456
Sonnet 5 $0.00042 $0.00582
Haiku 4.5 $0.00021 $0.00291

Measured 9d ago against content hash 4d89e4cecb81, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

self-healing-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 9d 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.

skills/loops/self-healing-loop/SKILL.md · 196 lines

How it starts

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

self-healing-loop

A configuration of [loop-controller]. That skill supplies the loop machinery — primitive selection, the full guardrail stack, state externalization. This skill supplies the three things specific to "watch and heal": a poll cadence over an external error signal, a default-FAIL proof of the error gone (a re-run, not a hope), and a hard HITL boundary at any prod-touching or irreversible fix. Read loop-controller for the guardrails; they're inherited, not repeated here.

Why disable-model-invocation: this loop edits and commits code on its own and opens PRs on a schedule. You want to type /self-healing-loop (or wire it under /loop) — not have Claude silently start an autonomous heal loop because a log line looked alarming.

The 5-part contract

Part This loop
trigger a scheduled poll tick (via /loop) over an error source — red CI, an error-log query, an alert/Channel push — or an explicit /self-healing-loop
action ONE pass: poll the source → triage actionable vs noise → if actionable, reproduce + root-cause (hand the hard diagnosis to [diagnose-loop]) → fix the cause in a branch → verify → open/update a PR; else record a clean-log confirmation
proof the error is resolved AND verified — the re-run of the failing signal now passes / the log query is clean — default-FAIL: assume UNRESOLVED until the re-run proves it. Artifact = the green re-run output (or, on a quiet tick, a timestamped clean-log confirmation)
memory heal_log.md (one entry per tick: signal seen, triage verdict, root cause, the PR opened, the verifying re-run) + the fix branch's git history; the last-seen error fingerprint so a known-open error isn't re-triaged each tick
stop the verifying re-run passes and a PR is open (or the tick is clean) OR iteration cap OR no-progress for N ticks on the same error OR budget cap OR an HITL checkpoint is hit (a prod-touching / irreversible fix) — pause for the human, never proceed

Read the full file on GitHub · 196 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. 9d ago First seen · 196 lines · 208 tokens per session scan A 4d89e4cecb81

Subscribe to this mod's changes

self-healing-loop is a skill published in the GitHub repository ivy00johns/Skill-Madness (11 stars, last pushed yesterday), licensed MIT. It adds 208 tokens to every session and 2,911 once invoked, about $0.0010 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.

Related

Other skills, from other repositories

agent-merge-conflict-arbiter

Neutral arbiter for merge conflicts between two agents.

NousResearch/hermes-agent · 19 tokens

git-advanced-workflows

Master advanced Git workflows including rebasing, cherry-picking, bisect, worktrees, and reflog to maintain clean history and recover from any situation. Use when managing complex Git histories, collaborating on feature branches, or troubleshooting repository issues.

wshobson/agents · 54 tokens

bisect

Bisect regressions or broken builds in the Chromium repository using deterministic binary search, checking out midpoint commits, syncing dependencies with gclient sync, compiling the target with autoninja, and querying the user for test results until the culprit commit is isolated.

chromium/chromium · 52 tokens

mantis-critic

Assesses the production viability of findings, filtering out debug-only features and assertion traps. Use when findings have been validated and you need to confirm they are triggerable in production release builds (with assertions disabled). Don't use for writing reproduction scripts or patches.

google/mantis · 55 tokens

hotpath_bump

Bump the hotpath version number across the workspace and related files. Updates crate versions in Cargo.toml files (exact patch version) and version references in the backend middleware, hotpathinit skill, and README (major.minor only). Use when the user wants to bump, bump the version, or release a new hotpath…

pawurb/hotpath-rs · 73 tokens

comet-github-issue-fix

A workflow for fixing a confirmed Comet-related GitHub issue or review blocker within an isolated scope. It covers matching the work to the relevant workflow, testing the change, checking runtime results, and preparing a careful handoff.

rpamis/comet · 71 tokens