Skip to content

Add Skills as Resources reference implementation#16

Draft
olaservo wants to merge 1 commit intomainfrom
add-skills-as-resources-example
Draft

Add Skills as Resources reference implementation#16
olaservo wants to merge 1 commit intomainfrom
add-skills-as-resources-example

Conversation

@olaservo
Copy link
Member

@olaservo olaservo commented Feb 8, 2026

Summary

  • Adds a Skills as Resources reference implementation at examples/skills-as-resources/, demonstrating the MCP Resources approach to skill delivery using the skill:// URI scheme
  • Answers Open Question 12 ("why not just resources?") with a working implementation
  • Includes both TypeScript and Python implementations with shared sample skills, mirroring the structure of the skills-as-tools example (Add Skills as Tools reference implementation (Approach 3) #15)

Five resource types

Resource URI Purpose
Index skill://index JSON index of all skill summaries
Prompt XML skill://prompt-xml XML for system prompt injection
Skill content skill://{name} Full SKILL.md markdown content
Document list skill://{name}/documents Supplementary file listing
Document skill://{name}/document/{path} Individual document via ResourceTemplate

Key design decisions

  • Application-controlled: Resources are read by the host/client, not invoked by the model — demonstrates a fundamentally different control model than Skills as Tools
  • Static resources for skills, template for documents: Each skill becomes a concrete resource in resources/list; only document fetching uses a ResourceTemplate
  • Progressive disclosure via URI hierarchy: skill://indexskill://{name}skill://{name}/documentsskill://{name}/document/{path}
  • SDK difference documented: TypeScript uses RFC 6570 {+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

  • TypeScript: cd examples/skills-as-resources/typescript && npm install && npm run build compiles cleanly
  • Python: cd examples/skills-as-resources/python && pip install -e . installs cleanly
  • Both discover 2 skills (code-review with 1 document, git-commit-review with 0)
  • MCP Inspector: verify resources/list returns all expected resources
  • MCP Inspector: verify resources/read on skill://index returns valid JSON
  • MCP Inspector: verify resources/read on skill://prompt-xml returns valid XML
  • MCP Inspector: verify resources/read on skill://code-review returns SKILL.md content
  • MCP Inspector: verify document template returns references/REFERENCE.md content

🦉 Generated with Claude Code

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>
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