feat: implement progressive disclosure for skills (L2/L3 split)#66
Merged
feat: implement progressive disclosure for skills (L2/L3 split)#66
Conversation
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reduces context loaded per skill activation by ~28% by splitting skill content into three levels following the Anthropic Skills progressive disclosure pattern.
SKILL.mdbody): loaded on skill activation — reduced from ~83 KB to ~61 KB totalreferences/): loaded on demand — ~55 KB of snippet details now only consumed when neededChanges
scripts/generate-skills.js(single source of truth — skills are generated artifacts):SKILL.mdreferences/snippets.md(new L3)SCHEMA.mdtoreferences/schema.mdper skill (was inaccessible before)licenseandmetadatablock toSKILL.mdfrontmatterwebperfmeta-skill)---separator bug afterWORKFLOWS.mdinjection## Referencessection pointing to L3 filesBefore / After
Test plan
node scripts/generate-skills.jsruns without errorsreferences/snippets.mdandreferences/schema.mdpresent in all 5 category skills---in anySKILL.md(frontmatter only: 2 occurrences)workspace/added to.gitignore