heal-skill

heal-skill is a command for coding agents from aegntic/compound-engineering. It costs 20 tokens per session (986 once invoked), scanned A, a copy of heal-skill, MIT.

A command for correcting a skill's SKILL.md instruction file when its guidance is wrong or out of date.

In plain words
What is it for?
Use it to investigate failed skill use, prepare before-and-after edits, get approval, and optionally commit the approved changes.
Why use it?
It helps find the specific instruction or API reference that caused a problem and shows the proposed correction before changing files.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/aegntic/compound-engineering/heal-skill
Clone the repo
git clone --depth 1 https://github.com/aegntic/compound-engineering

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for heal-skill

README.md
[![agentmods](https://agentmods.dev/badge/commands/aegntic/compound-engineering/heal-skill.svg)](https://agentmods.dev/commands/aegntic/compound-engineering/heal-skill)
Your own site
<a href="https://agentmods.dev/commands/aegntic/compound-engineering/heal-skill"><img src="https://agentmods.dev/badge/commands/aegntic/compound-engineering/heal-skill.svg" alt="Measured on agentmods" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 986 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 91% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00020 $0.00986
Opus 5 $0.00010 $0.00493
Sonnet 5 $0.00004 $0.00197
Haiku 4.5 $0.00002 $0.00099

Measured 3d ago against content hash 71c86986cb06, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

heal-skill scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

91% identical to heal-skill — 15 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

commands/heal-skill.md · 151 lines

What it actually says

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>

  1. Detect skill from conversation context (invocation messages, recent SKILL.md references)
  2. Reflect on what went wrong and how you discovered the fix
  3. Present proposed changes with before/after diffs
  4. Get approval before making any edits
  5. 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="scan_affected_files">

ls -la $SKILL_DIR/
ls -la $SKILL_DIR/references/ 2>/dev/null
ls -la $SKILL_DIR/scripts/ 2>/dev/null

</step_3>

<step_4 name="present_proposed_changes"> Present changes in this format:

**Skill being healed:** [skill-name]
**Issue discovered:** [1-2 sentence summary]
**Root cause:** [brief explanation]

**Files to be modified:**
- [ ] SKILL.md
- [ ] references/[file].md
- [ ] scripts/[file].py

**Proposed changes:**

### Change 1: SKILL.md - [Section name]
**Location:** Line [X] in SKILL.md

**Current (incorrect):**

[exact text from current file]


**Corrected:**

[new text]


**Reason:** [why this fixes the issue]

[repeat for each change across all files]

**Impact assessment:**
- Affects: [authentication/API endpoints/parameters/examples/etc.]

**Verification:**
These changes will prevent: [specific error that prompted this]

</step_4>

<step_5 name="request_approval">

Should I apply these changes?

1. Yes, apply and commit all changes
2. Apply but don't commit (let me review first)
3. Revise the changes (I'll provide feedback)
4. Cancel (don't make changes)

Choose (1-4):

Wait for user response. Do not proceed without approval. </step_5>

<step_6 name="apply_changes"> Only after approval (option 1 or 2):

  1. Use Edit tool for each correction across all files
  2. Read back modified sections to verify
  3. If option 1, commit with structured message showing what was healed
  4. Confirm completion with file list </step_6>

<success_criteria>

  • Skill correctly detected from conversation context
  • All incorrect sections identified with before/after
  • User approved changes before application
  • All edits applied across SKILL.md and related files
  • Changes verified by reading back
  • Commit created if user chose option 1
  • Completion confirmed with file list </success_criteria>
  • Read back each modified section to confirm changes applied
  • Ensure cross-file consistency (SKILL.md examples match references/)
  • Verify git commit created if option 1 was selected
  • Check no unintended files were modified
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 151 lines · 20 tokens per session scan A 71c86986cb06

Subscribe to this mod's changes

heal-skill is a command published in the GitHub repository aegntic/compound-engineering (2 stars, last pushed 2mo ago), licensed MIT. It adds 20 tokens to every session and 986 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 91% identical to heal-skill, differing in 15 lines, and is treated as a copy.