context-decay
Revalidate persistent agent knowledge by classifying why it can become stale and how quickly it changes, then retain, revise,…
Active runtime recovery for coding agents: when something breaks mid-task, diagnose the root cause, write a fix, VERIFY by re-running the broken thing, then file a `HEAL-` entry to `.learnings/HEALS.md` with proof. Use whenever a command, test, build, or lint fails or exits
Claude Code
$ npx -y skills add pskoett/pskoett-ai-skills --skill self-healing --agent claude-code
Codex
$ npx skills add pskoett/pskoett-ai-skills --skill self-healing -a codex -y
Cursor
$ npx skills add pskoett/pskoett-ai-skills --skill self-healing -a cursor -y
Gemini CLI
$ npx skills add pskoett/pskoett-ai-skills --skill self-healing -a gemini-cli -y
GitHub Copilot
$ npx skills add pskoett/pskoett-ai-skills --skill self-healing -a github-copilot -y
OpenCode
$ npx skills add pskoett/pskoett-ai-skills --skill self-healing -a opencode -y
Windsurf
$ npx skills add pskoett/pskoett-ai-skills --skill self-healing -a windsurf -y
name: self-healing description: "Active runtime recovery for coding agents: when something breaks mid-task, diagnose the root cause, write a fix, VERIFY by re-running the broken thing, then file a `HEAL-` entry to `.learnings/HEALS.md` with proof. Use whenever a command, test, build, or lint fails or exits non-zero; on missing tooling, dependency/lockfile mismatch, wrong runtime version, venv or permission errors, port conflicts, dirty git state, or a missing `.env`; when the agent needs a helper or one-off script that doesn't exist yet; when an external API, tool, or MCP errors or rate-limits; or when a test flakes. Search `HEALS.md` by `Pattern-Key` first — most heals are recurrences, so increment `Recurrence-Count` instead of duplicating. Verify is mandatory: mark `pending-verify` honestly if sandboxed, `abandoned` if the fix can't be made to work. Pairs with `self-improvement` (which promotes recurring heals to durable memory) but owns the verify-before-persist discipline self-improvement doesn't."
Active runtime recovery for coding agents. When something breaks, run the loop: **diagnose → patch → verify → file**. Leave behind a reusable, verified artifact instead of a swept-under-the-rug failure.
The premise mirrors [browser-use/browser-harness](https://github.com/browser-use/browser-harness): *the harness improves itself every run*. An agent that hits a gap doesn't fail — it writes the fix during execution, verifies it works, and files the durable artifact for future runs. Coding tasks deserve the same loop.
When a coding agent hits a wall mid-task, the default failure modes are:
1. **Paper over it** — "let me try a different approach" — and lose the recovery 2. **Pretend the fix worked** — without re-running the broken thing 3. **Symptom-fix** — skip the test, swallow the error, retry until green
All three turn a one-time failure into a recurrence. The next agent on the same project hits the same wall.
This skill enforces one discipline: **verify before persist**. A patch isn't real until you've re-run the failing operation and watched it succeed. When it does, file the verified fix so the next run benefits.
These two skills are deliberately split. Run both — they feed each other but don't overlap.
| Aspect | `self-healing` (this skill) | `self-improvement` | | ----------- | -------------------------------------------------------------------- | ------------------------------------------------------------- | | **When** | During execution, failure is live | After the fact, at natural breakpoints | | **Verb** | Heal now — restore working state | Remember for later — accumulate knowledge | | **Outcome** | Verified patch + (optional) reusable artifact | Logged learning, correction, request | | **Verify** | **Mandatory** — no persist without proof | Not required | | **Files** | `.learnings/HEALS.md` + `.learnings/heals/<HEAL-ID>/` (lazy) | `.learnings/ERRORS.md`, `LEARNINGS.md`, `FEATURE_REQUESTS.md` | | **Trigger** | Failure observed mid-task | Correction, knowledge gap, feature request, recurrence |
**Boundary rule:** if you're capturing a fact, a correction, or a wish — that's `self-improvement`. If you're applying and verifying a fix to a live failure — that's `self-healing`.
Surface the affected skill path/instruction, evidence, dependency scope, exact proposed edit, and verification limits to the user, even on the first failure. Record a `### Skill Review Proposal` in the existing HEAL with `Approval: pending` and `Application: proposed`; this is separate from recurrence-based promotion.
Do not edit, disable, retire, or remove skill files, supporting assets, metadata, or installed/generated copies without explicit approval of those scoped changes. Show the concrete proposal and ask, explaining this skill's approval rule. Reuse existing explicit approval for the same scope; a general request to fix the current task is not permission to rewrite a skill. This boundary applies even when context-decay is unavailable or the reviewed skill says to self-repair.
Continue safe, authorized task-local recovery when possible and verify it separately; a verified recovery does not mark the skill proposal applied or verified. If recovery requires a skill edit, pause that step for approval. Record `Status: pending-verify`, `Fix: none applied — awaiting approval`, and the pending proposal; do not imply the patch ran or verification succeeded. Use context-decay's skill-review workflow when available; otherwise follow this proposal boundary directly. Preserve verification evidence in the HEAL.
● failure observed
│
● 1. DIAGNOSE capture context — command, error, env, what was attempted
│ search HEALS.md for the same Pattern-Key first
│ (most heals are recurrences; don't reinvent)
│
● 2. PATCH write the fix — script, helper, env tweak, alt command
│ artifacts → .learnings/heals/<HEAL-ID>/ (only if needed)
│
● 3. VERIFY re-run the failing op — must succeed
│ ↻ if still failing: refine and retry, cap at 3 attempts
│ ✗ if uncrackable: file Status: abandoned with notes
│
● 4. FILE write HEAL-YYYYMMDD-XXX to .learnings/HEALS.md
│ with Pattern-Key, status, verification proof
│
✓ working state restored, heal persisted
(conditional) PROMOTE if Pattern-Key recurrence ≥ 3 across distinct tasks,
append a HanI use this repository to build and test skills for AI agents. The skills follow the Agent Skills specification, and the repo includes an Agent Plugins 1.0 portable package.
Revalidate persistent agent knowledge by classifying why it can become stale and how quickly it changes, then retain, revise,…
Monitors context window health during large, long-running, multi-session, or explicitly context-sensitive work. Uses bounded…
Control-plane workflow for coordinating multi-agent, multi-session project work from a single Codex, GitHub Copilot, or agent-app…
[Beta] CI-only eval regression runner using gh-aw (GitHub Agentic Workflows). Runs all eval cases in .evals/ on a schedule or…
[Beta] Creates permanent eval cases from promoted learnings and runs regression checks against them. Turns failures into test…
Frames coding-agent work sessions with explicit intent capture and drift monitoring. Use when a session transitions from…
Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid…
Converts books and documents (PDF, EPUB, DOCX, HTML, Markdown, plain text, RTF, MOBI/AZW with Calibre) into structured agent…
Set up the owner profile so a personal agent knows who it works for (first-run setup, \"get to know me\"), or distill colleague,…