# Self healing loop

> Self healing loop is an open-source agent skill for developer tools. Polls CI or error signals on a cadence and opens reviewed PRs for real defects. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/ivy00johns/Skill-Madness/tree/main/skills/loops/self-healing-loop
- **Repository:** https://github.com/ivy00johns/skill-madness
- **GitHub stars:** 12
- **License:** MIT
- **Skill name:** self-healing-loop
- **Collection:** https://github.com/ivy00johns/Skill-Madness
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill turns a recurring check of CI status or production error logs into a repeatable heal pass. Each tick it reads the configured error source, fingerprints what it finds, and sorts errors into actionable defects versus noise such as flaky infrastructure blips, known-open errors, or third-party outages. Actionable errors are reproduced and traced to a root cause, then fixed on a dedicated branch rather than the default branch.

A fix only counts as done once the failing signal is re-run and observed passing. The skill delegates the hard diagnosis to a separate diagnose workflow and, for red builds, to a loop that drives the test, lint and typecheck gates to green. Every tick is written to a heal log, including quiet ticks, so a watcher can show it actually looked.

It is built around a hard human boundary: it never auto-deploys, never auto-merges, and does not change production data, infrastructure, secrets or external APIs. Its output is a pull request for a person to review and merge. It expects a Claude Code environment with git and the GitHub CLI available, and it is meant to be run under a /loop schedule.

## When your agent uses it

> Watch CI or production errors on a cadence; when an actionable error appears, trace the root cause, fix it in a branch, verify the signal passes, and open a PR. Never auto-deploys or auto-merges. Use for an unattended watcher over CI, logs or alerts. Trigger on "watch the logs and fix errors", "self-heal CI", "auto-fix the red build", "production error sweep".

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/ivy00johns/Skill-Madness/tree/HEAD/skills/loops/self-healing-loop)
- [Asks for: Read, Edit, Bash, Grep, Glob](https://github.com/ivy00johns/Skill-Madness/blob/HEAD/skills/loops/self-healing-loop/SKILL.md)
- [License: MIT](https://github.com/ivy00johns/Skill-Madness/tree/HEAD/skills/loops/self-healing-loop)

## Features

- **Cadenced error polling:** Reads CI status, an error-log query or an alert feed on each scheduled tick.
- **Actionable versus noise triage:** Separates reproducible code defects from flaky, third-party or prod-touching signals.
- **Root-cause fix on a branch:** Reproduces the failure and fixes its cause in a branch, never the default branch.
- **Re-run verification:** Treats an error as resolved only when the failing signal is re-run and passes.
- **Heal log and fingerprints:** Records each tick and tracks known errors so open issues are not re-diagnosed.
- **Human-gated pull requests:** Opens or updates a PR for review and stops at production, deploy and merge decisions.

## Good for

- Watch the CI pipeline and open a PR when a test starts failing on main
- Sweep production error logs on a schedule and fix reproducible code bugs
- Auto-fix a red build by reproducing the failure and driving the gates green
- Record a timestamped clean-log confirmation on quiet polling ticks

## Install

### Claude Code

This skill ships in the `skill-madness` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add ivy00johns/Skill-Madness
/plugin install skill-madness@skill-madness
```

Or copy only this skill to `~/.claude/skills/self-healing-loop`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/self-healing-loop &&
cp -R "$tmp/skills/loops/self-healing-loop" ~/.claude/skills/self-healing-loop &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/self-healing-loop` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/self-healing-loop` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/self-healing-loop &&
cp -R "$tmp/skills/loops/self-healing-loop" ~/.agents/skills/self-healing-loop &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/self-healing-loop` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/self-healing-loop` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/self-healing-loop &&
cp -R "$tmp/skills/loops/self-healing-loop" ~/.cursor/skills/self-healing-loop &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/self-healing-loop` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/ivy00johns/Skill-Madness.git --path skills/loops/self-healing-loop
```

Or copy the folder to `~/.gemini/skills/self-healing-loop` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/self-healing-loop`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/self-healing-loop &&
cp -R "$tmp/skills/loops/self-healing-loop" ~/.copilot/skills/self-healing-loop &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/self-healing-loop` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git
```

Then copy `Skill-Madness/skills/loops/self-healing-loop` into your agent's skills folder as `self-healing-loop`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Does Self healing loop deploy fixes or merge them automatically?

No. It never auto-deploys or auto-merges. It opens a pull request and pauses for a human to merge, and it pages a person for any prod-touching or irreversible fix.

### What does Self healing loop need to run?

It is built for Claude Code and uses the Read, Edit, Bash, Grep and Glob tools. Its polling examples rely on CI and log tooling, such as the GitHub CLI for run status.

### How does Self healing loop decide an error is fixed?

It re-runs the failing signal, such as the same test, log query or endpoint, and only counts the error as healed when that re-run passes.

### How is Self healing loop started?

It is marked to be invoked manually, typed as /self-healing-loop or wired under /loop, rather than starting on its own.

### How do I install Self healing loop in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/self-healing-loop to use it in all your projects, or to .claude/skills/self-healing-loop in one project. Or install the skill-madness plugin, which includes it: /plugin marketplace add ivy00johns/Skill-Madness, then /plugin install skill-madness@skill-madness.

### Does Self healing loop run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Self healing loop?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Self healing loop?

The closest alternatives to Self healing loop are Skill improver, Repo cleanup loop, Fix ci, Loop on ci and Self correcting loop.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Skill improver](https://ai-powered.com/skills/skill-improver): Skill improver is an open-source agent skill for developer tools.
- [Repo cleanup loop](https://ai-powered.com/skills/repo-cleanup-loop): Repo cleanup loop is an open-source agent skill for developer tools.
- [Fix ci](https://ai-powered.com/skills/fix-ci): Fix ci is an open-source agent skill for developer tools.
- [Loop on ci](https://ai-powered.com/skills/loop-on-ci): Loop on ci is an open-source agent skill for developer tools.
- [Self correcting loop](https://ai-powered.com/skills/self-correcting-loop): Self correcting loop is an open-source agent skill for developer tools.
- [Fix until green](https://ai-powered.com/skills/fix-until-green): Fix until green is an open-source agent skill for developer tools.
- [Diagnosing bugs](https://ai-powered.com/skills/diagnosing-bugs): Diagnosing bugs is an open-source agent skill for developer tools.
- [Iterate PR](https://ai-powered.com/skills/iterate-pr): Iterate PR is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/self-healing-loop
