Skip to content

feat: implement progressive disclosure for skills (L2/L3 split)#66

Merged
nucliweb merged 1 commit intomainfrom
feat/skills-progressive-disclosure
Mar 10, 2026
Merged

feat: implement progressive disclosure for skills (L2/L3 split)#66
nucliweb merged 1 commit intomainfrom
feat/skills-progressive-disclosure

Conversation

@nucliweb
Copy link
Owner

Summary

Reduces context loaded per skill activation by ~28% by splitting skill content into three levels following the Anthropic Skills progressive disclosure pattern.

  • L1 (frontmatter): always in context — unchanged
  • L2 (SKILL.md body): loaded on skill activation — reduced from ~83 KB to ~61 KB total
  • L3 (references/): loaded on demand — ~55 KB of snippet details now only consumed when needed

Changes

scripts/generate-skills.js (single source of truth — skills are generated artifacts):

  • Replace truncated snippet table with compact script list in SKILL.md
  • Move per-snippet descriptions and thresholds to references/snippets.md (new L3)
  • Copy SCHEMA.md to references/schema.md per skill (was inaccessible before)
  • Add license and metadata block to SKILL.md frontmatter
  • Remove duplicate MCP execution block (covered by webperf meta-skill)
  • Fix double --- separator bug after WORKFLOWS.md injection
  • Add ## References section pointing to L3 files

Before / After

Skill Before After Reduction
webperf-loading 24 KB 11 KB −54%
webperf-interaction 17 KB 12 KB −27%
webperf-core-web-vitals 14 KB 10 KB −26%
webperf-media 13 KB 12 KB −9%
webperf-resources 12 KB 11 KB −6%
Total L2 ~83 KB ~61 KB −28%

Test plan

  • node scripts/generate-skills.js runs without errors
  • references/snippets.md and references/schema.md present in all 5 category skills
  • No double --- in any SKILL.md (frontmatter only: 2 occurrences)
  • workspace/ added to .gitignore

Reduces context loaded per skill activation by ~28% by moving snippet
details out of SKILL.md (L2) into a new references/ directory (L3).

Changes to generate-skills.js:
- Replace truncated snippet table with compact script list in SKILL.md
- Move per-snippet descriptions and thresholds to references/snippets.md
- Copy SCHEMA.md to references/schema.md (accessible from each skill)
- Add license and metadata block to SKILL.md frontmatter
- Remove duplicate MCP execution block (covered by webperf meta-skill)
- Fix double --- separator bug after WORKFLOWS.md injection
- Add ## References section pointing to L3 files

Result: 83 KB → 61 KB total L2; 55 KB of detail available on demand in L3
@vercel
Copy link

vercel bot commented Mar 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
webperf-snippets Ready Ready Preview, Comment Mar 10, 2026 11:50am
webperf-snippets-u6am Ready Ready Preview, Comment Mar 10, 2026 11:50am

@nucliweb nucliweb merged commit 9542911 into main Mar 10, 2026
3 checks passed
@nucliweb nucliweb deleted the feat/skills-progressive-disclosure branch March 10, 2026 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant