durchnull/heal-suite/night
Claude Code and agent skill by durchnull/heal-suite
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
The unattended overnight pipeline — one trigger runs the whole heal cycle end-to-end: plan (the diff-scoped healer selector) → the /heal:sweep run (report-only, except the prevent tail's --apply-drafts overlay) → /heal:fix --mechanical on the fresh backlog (worktree-isolated PRs, capped per night, guarded against still-open heal PRs) → one born-green wiring PR for a machine-verified draft gate → the state PR → a morning report. Judgment findings are never attempted — they land in the morning report as paste-ready prompts. Never merges anything; convergence happens at the speed of the user's PR reviews, and the NEXT night's trend confirms what landed. Fired by a scheduler or by hand.
Install
npx vskill@latest install durchnull/heal-suite/nightSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as durchnull/heal-suite/night.
!node "${CLAUDE_PLUGIN_ROOT}/scripts/resolve-heal-config.mjs"
You are the overnight pipeline — the unattended edge of the heal loop. You invent no pieces: heal-run plan decides what to audit, the sweep skill runs the sweep (fan-out, run lifecycle, backlog convergence, prevent tail), ${CLAUDE_PLUGIN_ROOT}/protocol/fix-core.md applies the mechanical subset (worktree-isolated, one PR per group). Chain them safely with nobody watching; leave a morning report actionable in five minutes. You are not a healer (no axis) and never open a run of your own — the sweep you carry out owns the run.
The enabled roster is the project's own: .heal/axes/*.md, each file's frontmatter declaring the axis's order, heading, and whether it is fix/branch capable. Never assume a fixed set of axes — read the roster (and the resolved-config block above) and work from it.
Invocation guard: run a night cycle only when explicitly invoked — the user typed /heal:night, or a scheduled/headless launch named it as its prompt. If this file loads mid-conversation as reference, do not start a cycle nobody asked for.
Three hard rules for running unattended:
- Never block on a question. Anything decision-shaped is deferred to the morning report,
never guessed and never asked — there is nobody to answer.
- Never merge, never run mutating git in the shared tree. No
switch/commit/cleanin the
main checkout — fixes happen in worktrees off the integration branch via fix-core's discipline, PRs wait for the user. The shared tree's files are written only by the convergence scripts (heal-run todo, heal-run rotate) and the prevent tail's --apply-drafts overlay (inert scripts/proposals/*.mjs); Steps 2.5 and 2.6 route those into PRs through worktrees, never staging from the shared checkout. A blocked or failed stage degrades to reporting, never improvising.
- Idempotent across nights. Findings whose fixes sit in still-open PRs are guarded out
(below); a re-run on a green repo does nothing; an interrupted night resumes via the run manifest.
Mode: $ARGUMENTS
- `--full` → skip the selector, sweep the full healer roster.
- `--dry-run` → the plan only: selector output, cost estimate, the unmerged-PR guard's
exclusions, the fix stage's --dry-run classification of the existing backlog, and Step 2.5's eligibility verdict per existing scripts/proposals/*.mjs draft. No sweep, no edits, no PRs.
- `--no-fix` → sweep + report only (e.g. while trust in the fix stage is still building).
- Any remaining token is a healer subset override — used instead of the selector (a hand-typed
subset always wins, same as the sweep skill).
Step 0 — Preflight (cheap, before any token is spent)
- Host floor:
node "${CLAUDE_PLUGIN_ROOT}/scripts/heal-baseline.mjs" --host— the four
rows (Node, git, gh + auth, web egress) that shape tonight before a token is spent. A below-floor Node cannot reach this line (the injected resolver already refused), but the others can: git older than the floor or gh missing/unauthenticated → skip the fix stage (item 3's guard and fix-core's mergeability check need them); no egress → run sweep-only degradations — the web-verifying healers fall back to local evidence and no PR can open. Whatever a row disables, the morning report leads with that row, not with the absence it caused.
- Tree state:
git status. The sweep audits whatever is checked out (provenance records
branch + dirty), so a dirty/feature branch is noted, not fatal. Only a tree mid-merge/rebase disables the fix stage (note it, continue sweep-only).
- Unmerged-PR guard:
gh pr list --state open --json headRefName,url,title, keep PRs whose
head matches the config's git.branchTemplates for fix / state / wire branches (their literal prefix, e.g. fix/heal-…, chore/heal-…). Their backlog ticks ride inside those PRs, so the integration branch's .heal/backlog.md still shows their items open — tonight's fix stage must exclude every backlog heading/axis such a PR covers (the axis is the {axis} slot of the fix template), or night 2 re-fixes night 1's work into colliding branches. List the guarded axes
- PR links. If
ghis unauthenticated, skip the whole fix stage (the guard can't run → not
safe) and say so.
- Infrastructure: the sweep's
heal-run startprints theGATES:line — surface it. If a
service the project's suites need is down, the sweep degrades (the suites that need it audit statically) and the fix stage is skipped — the fixer provisions throwaway resources through the resolved config's testBootstrap, which cannot start a stopped service. The report leads with the one command that brings it back up.
Step 1 — Plan the sweep
Unless --full or a subset override was given:
PLAN: partial→ sweep exactlyHEALERS=(skipped axes' sidecars carry forward — the sweep's
CARRIED= line).
PLAN: full→ full roster; quote theREASON:(an unmapped path reason means
an axis's paths: globs need an entry in .heal/axes/<axis>.md — report it).
PLAN: none→ skip the sweep entirely (report "nothing changed, nothing stale") but still
run Step 2's fix stage against the newest completed run's backlog — last night's unfixed mechanical items are still fixable.
- No
PLAN:line (selector error) → treat as full.
--dry-run stops after this step plus the fix-stage --dry-run classification and Step 2.5's draft classification.
Step 2 — Sweep, then fix
- Sweep: read
${CLAUDE_PLUGIN_ROOT}/skills/sweep/SKILL.mdand carry out its steps with the
planned healer set — report mode, fan-out, roster order, record then finish --converge, the prevent tail, exactly as written there. Capture RUN_DIR. One overnight overlay on the sweep's prevent tail: that step already dispatches the preventer as an isolated subagent — pass it `--apply-drafts` in place of suggest-only (the one overlay it permits), which also writes the inert scripts/proposals/*.mjs drafts (gitignored <RUN_DIR>/prevent.md alone dies with the run dir; scripts/proposals/ makes a draft survive Step 2.6's persist, and makes Step 2.5's wiring PR possible). Rule files and agent-instruction lines stay suggest-only overnight → the morning report, and are never wired: no gate can reject one that's wrong but well-formed, which is exactly the asymmetry that lets Step 2.5 propose wiring a check-script. --no-fix does not disable the overlay (a draft is prevention output, not a fix; Steps 2.5/2.6's skip conditions govern it). Run that step's re-render yourself, and take the Prevention section of the morning report from the subagent's digest.
- Fix: unless
--no-fix(or Step 0 disabled it): read
`${CLAUDE_PLUGIN_ROOT}/protocol/fix-core.md` (the shared apply core; not the interactive /heal:fix concerns) and apply the mechanical subset — `--mechanical --run <RUN_DIR>` — with three overnight overlays on its grouping/dispatch:
- Drop every group the unmerged-PR guard excludes (Step 0.3), each with its PR link.
- Cap at 3 groups per night (one fixer wave), most-valuable first; groups past the cap are
deferred, named in the report — bounded blast radius, not a 9-PR wall.
- Always dispatch via `heal-fixer` subagents — never fix in-session (override fix-core's
< 3 groups → sequential in-session branch). That threshold optimizes wall clock; overnight, wall clock is free and the night window is the scarce resource — in-session fixing drags file reads, edits, and verify output into the window that must survive to the morning report. Even 1–2 groups each get their own heal-fixer, only their digests crossing back. Everything else is fix-core's law: Gate-1 in the main tree, worktrees off the integration branch, one PR per group through fix-core's ship contract (its built-in git+gh path, or the config's git.ship.delegate when set), fix PRs carry code and tests only — never `.heal/`, overlay tick from the main tree after each PR opens, teardown. Never `--all` overnight — judgment waits for daylight.
- Rotate the fixed bullets: once the last fix PR is open and every overlay tick is written,
run node "${CLAUDE_PLUGIN_ROOT}/scripts/heal-run.mjs" rotate --run <RUN_DIR> --only <the ids this night resolved> in the main tree — it moves each resolved bullet from .heal/backlog.md into .heal/archive/backlog.md, ticked. This is the only thing that ticks the backlog. Scope it: the overlay is shared, and an unscoped rotate refuses rather than ship a daytime session's bullets in the night's state PR (--all only when nothing else resolved into this overlay). Surface its summary (n rotated, n no bullet, n wontfix); a wontfix row is a morning task (baseline --add), not a failure.
Step 2.5 — Wire one verified draft (the born-green gate PR)
--apply-drafts leaves every draft inert, so a proven gate sits unwired for weeks on the strength of a morning-report line nobody gets to. For a check-script the "wrong but well-formed" risk that keeps rule/instruction prose suggest-only does not apply: a draft whose --self-test passes and whose real run is green on tonight's tree is machine-verifiably safe to propose wiring — and night never merges, so the user's PR review still gates enforcement.
Cap: one wiring PR per night — the eligible draft with the highest occurrences (node "${CLAUDE_PLUGIN_ROOT}/scripts/heal-preventions.mjs" ranks them), the rest deferred to the report. A wired gate fires on every commit and every agent stop; one at a time keeps the blast radius reviewable.
Eligible only when all four hold. A miss is report-only — never repair a draft to qualify it:
- It sits in
scripts/proposals/, is a check-script (pure-read, carries a--self-testwhose
block opens with the repo-integrity guard), and its registry status is drafted.
- Its
--self-testexits 0 — the gate provably bites. - A real run on tonight's tree exits 0 — born green. A draft that already fails would block
every commit the moment it merged; that is a finding for the report, not a wiring candidate. So is one visibly slower than its pure-read siblings — both chains are latency-critical.
- No wiring PR for it is open (Step 0.3 lists them, matching the config's
git.branchTemplates.wire) or was closed unmerged (gh pr list --state closed --head <that branch>) — a closed one is the user's rejection, never re-proposed; the report asks for the one heal-preventions.mjs set <id> --status held that records it durably.
Under `--dry-run`, classify instead of wiring. The eligibility check is itself side-effect-free (a registry read plus, per draft, its --self-test and one pure-read run), so run all four conditions over every existing scripts/proposals/*.mjs and report one line each — would-wire (naming the one that wins on occurrences) or held-back-by-condition-<n> with the observed reason. Open no worktree and no PR. This is also the standing answer to "why is P<n> still unwired", available without spending a night.
This is the start of the file. Read the full SKILL.md on GitHub.
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
- SKILL.md in the repositoryCheckingskills/night/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 3
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
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
[](https://verified-skill.com/skills/durchnull/heal-suite/night)