Add Skills as Resources reference implementation#16
Draft
Conversation
Demonstrate the MCP Resources approach to skill delivery using the skill:// URI scheme. This answers Open Question #12 ("why not just resources?") with a working implementation. Five resource types: - skill://index — JSON index of all skills - skill://prompt-xml — XML for system prompt injection - skill://{name} — individual skill SKILL.md content - skill://{name}/documents — supplementary file listing - skill://{name}/document/{path} — individual document (ResourceTemplate) Includes TypeScript and Python implementations with shared sample skills, matching the structure of the skills-as-tools example. Co-Authored-By: Keith Groves <6021332+keithagroves@users.noreply.github.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
examples/skills-as-resources/, demonstrating the MCP Resources approach to skill delivery using theskill://URI schemeFive resource types
skill://indexskill://prompt-xmlskill://{name}skill://{name}/documentsskill://{name}/document/{path}ResourceTemplateKey design decisions
resources/list; only document fetching uses aResourceTemplateskill://index→skill://{name}→skill://{name}/documents→skill://{name}/document/{path}{+path}expansion for natural slashes; Python URL-encodes slashes (SDK auto-decodes)Attribution
Substantially derived from skills-over-mcp by @keithagroves, with additional patterns from skilljack-mcp by @olaservo. Python implementation and security model are original.
Test plan
cd examples/skills-as-resources/typescript && npm install && npm run buildcompiles cleanlycd examples/skills-as-resources/python && pip install -e .installs cleanlyresources/listreturns all expected resourcesresources/readonskill://indexreturns valid JSONresources/readonskill://prompt-xmlreturns valid XMLresources/readonskill://code-reviewreturns SKILL.md contentreferences/REFERENCE.mdcontent🦉 Generated with Claude Code