Skip to content

Add Skills as Tools reference implementation (Approach 3)#15

Draft
olaservo wants to merge 2 commits intomainfrom
add-skills-as-tools-example
Draft

Add Skills as Tools reference implementation (Approach 3)#15
olaservo wants to merge 2 commits intomainfrom
add-skills-as-tools-example

Conversation

@olaservo
Copy link
Member

@olaservo olaservo commented Feb 8, 2026

Summary

  • Adds examples/skills-as-tools/ with minimal TypeScript and Python MCP servers demonstrating the Skills as Tools pattern (Approach 3)
  • Both implementations expose list_skills and read_skill tools with progressive disclosure
  • Includes security features: path traversal protection, file size limits, allowlisted file types, safe YAML parsing
  • Two sample skills (git-commit-review, code-review) shared across both implementations
  • Pattern documentation in examples/skills-as-tools/README.md

Test plan

  • TypeScript: cd examples/skills-as-tools/typescript && npm install && npm run build
  • TypeScript: test with MCP Inspector — npx @modelcontextprotocol/inspector node dist/index.js ../sample-skills
  • Python: cd examples/skills-as-tools/python && pip install -e .
  • Python: test with MCP Inspector — npx @modelcontextprotocol/inspector -- python -m skills_as_tools.server ../sample-skills
  • Verify list_skills returns both sample skills
  • Verify read_skill returns full SKILL.md content
  • Verify read_skill with invalid name returns error with available names

🦉 Generated with Claude Code

olaservo and others added 2 commits February 7, 2026 17:46
Minimal TypeScript and Python MCP servers demonstrating the Skills as
Tools pattern: exposing agent skills via list_skills and read_skill
tools with progressive disclosure, path traversal protection, file
size limits, and safe YAML parsing.

Includes two sample skills (git-commit-review, code-review) and
pattern documentation in examples/skills-as-tools/README.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Exposes two tools:
- list_skills: Returns skill names and descriptions (progressive disclosure)
- read_skill: Returns the full SKILL.md content for a named skill
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think read_skill need to return all content in the skill folder given a skill can get pretty complex.

Also we can think about whether it should be read or install here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually when I looked at your PR about adding skills as resources, that solved this problem very well with the file hierarchy!

Thanks for driving all these and they will be good discussion points.

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.

2 participants