Skip to main content
skill CX Codex

self-healing — Claude Code skill for runtime recovery

self-healing — a skill for Claude Code and Codex helps an agent diagnose failures during a task and test its fix. It activates after a command, test, build, or lint run fails.

no license 109 installs ★ 341 updated 2026-10-19

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add pskoett/pskoett-ai-skills --skill self-healing -a claude-code
Open on GitHub

What self-healing does

The skill guides an agent through finding the cause of a failure, applying a fix, rerunning the failed operation, and recording the result in .learnings/HEALS.md. Before adding an entry, the agent checks for a matching Pattern-Key so recurring problems update an existing record.

A fix counts as verified only after the operation runs again successfully. If the agent cannot test it, the entry is marked pending-verify; an unsuccessful fix is marked abandoned. The loop allows up to three attempts. Installing through Claude Code uses npx.

What it helps with

  • trace why a command, test, build, or lint run failed
  • repair a failure caused by a missing dependency or incorrect runtime
  • create a helper script that the task needs
  • record a tested fix so a recurring failure can be recognized

Example prompts for the agent

  • Diagnose the pytest failure and rerun the test to check the fix.
  • Repair the build, then record the verified result in .learnings/HEALS.md.
  • Look up the matching Pattern-Key and update its recurrence count.

How to install self-healing

1Skills CLI (Vercel)

npx skills add pskoett/pskoett-ai-skills --skill self-healing -a claude-code

2Manually: put the files in place

~/.claude/skills/self-healing/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/self-healing/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about self-healing

How do I install self-healing in Claude Code?

Run npx skills add pskoett/pskoett-ai-skills --skill self-healing -a claude-code. The skill file is located at ~/.claude/skills/self-healing/SKILL.md.

What does self-healing do?

It helps an agent diagnose a live failure, apply a fix, and rerun the failed operation. The agent then records the result and verification evidence in .learnings/HEALS.md.

How does self-healing handle recurring failures?

Before creating a record, the agent searches HEALS.md for a matching Pattern-Key. A recurrence updates Recurrence-Count instead of creating a duplicate entry.

Similar skills

All skills for Code review and refactoring →

From the same set10

The whole set →
self-improvement-ci self-improvement-ci — a CI-only skill that groups recurring pull request check failures and proposes rules so the same breakage stops coming back. CX Codex +1 550installs simplify-and-harden simplify-and-harden is a Claude Code skill that reviews code after a task is complete: it simplifies and hardens the code, re-verifies changes and briefly documents non-obvious decisions while the agent remembers their intent. CX Codex +1 543installs plan-interview plan-interview — a skill for Claude Code, Codex, Cursor, GitHub Copilot, and other agents: runs a structured requirements interview across four domains before the agent reads any code. CX Codex +1 491installs intent-framed-agent The intent-framed-agent skill writes down what a coding session is supposed to achieve before edits start, then watches for work that wanders off. Handy on long refactors and feature builds. CX Codex +1 440installs simplify-and-harden-ci simplify-and-harden-ci — a skill that reviews pull requests inside CI: it scans changed files, posts findings, and can stop a merge. CX Codex +1 393installs context-surfing context-surfing monitors context coherence during extended coding sessions, saving state and performing clean handoffs before hallucinations ruin output. CX Codex +1 272installs skill-pipeline skill-pipeline sizes up a coding task, then decides which skills to switch on: nothing extra for a typo, planning plus checks and failure recovery for a big refactor. CX Codex +1 114installs pskoett-ai-skills pskoett-ai-skills is a Claude Code plugin that adds checks to an agent's workflow: plan agreement, context control, code audits and saved lessons. ★ 341repo stars

Project sponsors

Companies that keep this analytics open