Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
majiayu000 avatar

Prompt Design

  • 1 installs
  • 534 repo stars
  • Updated August 4, 2026
  • majiayu000/claude-skill-registry

Designs, optimizes, and quality-checks prompts following Anthropic guidelines, using XML-tag structure templates and a quality checklist.

About

A prompt engineering assistant based on the Anthropic Prompt Library that creates, optimizes, and reviews prompts using standardized XML-tag structures. A developer uses it to build new prompts, improve existing ones, or check prompt quality.

  • XML-tag conventions for role, task, thinking, instructions, and constraints
  • Separates format-selection logic from generic output-format rules

Prompt Design by the numbers

  • 1 all-time installs (skills.sh)
  • Ranked #14,102 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/majiayu000/claude-skill-registry --skill prompt-design

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1
repo stars534
Last updatedAugust 4, 2026
Repositorymajiayu000/claude-skill-registry

What it does

Designs, optimizes, and quality-checks prompts following Anthropic guidelines, using XML-tag structure templates and a quality checklist.

Files

SKILL.mdMarkdownGitHub ↗

Prompt Design Skill

基于 Anthropic Prompt Library 官方准则的提示词设计助手。

核心工作流

创建新提示词

1. 确定类型 - 识别任务场景(编程/文档/创意/教育/学术) 2. 选择模板 - 参考 templates.md 选择对应模板 3. 填充内容 - 按模板结构填写各标签内容 4. 质量检查 - 使用 quality-checklist.md 验证 5. 输出提示词 - 交付完整的 System Prompt + User Prompt

优化现有提示词

1. 诊断问题 - 识别输出质量问题(幻觉/格式混乱/逻辑不清) 2. 对照准则 - 检查是否符合下方 XML 标签规范 3. 应用模板 - 重构为标准结构 4. 增强机制 - 添加 CoT/引用验证/XML 标签等

XML 标签规范

Claude 在训练中使用了 XML 标签,推荐使用以下结构:

核心结构标签

标签用途关键要求
<role>角色定义明确身份、专业背景
<task>任务声明使用 "Your task is to..."
<thinking>内部推理必须标注"不直接输出给用户"
<instructions>操作指令包含步骤 + 格式选择逻辑
<output_format>输出格式仅通用规范,禁止多模板并列
<constraints>约束条件使用肯定式指令

标签职责分离原则

核心规则: 多场景提示词中,格式选择逻辑放 <instructions><output_format> 只写通用规范。

❌ 错误:output_format 并列多种格式
<output_format>
【分析类】**分析过程:** [...]
---
【事实类】**回答:** [...]
</output_format>

✅ 正确:格式选择在 instructions
<instructions>
X. **格式选择**:根据问题类型:
   - 分析类:使用 "**分析过程**" + "**结论**"
   - 事实类:使用 "**回答**" + "**来源**"
</instructions>
<output_format>
使用 Markdown 格式,对比数据用表格
</output_format>

内容包装标签

标签用途
<document>包裹参考文档
<code>包裹代码片段
<example>Few-Shot 示例
<context>背景信息

高级推理标签

标签用途
<scratchpad>中间计算/推理步骤
<reasoning>结构化逻辑推导
<verification>结果自检

设计准则

1. 肯定式优于否定式

❌ "Don't make up information"
✅ "Only use information from the provided document. If uncertain, say 'I don't know'"

2. 思维链引导

复杂任务添加逐步思考:

Think step by step before providing your final answer.
First, analyze the problem. Then, consider possible approaches. Finally, provide your solution.

3. System vs Human Prompt 分工

类型内容
System角色定义、全局约束、工具定义
Human具体任务、输入数据、特定要求

场景特定要点

场景关键要素
编程类<code> 标签 + 注释要求 + 错误处理
文档类<document> 标签 + 格式化输出
学术类ReAct 验证 + CoT + LaTeX 公式
引用类仅使用提供文档 + 引用来源 + 置信度

详细参考

  • 完整模板: references/templates.md
  • 质量检查清单: references/quality-checklist.md

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.