Skill Self-Repair

VerifiedSafe

Diagnose and fix a skill that didn't work correctly in the current session.

Sby Skills Guide Bot
DevelopmentIntermediate
7/24/2026
Claude Code
#skill-repair#debugging#root-cause-analysis#prompt-engineering#skill-authoring

Recommended for

Automated summary

Analyzes the current conversation to locate where a skill misbehaved, diagnose the root cause, and propose targeted fixes to the SKILL.md file.

Strengths

  • Explicitly compares expected behavior (read from the skill file) with actual traced behavior in a before/after table
  • Ships a table of common failure symptoms (skipped steps, description-level CSO trap, stopping too early, wrong output format) mapped to likely causes
  • Presents every fix as a diff with a plain-language rationale, then asks which fixes to apply before editing anything
  • Keeps repairs iterative: one root cause at a time, followed by a suggested re-test of the skill

Limitations

  • Entirely dependent on the current conversation; if the skill ran in a previous session there is no evidence left to trace
  • Never edits without approval, so it adds manual back-and-forth rounds
  • Assumes the skill instructions are always at fault rather than the model's limits, which can miss genuine model-side constraints
When to use it

Use it right after a skill skipped steps, produced an unexpected output format, or stopped too early, while the session trace is still fresh.

When not to use it

Avoid it for authoring a brand-new skill, debugging ordinary application code, or diagnosing a run that happened outside the current session.

Security analysis

Safe
Quality score88/100

The skill only instructs analyzing conversation history, reading skill files, diagnosing issues, and proposing fixes with explicit user approval before any changes. It does not include destructive commands, network exfiltration, obfuscation, or any instruction to disable safety. No meaningful execution risk is present.

No concerns found

How this analysis is made

Examples

Repair a skill that skipped verification
/heal-skill ~/.claude/skills/release-notes/SKILL.md — it wrote the notes but skipped the checklist at the end entirely. Figure out why and show me the fix.
Diagnose an early stop
The skill I just ran stopped before creating any files. Can you trace what it actually did versus what the skill says, find the root cause, and propose a diff?
Confirm which skill misbehaved
/heal-skill — something went wrong in this session but I'm not sure which skill was active. Detect it from the conversation and confirm with me before diagnosing.

description: Diagnose and fix a skill that didn't work correctly in the current session argument-hint: [optional: path to skill file]

/heal-skill — Skill Self-Repair

Analyze the current conversation to find where a skill misbehaved, diagnose the root cause, and propose targeted fixes.

When to Use

After running a skill that:

  • Skipped steps it should have followed
  • Followed the description instead of the body (CSO trap)
  • Stopped too early or went too far
  • Produced wrong output format
  • Missed context it should have loaded
  • Behaved differently than intended

Process

1. Identify the skill

If $ARGUMENTS is provided, read that file. Otherwise, analyze the conversation to detect which skill was running. Look for:

  • /command-name invocations
  • Skill descriptions that appeared in system context
  • Workflow patterns that match known skills

Ask the user to confirm: "It looks like [skill-name] didn't work as expected. Is that right?"

2. Gather evidence

From the conversation, extract:

What was expected — what the skill file says should happen (read the actual skill file)

What actually happened — trace Claude's actual behavior step by step:

  • Which steps were followed?
  • Which steps were skipped or altered?
  • Where did behavior diverge from the skill's instructions?

The gap — specific delta between expected and actual behavior

Present this as a before/after comparison:

Expected (from skill):     Actually happened:
1. Ask for intent          1. Asked for intent ✓
2. Configure frontmatter   2. Skipped — jumped to writing ✗
3. Write body              3. Wrote body (partial) ~
4. Quality checklist       4. Skipped entirely ✗
5. Create files            5. Created files ✓

3. Diagnose root cause

Common failure modes to check:

| Symptom | Likely Cause | |---------|-------------| | Steps skipped | Description summarizes workflow (CSO trap) — Claude shortcuts | | Wrong workflow chosen | Description too vague, triggers on wrong queries | | Stopped too early | No success criteria defined | | Output format wrong | No template or example provided | | Context not loaded | File references too deep or ambiguous | | Inconsistent behavior | Conflicting instructions between sections | | Over-executed | No clear stopping point or "wait for user" gate |

Ask: "Does this diagnosis match what you saw?"

4. Propose fixes

For each root cause, show the specific edit:

## Fix 1: CSO Trap in description

File: ~/.claude/skills/my-skill/SKILL.md, line 3

Before:
  description: Dispatches subagent per task with code review between tasks

After:
  description: Use when executing implementation plans with independent tasks

Why: The old description leaked workflow details, causing Claude to
follow the description as a shortcut instead of reading the full skill.

Show all proposed fixes as diffs. Include the "why" for each — the user needs to understand the fix, not just apply it.

5. Apply with approval

Ask: Which fixes should I apply?

  • All fixes — apply everything
  • Pick and choose — list fixes by number, let user select
  • None — just keep the diagnosis, fix manually

After applying fixes, suggest: "Want to test the skill again to verify the fix?"

Principles

  • Evidence first — always trace actual behavior from the conversation before diagnosing
  • One root cause at a time — don't propose 10 fixes at once. Find the primary failure, fix it, re-test
  • The skill is the bug — if Claude didn't follow the skill, the skill's instructions weren't clear enough. Don't blame the model, fix the instructions
  • Show your work — every fix needs a "why" that the user can evaluate
<!-- Origin: Heal loop concept (self-repair after failed execution) adapted from https://github.com/glittercowboy/taches-cc-resources --> <!-- Diagnosis patterns from writing-skills CSO trap research and debug-issue skill -->

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/skill-self-repair-mryiqinq/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/skill-self-repair-mryiqinq' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/skill-self-repair-mryiqinq/download' --output '.skill-downloads/skill-self-repair-mryiqinq/SKILL.md.part' && mv '.skill-downloads/skill-self-repair-mryiqinq/SKILL.md.part' '.skill-downloads/skill-self-repair-mryiqinq/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

This file does not provide a usable name/description header for this native procedure. It remains available to download and inspect; use the manual method below.

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/skill-self-repair-mryiqinq/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills