README.md

plan-skills-loader #

Auto-load skills listed in an approved plan's "Skills to load" section.

When you accept a plan, this hook reads the plan body, extracts every skill ref from the "Skills to load" table, resolves each via the installed-skills index, and injects the combined SKILL.md bodies into the next turn as additionalContext. No more entering the first implementation turn without the skills the plan declared.

How it works #

Registered as a PostToolUse hook on ExitPlanMode. A Go binary reads the hook payload from stdin, guards on tool_name == "ExitPlanMode" and permission_mode != "plan", then reads the plan body from tool_response.filePath (on-disk file) or tool_response.plan (inline text). File paths are constrained to ~/.claude/plans/ or <cwd>/.claude/plans/ as defense-in-depth. Skill refs come from planparse.ExtractRefs applied to the "Skills to load" section. Each ref resolves through the registered-skills index: zero hits emit a missing-skill notice, one hit reads and emits the SKILL.md body, multiple hits emit an ambiguity notice listing the candidates.

The binary lives at cmd/plan-skills-loader/ in the marketplace repo. The launcher prefers a nix-installed binary on $PATH, falling back to a checksum-verified download of the release artifact.

Limitation: accept-with-clear-context #

PostToolUse:ExitPlanMode does not fire when you accept a plan with clear context. Skills are not auto-loaded on that path.

Use the companion load-plan-skills skill to load them manually:

/plan-skills-loader:load-plan-skills

Skill ref formats #

Refs are extracted from any markdown table under a heading containing "Skills to load" that has a "Skill" column. Backtick-wrapped cell values are treated as skill refs. Rows prefixed LSP: are ignored.

Examples:

  • `code-quality-skills:golang` - namespaced ref, loaded directly
  • `tdd` - bare ref, resolved by the skill index; emits an ambiguity notice when multiple plugins provide it

Installation #

/plugin install plan-skills-loader@jcmuller-plugins

Tests #

go test ./cmd/plan-skills-loader/...