用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/basementstudio/xmcp --skill prompt-design命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Create a new xmcp tool with schema, metadata, and handler. Use when the user wants to add a new tool to their xmcp project.
Guide for designing effective MCP servers with agent-friendly tools. Use when creating a new MCP server, designing MCP tools, or improving existing MCP server architecture.
Design MCP resources to expose content for LLM consumption. Use when creating static or dynamic resources in xmcp.
正在显示 SKILL.md
基于 SOC 职业分类
| name | prompt-design |
| description | Design MCP prompts to expose reusable prompt templates. Use when creating parameterized prompts in xmcp. |
You are helping the user create a new xmcp prompt. Follow this interactive workflow.
Before generating any code, ask the user these questions using AskUserQuestion:
Prompt name (if not provided): What should the prompt be named? (Use kebab-case)
Prompt type: Ask which type of prompt they need:
Parameters (if parameterized): What inputs should the prompt accept?
Role: What role should the prompt assume?
Use case: What is the prompt designed for?
Create the prompt file in src/prompts/:
src/prompts/{prompt-name}.ts
Every xmcp prompt has three main exports:
// 1. Schema (optional) - Define parameters with Zod
export const schema = { /* ... */ };
// 2. Metadata (optional) - Prompt configuration
export const metadata: PromptMetadata = { /* ... */ };
// 3. Handler (required) - Default export function
export default function handler(params?) { /* ... */ }
import { type PromptMetadata } from "xmcp";
// For parameterized prompts
import { z } from "zod";
import { type InferSchema, type PromptMetadata } from "xmcp";
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No* | Unique prompt identifier |
title | string | No | Human-readable title |
description | string | No | What this prompt does |
role | string | No | "user" or "assistant" (default: user) |
*When metadata is omitted, xmcp uses the filename as the prompt name.
| Return Type | Use Case |
|---|---|
string | Simple text prompt |
{ type: "text", text: string } | Explicit text content |
{ type: "image", data: base64, mimeType: string } | Image content |
Array<Content> | Multiple content blocks |
MCP prompts are useful for:
For complete code templates including:
Read: references/patterns.md
src/prompts/{prompt-name}.tsname, title, and description.describe() for all parameters (if parameterized)Suggest running pnpm build to verify the prompt compiles correctly.