بنقرة واحدة
prompt-design
Design MCP prompts to expose reusable prompt templates. Use when creating parameterized prompts in xmcp.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Design MCP prompts to expose reusable prompt templates. Use when creating parameterized prompts in xmcp.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
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.
Best practices for designing UI widgets in xmcp. Use when creating interactive widgets for GPT Apps or MCP Apps, choosing between React components and template literals, designing widget layouts, handling state and data fetching, or troubleshooting widget rendering issues.
| 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.