heal-skill
Heal Skill Skill
Purpose: Fix incorrect SKILL.md files when a skill has wrong instructions or outdated API references.
Analyze the conversation to detect which skill is running, reflect on what went wrong, propose specific fixes, get user approval, then apply changes with optional commit.
<quick_start>
- Detect skill from conversation context (invocation messages, recent SKILL.md references)
- Reflect on what went wrong and how you discovered the fix
- Present proposed changes with before/after diffs
- Get approval before making any edits
- Apply changes and optionally commit
</quick_start>
- Look for skill invocation messages
- Check which SKILL.md was recently referenced
- Examine current task context
Set: SKILL_NAME=[skill-name] and SKILL_DIR=./skills/$SKILL_NAME
If unclear, ask the user. </step_1>
<step_2 name="reflection_and_analysis"> Focus on $ARGUMENTS if provided, otherwise analyze broader context.
Determine:
- What was wrong: Quote specific sections from SKILL.md that are incorrect
- Discovery method: Context7, error messages, trial and error, documentation lookup
- Root cause: Outdated API, incorrect parameters, wrong endpoint, missing context
- Scope of impact: Single section or multiple? Related files affected?
- Proposed fix: Which files, which sections, before/after for each </step_2>
<step_3 name="present_changes"> Present before/after for each affected section:
**Before:** [incorrect text]
**After:** [corrected text]
**Reasoning:** [why this change is needed]
Get user approval via AskUserQuestion for each significant change. </step_3>
<step_4 name="apply_changes"> After approval:
- Use
Readto load current file - Use
Editwith exact old_string/new_string - Verify changes with
Readafter editing - Optionally run tests or validation commands </step_4>
<step_5 name="optional_commit"> If the skill is in a git repository:
- Check status:
git status - Add changes:
git add [files] - Commit:
git commit -m "fix(skill): correct [specific issue]"
Present commit hash to user. </step_5>