skill-creator-pro
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkill Creator Pro
Skill Creator Pro
Create production-grade skills that extend Claude's capabilities.
创建可扩展Claude能力的生产级Skill。
How This Skill Works
本Skill的工作原理
User: "Create a skill for X"
↓
Claude Code uses this meta-skill as guidance
↓
Follow Domain Discovery → Ask user clarifying questions → Create skill
↓
Generated skill with embedded domain expertiseThis skill provides guidance and structure for creating skills. Claude Code:
- Uses this skill's framework to discover domain knowledge
- Asks user for clarifications about THEIR specific requirements
- Decides how to structure the generated skill based on domain needs
User: "Create a skill for X"
↓
Claude Code uses this meta-skill as guidance
↓
遵循领域探索→向用户询问澄清问题→创建Skill
↓
生成嵌入领域专业知识的Skill本Skill为Skill创建提供指导与结构框架。Claude Code:
- 利用本Skill的框架探索领域知识
- 向用户询问其特定需求的澄清问题
- 根据领域需求决定生成Skill的结构
What This Skill Does
本Skill的功能
- Guides creation of new skills from scratch
- Helps improve existing skills to production quality
- Provides patterns for 5 skill types (Builder, Guide, Automation, Analyzer, Validator)
- Ensures skills encode procedural knowledge + domain expertise
- 指导从零开始创建新Skill
- 帮助将现有Skill优化至生产级质量
- 提供5种Skill类型的模式(Builder、Guide、Automation、Analyzer、Validator)
- 确保Skill整合过程性知识与领域专业知识
What This Skill Does NOT Do
本Skill不具备的功能
- Test skills in production environments
- Deploy or distribute skills
- Handle skill versioning/updates after creation
- Create requirement-specific skills (always create reusable intelligence)
- 在生产环境中测试Skill
- 部署或分发Skill
- 处理Skill创建后的版本控制/更新
- 创建特定需求专属Skill(始终创建可复用智能)
Domain Discovery Framework
领域探索框架
Key Principle: Users want domain expertise IN the skill. They may not BE domain experts.
核心原则:用户希望Skill中内置领域专业知识,而他们自己可能并非领域专家。
Phase 1: Automatic Discovery (No User Input)
阶段1:自动探索(无需用户输入)
Proactively research the domain before asking anything:
| Discover | How | Example: "Kafka integration" |
|---|---|---|
| Core concepts | Official docs, Context7 | Producers, consumers, topics, partitions |
| Standards/compliance | Search "[domain] standards" | Kafka security, exactly-once semantics |
| Best practices | Search "[domain] best practices 2025" | Partitioning strategies, consumer groups |
| Anti-patterns | Search "[domain] common mistakes" | Too many partitions, no monitoring |
| Security | Search "[domain] security" | SASL, SSL, ACLs, encryption |
| Ecosystem | Search "[domain] ecosystem tools" | Confluent, Schema Registry, Connect |
Sources priority: Official docs → Library docs (Context7) → GitHub → Community → WebSearch
在询问用户任何问题前,主动研究领域信息:
| 探索内容 | 探索方式 | 示例:"Kafka integration" |
|---|---|---|
| 核心概念 | 官方文档、Context7 | Producers, consumers, topics, partitions |
| 标准/合规性 | 搜索"[领域] standards" | Kafka security, exactly-once semantics |
| 最佳实践 | 搜索"[领域] best practices 2025" | Partitioning strategies, consumer groups |
| 反模式 | 搜索"[领域] common mistakes" | Too many partitions, no monitoring |
| 安全相关 | 搜索"[领域] security" | SASL, SSL, ACLs, encryption |
| 生态系统 | 搜索"[领域] ecosystem tools" | Confluent, Schema Registry, Connect |
来源优先级:官方文档 → 库文档(Context7)→ GitHub → 社区 → 网络搜索
Phase 2: Knowledge Sufficiency Check
阶段2:知识充足性检查
Before asking user anything, verify internally:
- [ ] Core concepts understood?
- [ ] Best practices identified?
- [ ] Anti-patterns known?
- [ ] Security considerations covered?
- [ ] Official sources found?
If ANY gap → Research more (don't ask user for domain knowledge)
Only if CANNOT discover (proprietary/internal) → Ask user在询问用户任何问题前,先内部验证:
- [ ] 核心概念已理解?
- [ ] 已识别最佳实践?
- [ ] 已知晓反模式?
- [ ] 已覆盖安全考量?
- [ ] 已找到官方来源?
若存在任何缺口→进一步研究(不要向用户询问领域知识)
仅当无法探索到(专有/内部信息)→再询问用户Phase 3: User Requirements (NOT Domain Knowledge)
阶段3:用户需求(非领域知识)
Only ask about user's SPECIFIC context:
| Ask | Don't Ask |
|---|---|
| "What's YOUR use case?" | "What is Kafka?" |
| "What's YOUR tech stack?" | "What options exist?" |
| "Any existing resources?" | "How does it work?" |
| "Specific constraints?" | "What are best practices?" |
The skill contains domain expertise. User provides requirements.
仅询问用户的特定上下文信息:
| 可询问 | 不可询问 |
|---|---|
| "你的具体使用场景是什么?" | "What is Kafka?" |
| "你的技术栈是什么?" | "What options exist?" |
| "是否有现有资源可以参考?" | "How does it work?" |
| "是否有特定约束条件?" | "What are best practices?" |
Skill中已包含领域专业知识,用户只需提供需求信息。
Required Clarifications
必要的澄清问题
Ask about SKILL METADATA and USER REQUIREMENTS (not domain knowledge):
询问关于Skill元数据和用户需求的问题(而非领域知识):
Skill Metadata
Skill元数据
1. Skill Type - "What type of skill?"
| Type | Purpose | Example |
|---|---|---|
| Builder | Create artifacts | Widgets, code, documents |
| Guide | Provide instructions | How-to, tutorials |
| Automation | Execute workflows | File processing, deployments |
| Analyzer | Extract insights | Code review, data analysis |
| Validator | Enforce quality | Compliance checks, scoring |
2. Domain - "What domain or technology?"
1. Skill类型 - "需要创建哪种类型的Skill?"
| 类型 | 用途 | 示例 |
|---|---|---|
| Builder | 创建制品 | 组件、代码、文档 |
| Guide | 提供指导说明 | 操作指南、教程 |
| Automation | 执行工作流 | 文件处理、部署流程 |
| Analyzer | 提取洞察信息 | 代码审查、数据分析 |
| Validator | 执行质量校验 | 合规检查、评分 |
2. 领域 - "针对哪个领域或技术?"
User Requirements (After Domain Discovery)
用户需求(领域探索完成后)
3. Use Case - "What's YOUR specific use case?"
- Not "what can it do" but "what do YOU need"
4. Tech Stack - "What's YOUR environment?"
- Languages, frameworks, existing infrastructure
5. Existing Resources - "Any scripts, templates, configs to include?"
6. Constraints - "Any specific requirements or limitations?"
- Performance, security, compliance specific to user's context
3. 使用场景 - "你的具体使用场景是什么?"
- 不是询问“它能做什么”,而是“你需要它做什么”
4. 技术栈 - "你的运行环境是什么?"
- 编程语言、框架、现有基础设施
5. 现有资源 - "是否有需要纳入的脚本、模板、配置文件?"
6. 约束条件 - "是否有特定需求或限制?"
- 与用户上下文相关的性能、安全、合规要求
Note
注意事项
- Questions 1-2: Ask immediately
- Domain Discovery: Research automatically after knowing domain
- Questions 3-6: Ask after discovery, informed by domain knowledge
- Question pacing: Avoid asking too many questions in a single message. Start with most important, follow up as needed.
- 问题1-2:立即询问
- 领域探索:确定领域后自动开展研究
- 问题3-6:探索完成后,结合领域知识进行询问
- 问题节奏:避免在单条消息中询问过多问题。从最重要的问题开始,按需跟进后续问题。
Core Principles
核心原则
Reusable Intelligence, Not Requirement-Specific
可复用智能,而非特定需求专属
Skills must handle VARIATIONS, not single requirements:
❌ Bad: "Create bar chart with sales data using Recharts"
✅ Good: "Create visualizations - adaptable to data shape, chart type, library"
❌ Bad: "Deploy to AWS EKS with Helm"
✅ Good: "Deploy applications - adaptable to platform, orchestration, environment"Identify what VARIES vs what's CONSTANT in the domain. See .
references/reusability-patterns.mdSkill必须能处理多种变化场景,而非仅满足单一需求:
❌ 不佳示例:"Create bar chart with sales data using Recharts"
✅ 优质示例:"Create visualizations - adaptable to data shape, chart type, library"
❌ 不佳示例:"Deploy to AWS EKS with Helm"
✅ 优质示例:"Deploy applications - adaptable to platform, orchestration, environment"识别领域中可变因素与恒定因素。详见。
references/reusability-patterns.mdConcise is Key
简洁为要
Context window is a public good (~1,500+ tokens per skill activation). Challenge each piece:
- "Does Claude really need this explanation?"
- "Does this paragraph justify its token cost?"
Prefer concise examples over verbose explanations.
上下文窗口是公共资源(每次Skill激活约1500+ tokens)。对每一部分内容都要审慎考量:
- “Claude真的需要这段解释吗?”
- “这段内容的token消耗是否合理?”
优先使用简洁示例,而非冗长说明。
Appropriate Freedom
适度灵活性
Match specificity to task fragility:
| Freedom Level | When to Use | Example |
|---|---|---|
| High | Multiple approaches valid | "Choose your preferred style" |
| Medium | Preferred pattern exists | Pseudocode with parameters |
| Low | Operations are fragile | Exact scripts, few parameters |
根据任务的脆弱性匹配具体程度:
| 灵活度等级 | 适用场景 | 示例 |
|---|---|---|
| 高 | 存在多种有效实现方式 | "Choose your preferred style" |
| 中 | 存在首选模式 | 带参数的伪代码 |
| 低 | 操作容错性低 | 精确脚本,参数极少 |
Progressive Disclosure
渐进式披露
Three-level loading system:
- Metadata (~100 tokens) - Always in context (description ≤1024 chars)
- SKILL.md body (<500 lines) - When skill triggers
- References (unlimited) - Loaded as needed by Claude
三级加载体系:
- 元数据(约100 tokens)- 始终处于上下文中(描述≤1024字符)
- SKILL.md 主体(<500行)- Skill触发时加载
- 参考资料(无限制)- Claude按需加载
Anatomy of a Skill
Skill的结构组成
Generated skills are zero-shot domain experts with embedded knowledge.
skill-name/
├── SKILL.md (required)
│ ├── YAML frontmatter (name, description, allowed-tools?, model?)
│ └── Procedural knowledge (workflows, steps, decision trees)
└── Bundled Resources
├── references/ - Domain expertise (structure based on domain needs)
├── scripts/ - Executable code (tested, reliable)
└── assets/ - Templates, boilerplate, images生成的Skill是内置领域知识的零样本领域专家。
skill-name/
├── SKILL.md (required)
│ ├── YAML frontmatter (name, description, allowed-tools?, model?)
│ └── 过程性知识(工作流、步骤、决策树)
└── 捆绑资源
├── references/ - 领域专业知识(根据领域需求组织结构)
├── scripts/ - 可执行代码(已测试、可靠)
└── assets/ - 模板、样板代码、图片SKILL.md Requirements
SKILL.md 要求
| Component | Requirement |
|---|---|
| Line count | <500 lines (extract to references/) |
| Frontmatter | See |
| Lowercase, numbers, hyphens; ≤64 chars; match directory |
| [What] + [When]; ≤1024 chars; third-person style |
| Description style | "This skill should be used when..." (not "Use when...") |
| Form | Imperative ("Do X" not "You should X") |
| Scope | What it does AND does not do |
| 组件 | 要求 |
|---|---|
| 行数 | <500行(超出部分提取至references/) |
| 前置元数据 | 完整规范请参考 |
| 小写、数字、连字符;≤64字符;与目录名一致 |
| [功能] + [触发场景];≤1024字符;第三人称表述 |
| 描述风格 | "This skill should be used when..."(而非"Use when...") |
| 表述形式 | 祈使句("执行X操作"而非"你应该执行X操作") |
| 范围 | 明确说明功能与非功能 |
What Goes in references/
references/ 目录内容
Embed domain knowledge gathered during discovery:
| Gathered Knowledge | Purpose in Skill |
|---|---|
| Library/API documentation | Enable correct implementation |
| Best practices | Guide quality decisions |
| Code examples | Provide reference patterns |
| Anti-patterns | Prevent common mistakes |
| Domain-specific details | Support edge cases |
Structure references/ based on what the domain needs.
Large files: If references >10k words, include grep search patterns in SKILL.md for efficient discovery.
将探索阶段收集的领域知识嵌入其中:
| 收集的知识类型 | 在Skill中的作用 |
|---|---|
| 库/API文档 | 确保实现的正确性 |
| 最佳实践 | 指导质量决策 |
| 代码示例 | 提供参考模式 |
| 反模式 | 避免常见错误 |
| 领域专属细节 | 支持边缘场景处理 |
根据领域需求组织references/的结构。
大文件处理:若参考资料超过10000词,在SKILL.md中包含grep搜索模式以提升检索效率。
When to Generate scripts/
何时生成scripts/目录
Generate scripts when domain requires deterministic, executable procedures:
| Domain Need | Example Scripts |
|---|---|
| Setup/installation | Install dependencies, initialize project |
| Processing | Transform data, process files |
| Validation | Check compliance, verify output |
| Deployment | Deploy services, configure infrastructure |
Decision: If procedure is complex, error-prone, or needs to be exactly repeatable → create script. Otherwise → document in SKILL.md or references/.
当领域需要确定性、可执行的流程时,生成脚本:
| 领域需求 | 示例脚本 |
|---|---|
| 搭建/安装 | 安装依赖、初始化项目 |
| 处理流程 | 数据转换、文件处理 |
| 校验 | 合规检查、输出验证 |
| 部署 | 服务部署、基础设施配置 |
决策依据:若流程复杂、易出错或需要完全可重复执行→创建脚本。否则→在SKILL.md或references/中记录。
When to Generate assets/
何时生成assets/目录
Generate assets when domain requires exact templates or boilerplate:
| Domain Need | Example Assets |
|---|---|
| Starting templates | HTML boilerplate, component scaffolds |
| Configuration files | Config templates, schema definitions |
| Code boilerplate | Base classes, starter code |
当领域需要精确模板或样板代码时,生成资源文件:
| 领域需求 | 示例资源 |
|---|---|
| 初始模板 | HTML样板、组件脚手架 |
| 配置文件 | 配置模板、schema定义 |
| 代码样板 | 基类、起始代码 |
What NOT to Include
不应包含的内容
- README.md (SKILL.md IS the readme)
- CHANGELOG.md
- LICENSE (inherited from repo)
- Duplicate information
- README.md(SKILL.md 即作为说明文档)
- CHANGELOG.md
- LICENSE(继承自仓库许可证)
- 重复信息
What Generated Skill Does at Runtime
生成的Skill在运行时的工作流程
User invokes skill → Gather context from:
1. Codebase (if existing project)
2. Conversation (user's requirements)
3. Own references/ (embedded domain expertise)
4. User-specific guidelines
→ Ensure all information gathered → Implement ZERO-SHOT用户调用Skill → 从以下来源收集上下文:
1. 代码库(若为现有项目)
2. 对话内容(用户需求)
3. 自身references/(内置领域专业知识)
4. 用户特定指南
→ 确保收集到所有信息→实现零样本执行Include in Generated Skills
生成Skill中必须包含的内容
Every generated skill should include:
markdown
undefined每个生成的Skill都应包含以下内容:
markdown
undefinedBefore Implementation
实现前准备
Gather context to ensure successful implementation:
| Source | Gather |
|---|---|
| Codebase | Existing structure, patterns, conventions to integrate with |
| Conversation | User's specific requirements, constraints, preferences |
| Skill References | Domain patterns from |
| User Guidelines | Project-specific conventions, team standards |
Ensure all required context is gathered before implementing.
Only ask user for THEIR specific requirements (domain expertise is in this skill).
---收集上下文信息以确保成功实现:
| 来源 | 收集内容 |
|---|---|
| 代码库 | 现有结构、模式、约定,确保Skill可与之集成 |
| 对话内容 | 用户的特定需求、约束条件、偏好 |
| Skill参考资料 | 来自 |
| 用户指南 | 项目特定约定、团队标准 |
确保在实现前收集到所有必要的上下文信息。
仅向用户询问其特定需求(领域专业知识已内置在本Skill中)。
---Type-Aware Creation
基于类型的创建流程
After determining skill type, follow type-specific patterns:
| Type | Key Sections | Reference |
|---|---|---|
| Builder | Clarifications → Output Spec → Standards → Checklist | |
| Guide | Workflow → Examples → Official Docs | |
| Automation | Scripts → Dependencies → Error Handling | |
| Analyzer | Scope → Criteria → Output Format | |
| Validator | Criteria → Scoring → Thresholds → Remediation | |
确定Skill类型后,遵循对应类型的模式:
| 类型 | 核心章节 | 参考文档 |
|---|---|---|
| Builder | 澄清问题→输出规范→标准→检查清单 | |
| Guide | 工作流→示例→官方文档 | |
| Automation | 脚本→依赖→错误处理 | |
| Analyzer | 范围→标准→输出格式 | |
| Validator | 标准→评分→阈值→修复建议 | |
Skill Creation Process
Skill创建流程
Metadata → Discovery → Requirements → Analyze → Embed → Structure → Implement → ValidateSee for detailed steps.
references/creation-workflow.md元数据→探索→需求→分析→嵌入→结构→实现→验证详细步骤请参考。
references/creation-workflow.mdQuick Steps
快速步骤
- Metadata: Ask skill type + domain (Questions 1-2)
- Discovery: Research domain automatically (Phase 1-2 above)
- Requirements: Ask user's specific needs (Questions 3-6)
- Analyze: Identify procedural (HOW) + domain (WHAT) knowledge
- Embed: Put gathered domain expertise into
references/ - Structure: Initialize skill directory
- Implement: Write SKILL.md + resources following type patterns
- Validate: Run and test
scripts/package_skill.py
- 元数据:询问Skill类型与领域(问题1-2)
- 探索:自动开展领域研究(上述阶段1-2)
- 需求:询问用户的特定需求(问题3-6)
- 分析:识别过程性(如何做)与领域性(做什么)知识
- 嵌入:将收集到的领域专业知识存入
references/ - 结构:初始化Skill目录
- 实现:遵循类型模式编写SKILL.md及相关资源
- 验证:运行并进行测试
scripts/package_skill.py
SKILL.md Template
SKILL.md 模板
yaml
---
name: skill-name # lowercase, hyphens, ≤64 chars
description: | # ≤1024 chars
[What] Capability statement.
[When] Use when users ask to <triggers>.
allowed-tools: Read, Grep, Glob # optional: restrict tools
---See for complete frontmatter spec and body patterns.
references/skill-patterns.mdyaml
---
name: skill-name # 小写、连字符、≤64字符
description: | # ≤1024字符
[功能] 能力说明。
[触发场景] 当用户请求<triggers>时使用。
allowed-tools: Read, Grep, Glob # 可选:限制可使用的工具
---完整的前置元数据规范与主体模式请参考。
references/skill-patterns.mdOutput Checklist
输出检查清单
Before delivering a skill, verify:
交付Skill前,需验证以下内容:
Domain Discovery Complete
领域探索完成
- Core concepts discovered and understood
- Best practices identified from authentic sources
- Anti-patterns documented
- Security considerations covered
- Official documentation linked
- User was NOT asked for domain knowledge
- 已探索并理解核心概念
- 已从可信来源识别最佳实践
- 已记录反模式
- 已覆盖安全考量
- 已链接官方文档
- 未向用户询问领域知识
Frontmatter
前置元数据
- : lowercase, hyphens, ≤64 chars, matches directory
name - : [What]+[When], ≤1024 chars, clear triggers
description - : Set if restricted access needed
allowed-tools
- :小写、连字符、≤64字符,与目录名一致
name - :包含[功能]+[触发场景],≤1024字符,触发场景明确
description - :若需限制访问则进行设置
allowed-tools
Structure
结构
- SKILL.md <500 lines
- Progressive disclosure (details in references/)
- SKILL.md 行数<500
- 采用渐进式披露(细节内容存入references/)
Knowledge Coverage
知识覆盖
- Procedural (HOW): Workflows, decision trees, error handling
- Domain (WHAT): Concepts, best practices, anti-patterns
- 过程性(如何做):工作流、决策树、错误处理
- 领域性(做什么):概念、最佳实践、反模式
Zero-Shot Implementation (in generated skill)
零样本实现(在生成的Skill中)
- Includes "Before Implementation" section
- Gathers runtime context (codebase, conversation, user guidelines)
- Domain expertise embedded in (structured per domain needs)
references/ - Only asks user for THEIR requirements (not domain knowledge)
- 包含“实现前准备”章节
- 会收集运行时上下文(代码库、对话内容、用户指南)
- 领域专业知识已嵌入(根据领域需求组织结构)
references/ - 仅向用户询问其特定需求(而非领域知识)
Reusability
可复用性
- Handles variations (not requirement-specific)
- Clarifications capture variable elements (user's context)
- Constants encoded (domain patterns, best practices)
- 可处理多种变化场景(非特定需求专属)
- 澄清问题可捕获可变要素(用户上下文)
- 恒定要素已编码(领域模式、最佳实践)
Type-Specific (see references/skill-patterns.md
)
references/skill-patterns.md类型特定要求(参考references/skill-patterns.md
)
references/skill-patterns.md- Builder: Clarifications, output spec, standards, checklist
- Guide: Workflow, examples, official docs
- Automation: Scripts, dependencies, error handling
- Analyzer: Scope, criteria, output format
- Validator: Criteria, scoring, thresholds, remediation
- Builder:包含澄清问题、输出规范、标准、检查清单
- Guide:包含工作流、示例、官方文档
- Automation:包含脚本、依赖、错误处理
- Analyzer:包含范围、标准、输出格式
- Validator:包含标准、评分、阈值、修复建议
Reference Files
参考文件
| File | When to Read |
|---|---|
| Detailed step-by-step creation process |
| Frontmatter spec, type-specific patterns, assets guidance |
| Procedural+domain knowledge, varies vs constant |
| Clarifications, enforcement, checklists |
| Error handling, security, dependencies |
| Sequential and conditional workflow patterns |
| Template and example patterns |
| 文件 | 阅读时机 |
|---|---|
| 查看详细的分步创建流程时 |
| 查看前置元数据规范、类型特定模式、资源指导时 |
| 了解过程性+领域性知识、可变与恒定要素时 |
| 查看澄清问题、执行规范、检查清单时 |
| 了解错误处理、安全、依赖相关内容时 |
| 查看顺序与条件工作流模式时 |
| 查看模板与示例模式时 |