skill-repair
Apply an APPROVED skill-health repair plan with the smallest durable change. Use after skill-health (or a human) has diagnosed an issue and you want it fixed: it separates mechanical fixes (safe to au
Files21
View on GitHubSKILL.mdskills/core/skill-repair/SKILL.md
GitHubskill-repair
Repairs a skill carefully: tight scope, smallest stable fix, explicit approval trail. It never
silently expands a narrow fix into a redesign. Engine: tools/skill_repair.py (stdlib, always runs);
diagnosis comes from skill-health (shared/health/).
Follow the unified pipeline (references/method.md); the repair work is the Generation stage
(Analysis (read the approved plan) → Patch (smallest fix) → Validation → Approval).
Workflow (references/patch-principles.md)
- Confirm the basis — prefer an approved plan from
skill-health; if none, produce a short diagnosis + proposed changes and stop for approval first. - Prepare — read the full skill before editing; identify only the files that truly need changes; preserve untouched behavior; snapshot before replacing anything.
- Patch minimally — separate mechanical (safe to automate) from judgment (human-only); fix the root cause, not the symptom; prefer simplifying fragile logic over adding complexity.
- Validate (
references/validation-checklist.md) — re-runtools/sync_check.py, re-read changed files, and explicitly call out anything that could not be tested. - Summarize for approval (
references/approval-summary-template.md) — plain language: what changed, why, what stayed the same, and any risk. Stop for approval before finalizing.
Safety rules
- Dry-run by default;
--applyperforms ONLY safe mechanical fixes (regenerate derived files; re-run the drift guard). Judgment items always stay with the human. - Prefer official documentation over forum advice. If the real problem is broad architectural drift, say so and recommend a larger refactor — don't hide it inside a "small patch."
- Never present a patch as complete if the risky parts could not be validated.
Output: always emit the metadata block
End with the metadata block (references/metadata-schema.md) + human_review_required: true. When a fix
needs judgment, route it back to the owning skill / a human. Placeholders only; never real student data.
python3 tools/skill_repair.py # dry-run: what would change, what needs you
python3 tools/skill_repair.py --apply # safe mechanical fixes only, then re-run sync_check