Split the five monolithic plan-agent skills — build, finalize-plan, documenting-plans, plan-status, setup-sites — into a SKILL.md core under 600 words holding trigger, arguments, and step names, with the mechanics moved to references/<topic>.md files loaded on demand.
Five plan-agent skills bill 10,776 words of context every time they fire, and an ordinary run reads maybe a quarter of it — Step 1b's 60-line no-plan contract is paid in full by every invocation that names a plan. The cost is invisible today because nothing measures it, so this ships the measurement alongside the fix and treats a behavioral regression as blocking even if every word count drops.
Read and implement all steps in the plan at docs/plans/split-plan-agent-skills.md — Stop paying 10,776 words for guidance nobody reads yet. Verify against the plan's Tests, Verification, and Acceptance Criteria before reporting done. If everything passed, mark completion in docs/plans/split-plan-agent-skills.md — tick each step's [x] marker and each criterion's - [x], set status: completed — and re-render the HTML from the spec. If any check failed, leave status: in-progress and say which.
More ways to run this plan — goal & workflow prompts, file path
Achieve this goal: Stop paying 10,776 words for guidance nobody reads yet. The plan at docs/plans/split-plan-agent-skills.md describes one approach — use it as reference, but optimize for the outcome. Fan out across parallel subagents where that serves the outcome. Verify against the plan's Tests, Verification, and Acceptance Criteria before reporting done. If everything passed, mark completion in docs/plans/split-plan-agent-skills.md — tick each step's [x] marker and each criterion's - [x], set status: completed — and re-render the HTML from the spec. If any check failed, leave status: in-progress and say which.
Run a workflow to implement the plan at docs/plans/split-plan-agent-skills.md — Stop paying 10,776 words for guidance nobody reads yet. Brief subagents with the plan file at docs/plans/split-plan-agent-skills.md. Reserve a final verification phase for the lead agent, not a subagent. Verify against the plan's Tests, Verification, and Acceptance Criteria before reporting done. If everything passed, mark completion in docs/plans/split-plan-agent-skills.md — tick each step's [x] marker and each criterion's - [x], set status: completed — and re-render the HTML from the spec. If any check failed, leave status: in-progress and say which.
split-plan-agent-skills.html
docs/plans/split-plan-agent-skills.html
docs/plans/split-plan-agent-skills.md
Context
The story behind this plan — what prompted the work and why it matters now.
Anthropic's "The new rules of context engineering for Claude 5 generation models" makes progressive disclosure (Rule 3) the load-bearing rule for skill authoring: move detailed guidance out of the always-loaded body into references the model pulls when it needs them, and split long skills into multiple files. A SKILL.md body is paid in full whenever the skill triggers — there is no partial load, no lazy paragraph. A measured audit of this repo found 17 SKILL.md files over 1,200 words shipping as a single file with zero sibling reference files. Five of them live in one plugin, plan-agent: build (2,907 words), finalize-plan (2,764), documenting-plans (1,897), plan-status (1,681), setup-sites (1,527) — 10,776 words in one plugin, and one plugin means one version bump.
build is the clearest case. Its ## Step 1b — Author a plan first (the no-plan chain) runs from line 159 to line 219 — about 60 lines of delegation contract, proposal-versus-direct gating, and return-path rules — and it fires only when the skill is invoked with no plan named. Every ordinary /plan-agent:build docs/plans/x.md pays for all of it and reads none of it. The three mandatory gates (Steps 3, 4, 5, lines 227-303) are the same shape: ~80 lines of verification mechanics that matter at the end of a run, not at the trigger. finalize-plan carries an entire ## Sweep mode (--all) section plus a duplicated legacy-HTML-surgery path; plan-status carries a full ## Bulk mode branch; setup-sites carries four embedded shell blocks.
The pattern is already proven inside this very plugin. kit/plugins/plan-agent/skills/implementation-plan/ ships guidelines/planning-principles.md, guidelines/section-catalog.md, guidelines/right-sizing.md, guidelines/writing-style.md, and reference/SKELETON.md, and its core says explicitly: "read the full file when the step calls for it, not all up front". code-testing-agent and wcag-compliance-reviewer do the same with references/ dirs. This plan copies that pattern, using references/ (the plural, dominant spelling in the repo and the name build-dist.mjs already whitelists).
Risk: silent behavior change. Moving 60 lines of contract into another file can drop a rule. Mitigation: tests/plugins/test-build-skill.sh already pins 18 checks' worth of build's exact contract phrases — the Step 1b delegation calls, the discovery cap, the misparse note, the AskUserQuestion-unavailable fallback. That test becomes the behavior-preservation harness: its section extractors are taught to resolve a heading from whichever file now carries it, and every assertion must still pass unchanged. test-finalize-all-flag.sh and test-setup-sites.sh get the same treatment.
Risk: dangling or orphaned references. A reference file nothing links to is dead weight; a link to a file that does not exist is a hole in the workflow. Progressive disclosure only works if the core names every file it expects the model to fetch. Mitigation: the objective test asserts both directions — every references/*.md on disk is linked from its SKILL.md, and every references/<name>.md mentioned in a SKILL.md resolves to a real file.
Risk: description drift. Splitting must not change any frontmatter description — those strings are what makes a skill trigger, and tests/plugins/test-description-budget.sh already enforces the 200-char budget. Mitigation: an explicit git diff check that the five description: lines are byte-identical to main.
Deliberate exception to the ceiling logic: build's re-render subroutine (a four-line bash block) stays in the core rather than moving to a reference, because every single step calls it. Pulling it out would trade one always-paid block for five on-demand fetches of the same four lines.
Files that change
Every file this plan touches, and what happens to each one.
kit/plugins/plan-agent/skills/build/SKILL.mdmodified reduced to trigger, arguments summary, step names, the re-render subroutine, Step 2, and Step 6- kit/plugins/plan-agent/skills/build/references/
invocation.mdnew command vs model activation, flag parsing, objective-versus-path grammar and the misparse noteresolve-plan.mdnew Step 0 exit-plan-mode, the dirty-tree pre-flight guard, AskUserQuestion-unavailable rule, plans-directory resolution, discovery offer, preconditionsauthor-plan-chain.mdnew Step 1b in full: objective check, proposal-versus-direct gate, both delegation paths, return path, abandonment contractcompletion-gates.mdnew Steps 3, 4, 5 and the spec-is-source-of-truth rules they enforce
kit/plugins/plan-agent/skills/finalize-plan/SKILL.mdmodified core plus step names- kit/plugins/plan-agent/skills/finalize-plan/references/
resolve-and-modes.mdnew Step 1 argument parsing, plans-directory precedence, spec-versus-legacy edit modesweep-mode.mdnew the--allflow, S1 through S5evidence-analysis.mdnew Steps 2, 3a, 3b, 3c and the Step 4 findings tablewrite-completions.mdnew Step 5 spec mode and legacy mode, Step 6 delivery
kit/plugins/plan-agent/skills/documenting-plans/SKILL.mdmodified core plus step names- kit/plugins/plan-agent/skills/documenting-plans/references/
resolve-and-preconditions.mdnew Steps 0-2: todos, plan resolution priority order, completed-and-30-days-old gategather-evidence.mdnew Steps 3-7: parse plan, derive slug, inspect shipped files, git history, target-doc collisiondoc-template.mdnew the Step 8 document template and Step 9 report table
kit/plugins/plan-agent/skills/plan-status/SKILL.mdmodified core plus step names- kit/plugins/plan-agent/skills/plan-status/references/
single-file-flow.mdnew Steps 0-4 and Steps 6-7: resolution, git dates, frontmatter read, evidence scoring, confirmation, write rulesbulk-mode.mdnew the directory /--allseven-stage flow with its triage tabletype-classification.mdnew Step 5's signal-to-type table and the keep-existing-type rule
kit/plugins/plan-agent/skills/setup-sites/SKILL.mdmodified core plus step names- kit/plugins/plan-agent/skills/setup-sites/references/
preflight.mdnew Steps 1-3: git/remote URL derivation,plansDirectorysanity check, template directory lookupscaffold.mdnew Step 4's four idempotent artifacts and the hub placeholder/card-pruning rulesenable-and-verify.mdnew Steps 5-7: Pages source enablement, verification block, delivery summary
- tests/plugins/
test-progressive-disclosure.shnew objective test: word ceiling plus link integrity in both directionstest-build-skill.shmodified section extractors resolve headings across SKILL.md and references/test-finalize-all-flag.shmodified same, for the--allsweep assertionstest-setup-sites.shmodified same, for the scaffold assertions
.github/workflows/check-plugin-versions.ymlmodified new step runningtests/plugins/test-progressive-disclosure.sh.claude-plugin/marketplace.jsonmodifiedplan-agentversion 7.5.0 to 7.6.0kit/plugins/plan-agent/CHANGELOG.mdmodified 7.6.0 entry
Steps
The step-by-step work, in order — each step says what to do, why it matters, and how to check it worked.
tests/plugins/test-progressive-disclosure.sh covering the five skill directories, asserting each SKILL.md is under 600 words via a Python word count (deliberately not wc -w, whose count of em dashes and arrows drifts by locale — the same ~20-word swing that separates a pass on a dev machine from a fail on a CI runner), has at least one references/*.md, links every reference file that exists on disk, and mentions no references/*.md path that does not exist.
bash tests/plugins/test-progressive-disclosure.sh exits 1 and names all five skills as over the ceiling with no reference files..github/workflows/check-plugin-versions.yml as a step named "Test skill progressive disclosure", placed after the existing test-build-skill.sh step, with a comment explaining that a re-monolithized skill is invisible in review otherwise.
grep -c "test-progressive-disclosure.sh" .github/workflows/check-plugin-versions.yml prints 1 and python3 -c "import yaml,sys;yaml.safe_load(open('.github/workflows/check-plugin-versions.yml'))" exits 0.kit/plugins/plan-agent/skills/build/SKILL.md into a core plus references/invocation.md, references/resolve-plan.md, references/author-plan-chain.md, and references/completion-gates.md, moving section text verbatim, leaving the re-render subroutine in the core, and replacing each moved section with a named step line that links its reference file.
Step 1b alone is ~60 lines that fire only on a no-plan invocation, and the three gates are ~80 more that matter only at the end of a run.wc -w kit/plugins/plan-agent/skills/build/SKILL.md reports under 600, and git diff main -- kit/plugins/plan-agent/skills/build/SKILL.md | grep '^-description:' prints nothing.tests/plugins/test-build-skill.sh so its flatten/sed section extractors search SKILL.md and every references/*.md in the skill directory for the owning heading, keeping all 18 checks and their exact phrase assertions untouched.
build's contract survived the move, so they must keep failing on a dropped rule rather than being relaxed to match the new layout.bash tests/plugins/test-build-skill.sh prints "All build-skill checks passed." and exits 0.kit/plugins/plan-agent/skills/finalize-plan/SKILL.md into a core plus references/resolve-and-modes.md, references/sweep-mode.md, references/evidence-analysis.md, and references/write-completions.md, then update tests/plugins/test-finalize-all-flag.sh to resolve its assertions across the split.
--all sweep and the legacy HTML-surgery path are each a whole branch that most invocations never enter.wc -w kit/plugins/plan-agent/skills/finalize-plan/SKILL.md reports under 600 and bash tests/plugins/test-finalize-all-flag.sh exits 0.kit/plugins/plan-agent/skills/documenting-plans/SKILL.md into a core plus references/resolve-and-preconditions.md, references/gather-evidence.md, and references/doc-template.md, and delete the now-redundant ## Table of Contents section in favor of the linked step list.
wc -w kit/plugins/plan-agent/skills/documenting-plans/SKILL.md reports under 600 and grep -c "Table of Contents" kit/plugins/plan-agent/skills/documenting-plans/SKILL.md prints 0.kit/plugins/plan-agent/skills/plan-status/SKILL.md into a core plus references/single-file-flow.md, references/bulk-mode.md, and references/type-classification.md, dropping its ## Table of Contents the same way.
wc -w kit/plugins/plan-agent/skills/plan-status/SKILL.md reports under 600 and grep -c "references/bulk-mode.md" kit/plugins/plan-agent/skills/plan-status/SKILL.md prints at least 1.kit/plugins/plan-agent/skills/setup-sites/SKILL.md into a core plus references/preflight.md, references/scaffold.md, and references/enable-and-verify.md, moving all four embedded shell/python blocks with their steps, then update tests/plugins/test-setup-sites.sh to resolve across the split.
wc -w kit/plugins/plan-agent/skills/setup-sites/SKILL.md reports under 600 and bash tests/plugins/test-setup-sites.sh exits 0.plan-agent from 7.5.0 to 7.6.0 in .claude-plugin/marketplace.json (never adding a version key to kit/plugins/plan-agent/.claude-plugin/plugin.json) and add a ## 7.6.0 entry to kit/plugins/plan-agent/CHANGELOG.md naming the five split skills, the word counts before and after, and the new test.
plan-agent is the only plugin this plan touches, and any edit under kit/plugins/<name>/ requires a marketplace version higher than main plus a CHANGELOG entry; the new references/*.md files are added skill content, which .claude/rules/marketplace.md puts in the MINOR row.BASE_REF=main node scripts/check-plugin-versions.mjs exits 0 and head -5 kit/plugins/plan-agent/CHANGELOG.md shows the 7.6.0 heading.Tests
The tests that prove the change does what it promises.
build, finalize-plan, documenting-plans, plan-status, setup-sites, that SKILL.md is under 600 words, that at least one references/*.md exists beside it, that every references/*.md file on disk is linked by name from that SKILL.md (no orphans), and that every references/<name>.md string appearing in that SKILL.md resolves to an existing file (no dangling links); Run: bash tests/plugins/test-progressive-disclosure.shbuild, the most contract-heavy of the five. File: tests/plugins/test-build-skill.sh; Targets: kit/plugins/plan-agent/skills/build/SKILL.md and its references/; Key cases: all 18 existing checks pass unchanged after the split — Step 1b's two Skill(...) delegation calls, the "offer, never a silent pickup" discovery rule, the three-candidate cap, the objective-versus-path misparse note, the AskUserQuestion-unavailable stop-and-report rule, and the Do not set status: completed here gate ordering — each resolved from whichever file now carries its section.--all sweep assertions and the scaffold/verification assertions pass unchanged with extractors that search the whole skill directory.git diff criterion.Definition of done
The plan counts as done when every statement below is true — check each one off as you verify it.
Final check
One last pass to confirm the whole change works end to end.
Run bash tests/plugins/test-progressive-disclosure.sh — expected result: exit 0 with a passing line for each of the five skills and no orphan or dangling-link report. Then run bash tests/plugins/test-build-skill.sh, bash tests/plugins/test-finalize-all-flag.sh, bash tests/plugins/test-setup-sites.sh, and bash tests/plugins/test-description-budget.sh — all four exit 0. Confirm the version guard with BASE_REF=main node scripts/check-plugin-versions.mjs (exit 0), and confirm distribution with node scripts/build-dist.mjs && find dist -path '*plan-agent/skills/*/references/*.md' | wc -l, which must equal the number of reference files created.
Tautology check — the objective test must be able to fail three times, once per assertion it makes. First break the ceiling: append 700 words of filler to kit/plugins/plan-agent/skills/setup-sites/SKILL.md, re-run bash tests/plugins/test-progressive-disclosure.sh, confirm it exits 1 naming that file as over 600 words, then git checkout -- kit/plugins/plan-agent/skills/setup-sites/SKILL.md. Next break the links: delete the line in kit/plugins/plan-agent/skills/build/SKILL.md that links references/author-plan-chain.md, re-run, confirm it exits 1 reporting that file as an orphaned reference, then revert. Finally break the other direction: add a link to references/does-not-exist.md in the same core, re-run, confirm it exits 1 reporting a dangling link, then revert. A test that stays green through any of the three is measuring nothing and must be fixed before this plan is done.
Behavioral check — the skills must still work, not merely be shorter. Word counts falling is not evidence of correctness. In a scratch git repo outside this worktree, load the plugin with claude --plugin-dir kit/plugins/plan-agent and exercise each split skill end to end: run /plan-agent:setup-sites and confirm it still writes .github/workflows/deploy-pages.yml, docs/.nojekyll, scripts/serve-docs.sh, and docs/index.html and prints its PASS verification lines; run /plan-agent:plan-status <a plan file> and confirm it presents the findings table and writes frontmatter only after confirmation; run /plan-agent:finalize-plan <a plan file> and confirm it produces the evidence table, per-criterion breakdown, and objective-test result; run /plan-agent:build <an existing small plan> and confirm it reaches all three gates and re-renders the HTML; run /plan-agent:build with no arguments and confirm it still enters the Step 1b chain and asks the proposal-versus-direct question. In each run, confirm the model actually opened the relevant references/*.md file — a core that names a reference the model never reads is a broken handoff, not a smaller skill. Record any skill whose behavior changed; a behavioral regression blocks this plan regardless of test results.
Wrapping up
Three gates that must all pass before this plan is marked completed.
Completion Report
No items to report — all requirements met.