registry
@automindzsheets 01–77shadcn 4.x
SHEET 69

MCP Skill Prompts

item / server / mcp

SKILL.md loader for MCP servers: registers each skill as an MCP prompt plus one get_skill_instructions tool, and syncs thin stubs into a Claude Code plugin repo.

type
item
files
2
registry deps
none
npm deps
none

installs

  • ~/lib/automindz/mcp-skill-prompts.ts
  • ~/tests/mcp-skill-prompts.test.mts
  • Loads skills/<name>/SKILL.md, registers one prompt per skill plus one get_skill_instructions tool
  • Two-method structural interface instead of an SDK import — compiles anywhere, typechecks against your McpServer
  • writePluginStubs regenerates a Claude Code plugin's stubs and prunes stale ones; idempotent

At server startup: registerSkillPrompts(server, loadSkills(skillsDir), { inputSchema: { skill: z.enum(names) } }). server is your real McpServer; it structurally satisfies the two-method SkillPromptServer interface this file declares instead of importing @modelcontextprotocol/sdk (shape taken from SDK 1.29). loadSkills reads <dir>/<name>/SKILL.md, parses key: value frontmatter without a YAML library, and throws naming the file when name or description is missing. Each skill becomes one prompt (its body as a single user message); the shared get_skill_instructions tool takes { skill } and returns the body, or a not-found error listing the available names. Pass inputSchema when you have zod so clients see the enum; without it the tool validates at call time. writePluginStubs(skills, outDir, { server }) regenerates a Claude Code plugin's skills/<name>/SKILL.md stubs pointing at the tool and deletes stale ones — run it as a script, not in the server process. Run the shipped test with node --test tests/mcp-skill-prompts.test.mts.

Variations

one state per section

No previews for this item yet.