Align resource layer with SEP-2640 (Skills Extension)#59
Merged
Conversation
Replace legacy `skill://{name}` and `skill://{name}/` URIs with the SEP-2640
shape: `skill://<skill-path>/SKILL.md` for skill markdown, individual files
addressable as siblings, and a new `skill://index.json` discovery resource.
Declares the `io.modelcontextprotocol/skills` extension in initialize
capabilities, and adds `getSkillPath` / `buildSkillResourceUri` /
`parseSkillResourceUri` / `buildSkillIndex` helpers in skill-discovery.ts.
This is a breaking change to the URI scheme; pre-1.0, draft SEP, no shims.
SEP: modelcontextprotocol/modelcontextprotocol#2640
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Document the new URI shapes, the `extensions["io.modelcontextprotocol/skills"]` capability, and the four SEP helpers in skill-discovery.ts. Note the explicit `skill://index.json` update notification fired from `refreshSkills()`. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
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
skill://{name}andskill://{name}/URIs with the SEP-2640 shape:skill://<skill-path>/SKILL.mdfor the skill markdown, sibling URIs for supporting files, and a newskill://index.jsondiscovery resource.extensions["io.modelcontextprotocol/skills"]: {}in theinitializeresponse.getSkillPath,buildSkillResourceUri,parseSkillResourceUri,buildSkillIndex) inskill-discovery.tsand reuse them from resources, subscriptions, and prompts.This is a breaking change to the URI scheme. Pre-1.0, draft SEP, no backward-compat shims.
Resource shape after this PR
skill://<skill-path>/SKILL.mdtext/markdown),nameanddescriptionfrom frontmatterskill://<skill-path>/<file-path>skill://index.jsonapplication/json)<skill-path>is<prefix>/<baseName>for prefixed skills (local: dir basename, GitHub:owner-repo) or just<baseName>for bundled — final segment always equals the frontmatter+ 'name' +per SEP.Out of scope
type: "archive") entries in the index.+ 'mcp-resource-template' +index entries.+ '_meta' +projection of additional frontmatter (commit+ '207b3fd' +removed it; reintroducing would contradict that direction).Test plan
+ 'npm run build' +clean+ 'npm test' +— 168/168 passing (rewrote+ 'skill-resources.test.ts' +and+ 'subscriptions.test.ts' +, extended+ 'skill-discovery.test.ts' +with helper coverage)+ 'initialize' +advertises+ 'extensions["io.modelcontextprotocol/skills"]' ++ 'resources/list' +shows one+ 'skill:///SKILL.md' +per skill plus+ 'skill://index.json' +; no legacy+ 'skill://name' +or+ 'skill://name/' ++ 'resources/read' +of+ 'skill://index.json' +returns SEP-shaped JSON+ 'resources/read' +of+ 'skill:///SKILL.md' +returns markdown+ 'resources/read' +of a sibling file (e.g.,+ 'skill:///scripts/example.py' +) returns content+ 'skill://index.json' +; modify any SKILL.md → notification fires+ 'notifications/resources/list_changed' +and+ 'notifications/resources/updated' +for+ 'skill://index.json' +both fire🤖 Generated with Claude Code