Status: Accepted
Date: 2026-04-16
Decision maker: Human (Pitimon / P.Itarun-xOps)
As of v2.9.0, the three largest skills/*/SKILL.md files are at or near the F3 word-budget fitness-function ceiling (2000 words):
skills/using-8-habits/SKILL.md— 1990 words (99.5%)skills/eu-ai-act-check/SKILL.md— 1989 words (99.5%)skills/calibrate/SKILL.md— 1774 words (88.7%)
Any future feature addition to these skills breaks the word budget. External research (shanraisshan/claude-code-best-practice/implementation/claude-skills-implementation.md, captured in the research brief at plans/shiny-singing-dove.md) surfaced the Anthropic-documented progressive-disclosure pattern: split large SKILL.md files into a scannable core + sibling reference and example files loaded on demand.
We need to commit to a convention now so the three refactors in v2.10.0 (and future refactors as other skills grow) follow a uniform structure.
- Description: Create
skills/<name>/reference.mdandskills/<name>/examples.mdalongsideSKILL.md. SKILL.md body contains inlineLoad \${CLAUDE_PLUGIN_ROOT}/skills//reference.md` for Xdirectives at the appropriate spots (matches the existinghabits/h*.md` load pattern used in 5 current skills). - Pro: Zero frontmatter schema change; proven pattern (Check 8 in
validate-structure.shalready enforces Load-directive resolution as a hard fail); Claude loads lazily when body reaches the directive. - Con: Reference-file path appears twice — once in SKILL body, once implicitly in the sibling file itself.
- Description: Add
references: [reference.md, examples.md]to SKILL.md frontmatter. Validator reads YAML list instead of grep'ing body. - Pro: Machine-readable.
- Con: Schema migration pressure on all 17 skills; unclear whether Claude auto-loads frontmatter-declared references or still needs an inline directive; forces a breaking change to skill frontmatter shape.
- Description: Claude discovers
reference.md/examples.mdsiblings automatically by scanning the skill directory. - Pro: Zero declaration overhead.
- Con: Undeclared files are not loaded reliably; defeats lazy-load intent; validator cannot distinguish intended references from stray files.
Option A — sibling files named reference.md and examples.md, referenced from SKILL.md body via the existing Load \${CLAUDE_PLUGIN_ROOT}/skills//.md`` directive format.
Rationale:
- Reuses existing infrastructure.
validate-structure.shCheck 8 (lines 167-180) already hard-fails on brokenLoaddirectives — missing sibling files are caught automatically without any new validator logic. No new fitness function required for existence checks. - Zero schema churn. Frontmatter fields stay unchanged across all 17 skills.
- Proven pattern. Five current skills (breakdown, build-brief, deploy-guide, design, monitor-setup) already use this directive format to load
habits/h*.mdreferences. Claude reliably follows them. - Honest to the underlying mechanism. Claude reads the SKILL body linearly and executes Load directives when it reaches them. An inline directive is a direct expression of that model; a frontmatter field would be a lie (Claude doesn't pre-load frontmatter references — it still needs the inline instruction).
- New file convention:
skills/<name>/reference.mdholds long-form reference material (tables, full schemas, extended rubrics).skills/<name>/examples.mdholds worked examples. - When to apply: Skills where SKILL.md exceeds 1500 words OR where reference content (matrices, multi-case examples) bloats the skill body.
- When NOT to apply: Skills with SKILL.md <1200 words. Don't split for the sake of splitting.
- Lazy-load semantics:
Loaddirectives appear at the point in the SKILL body where the content is relevant — not at the top or bottom en bloc. Users who invoke the skill but don't hit the referenced section never pay the cost. - No empty placeholders: If a skill has no worked examples, do not create an empty
examples.md. Create onlyreference.md.
F6 — sibling soft word budget (added to tests/validate-structure.sh):
- Warn (not fail) if
skills/*/reference.mdorskills/*/examples.mdexceeds 5000 words. - Rationale: sibling files exist precisely to hold long content; a hard ceiling would defeat the purpose. A 5000-word warning catches unbounded growth without blocking legitimate reference material.
F5 (existence check) — already covered by Check 8. No new code needed.
- Frontmatter schema: unchanged.
- DAG (
prev-skill/next-skill): unchanged. user-invocable: trueon all refactored skills.argument-hint: unchanged.- Check 1-7, 10-15b in
validate-structure.sh: unchanged. - F3 word budget: remains a warning (historically a warning per Check 9 lines 183-197 — this ADR does not upgrade it to a hard fail).
- Refactor 3 skills in v2.10.0:
using-8-habits,eu-ai-act-check,calibrate. - Add F6 warning to
validate-structure.sh. - Track in Issue #125.
- Refactoring the remaining 14 skills. That is a v2.11+ decision evaluated case-by-case.
- Changing
habits/h*.mdinto background skills (Idea B from the research brief). Separate decision cycle. - Parallel-dispatch
/cross-verifyusing domain packs (Idea D). Separate decision cycle.
- Research brief:
plans/shiny-singing-dove.md(2026-04-16) - Issue: #125
- Precedent ADR: ADR-003 (content validation approach)
- External source:
shanraisshan/claude-code-best-practice/implementation/claude-skills-implementation.md - Existing Load pattern:
skills/research/SKILL.md:178-180,skills/design/SKILL.md,skills/breakdown/SKILL.md,skills/build-brief/SKILL.md,skills/deploy-guide/SKILL.md,skills/monitor-setup/SKILL.md