kcanom/pi-healing/heal-fix

Claude Code and agent skill by kcanom/pi-healing

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Phase 3 of 4 in the heal chain. Applies the approved fixes from the chain state file one bug at a time — writing a regression test first where the project supports it — running the fix's verification after each and recording per-bug outcomes. Trigger when heal-plan says "run /heal-fix", or standalone via "heal-fix", "apply the heal fixes", "fix the planned bugs".

Install

npx vskill@latest install kcanom/pi-healing/heal-fix

SKILL.md

Heal: Fix

Chain version: 1

Phase 3 of 4: scan → plan → fix → verify

Overview

Executes the fix plan from phase 2. This is the only phase that modifies project code. Fixes are applied one bug at a time, in plan order, each proven by its plan's Verify method before moving on — so a bad fix is caught immediately, not at the end.

Workflow

Step 1 — Load State

Read .heal-state.md from the project root:

  • If missing → "No state file found. Run heal-scan first."
  • If the frontmatter doesn't parse or is missing task/started/status/

chain_version → "State file is malformed. Not proceeding on an unreadable state file."

  • If chain_version is not 1 → "State file was written by an incompatible

version of the heal chain."

  • If status is not one of this chain's known values (in-progress,

phase-1-done, phase-2-done, phase-3-done, complete) → "Unrecognized status <actual> — this state file may belong to a different or since-edited chain."

  • If status is known but not phase-2-done → "Expected status phase-2-done

but found <actual>. Run the previous phase first."

  • If the ## Phase 1 — Scan or ## Phase 2 — Plan section is missing despite

the right status → "Status says phase-2-done but a required section is missing. Treat as corrupted."

Check for .heal-state.lock (abort if present), then create it.

Step 2 — Safety Checkpoint

If the project is a git repository, confirm the working tree is clean (or has only the state file untracked). If there are unrelated uncommitted changes, warn the user and ask whether to proceed — fixes should be attributable to this chain, not tangled with other work.

Then ask the user once: "Commit each fix separately as it lands? (Recommended in a git repo — makes every fix individually revertable.)" Honor their answer for the whole phase. Never commit without that yes.

Step 3 — Apply Fixes One at a Time

Work through the Phase 2 plan in its stated order, only the items marked fix. For each bug:

  1. Re-read the code first. If it has changed since the plan was written and

the approach no longer applies, mark the bug skipped with the reason — do not improvise a different fix.

  1. Regression test first, when possible. If the plan's Verify says "new

test", write that test before touching the fix, run it, and confirm it fails for the reason the finding describes. If it passes, the finding may be wrong — mark skipped with what you observed. If the project has no test framework, skip this and rely on the plan's manual verification command.

  1. Apply the fix exactly as the plan's approach describes — minimal diff,

nothing beyond the bug.

  1. Run the plan's Verify method — the named test(s), the new test, or the

manual command — plus the tests for the touched module. Record pass/fail.

  1. If the fix breaks anything that previously passed, revert the fix (and

its test), mark the bug failed with the error, and continue to the next bug.

  1. Record the outcome: fixed / skipped / failed, files touched, tests run.

If per-fix commits were approved, commit now with message heal: fix B<id> — <one-line finding>.

Never batch multiple bugs into one sweep of edits — one bug, one verification.

Step 4 — Update State

Atomically rewrite .heal-state.md (temp file + rename): keep everything, append the Phase 3 section, set status: phase-3-done:

markdown
## Phase 3 — Fix
**Output**: <N> fixed, <N> skipped, <N> failed (of <N> planned)
**Key decisions**: <reverts performed; plan deviations; anything verify must recheck>
| ID | Outcome | Files touched | Verified by | Notes |
|---|---|---|---|---|
| B3 | fixed | src/auth.py, tests/test_auth.py | new test_auth_expiry (pass) | |
| B1 | failed | src/api.py (reverted) | test_retry (fail) | fix broke test_backoff |
| ... | ... | ... | ... | ... |

Delete .heal-state.lock.

Handoff

After completing this phase, output exactly:

Phase 3 complete. State written to .heal-state.md.
Run /heal-verify to begin Phase 4.

Do not start the next phase. Do not offer to continue. Output only the handoff line and stop.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/kcanom/pi-healing/heal-fix/badge)](https://verified-skill.com/skills/kcanom/pi-healing/heal-fix)

Something wrong with this skill or its page? Tell us.