create-ultimate-skill
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCreate Ultimate Skill
创建终极Skill
Creation Workflow
创建工作流
When creating a new skill based on user's request: $ARGUMENTS
当根据用户请求创建新Skill时:$ARGUMENTS
Phase 1: Define Use Cases
阶段1:定义使用场景
Ask the user:
- Use cases: "Describe 2-3 specific scenarios where you'd want this skill to activate. What would you say to Claude, and what should it do?"
- Non-use cases: "What should this skill NOT be used for?" (defines negative triggers)
询问用户:
- 使用场景:"描述2-3个你希望激活该Skill的具体场景。你会对Claude说什么,它应该做什么?"
- 非使用场景:"该Skill不应该用于什么场景?"(定义负向触发条件)
Phase 2: Choose Archetype and Scope
阶段2:选择原型与范围
Ask the user:
- Archetype (see Archetypes section below)
- Triggers: What phrases should activate this skill?
- Scope: What's in scope vs out of scope?
询问用户:
- 原型(见下文原型章节)
- 触发词:哪些短语应激活该Skill?
- 范围:哪些属于范围内,哪些属于范围外?
Phase 3: Fetch Latest Documentation
阶段3:获取最新文档
Fetch the latest official skill documentation to verify current fields and constraints:
WebFetch: https://markdown.new/https://code.claude.com/docs/en/skills.md获取最新官方Skill文档以验证当前字段和约束:
WebFetch: https://markdown.new/https://code.claude.com/docs/en/skills.mdPhase 4: Choose Save Location
阶段4:选择保存位置
Use AskUserQuestion:
- Personal (home folder): - available in all projects
~/.claude/skills/<skill-name>/ - Project folder: - project-specific
.claude/skills/<skill-name>/ - Existing plugin: ask which plugin, then
plugins/<plugin-name>/skills/
使用AskUserQuestion:
- 个人目录(主文件夹):- 所有项目均可使用
~/.claude/skills/<skill-name>/ - 项目目录:- 仅特定项目可用
.claude/skills/<skill-name>/ - 现有插件:询问具体插件,然后保存到
plugins/<plugin-name>/skills/
Phase 5: Create the Skill
阶段5:创建Skill
Scaffold with init_skill.py or create manually:
bash
python .claude/skills/create-ultimate-skill/scripts/init_skill.py <skill-name> --path <location>Then write SKILL.md applying all rules below. Review with the checklist before presenting to user.
使用init_skill.py初始化或手动创建:
bash
python .claude/skills/create-ultimate-skill/scripts/init_skill.py <skill-name> --path <location>然后按照以下所有规则编写SKILL.md。在提交给用户前,使用检查清单进行审核。
Phase 6: Summary
阶段6:总结
When complete, provide:
- Skill location and how to trigger it
- What it does
- Suggestions for improvement
- Testing prompts the user can try
完成后,提供以下信息:
- Skill的位置及触发方式
- 它的功能
- 改进建议
- 用户可尝试的测试提示
Frontmatter Hard Rules
Frontmatter硬性规则
- MUST be a single-line plain string. NEVER use YAML multi-line indicators (
description,>-,|,>). Multi-line descriptions break frontmatter parsing.|- - MUST be a single-line comma-separated string (e.g.
allowed-tools). NEVER use YAML list syntax.allowed-tools: Read, Write, Edit
- 必须是单行纯文本字符串。绝不能使用YAML多行标识(
description,>-,|,>)。多行描述会破坏frontmatter解析。|- - 必须是单行逗号分隔的字符串(例如
allowed-tools)。绝不能使用YAML列表语法。allowed-tools: Read, Write, Edit
Required Fields
必填字段
| Field | Constraints |
|---|---|
| Max 64 chars, |
| Max 1024 chars, non-empty, no XML tags |
| 字段 | 约束条件 |
|---|---|
| 最多64个字符,仅允许 |
| 最多1024个字符,非空,无XML标签 |
Optional Fields
可选字段
| Field | Purpose | Example |
|---|---|---|
| Limit tool access | |
| Override model | |
| Isolation | |
| Subagent type | |
| Lifecycle events | |
| Slash menu visibility | |
| Block Skill tool | |
See references/api-reference.md for full field documentation.
| 字段 | 用途 | 示例 |
|---|---|---|
| 限制工具访问权限 | |
| 覆盖默认模型 | |
| 隔离性设置 | |
| 子Agent类型 | |
| 生命周期事件 | |
| Slash菜单可见性 | |
| 阻止Skill工具 | |
完整字段文档请参见references/api-reference.md
Archetypes
原型
| Archetype | Best For | Structure |
|---|---|---|
| CLI Reference | Tool documentation | Commands grouped by function, minimal prose |
| Methodology | Workflows, processes | Philosophy + THE EXACT PROMPT + examples |
| Safety Tool | Validation, security | Threat model + risk tiers + rules |
| Orchestration | Multi-agent coordination | Quick start + APIs + integrations |
See references/archetypes.md for templates.
| 原型 | 适用场景 | 结构 |
|---|---|---|
| CLI参考 | 工具文档 | 按功能分组的命令,尽量少用叙述性文字 |
| 方法论 | 工作流、流程 | 理念 + 精确提示词 + 示例 |
| 安全工具 | 验证、安全 | 威胁模型 + 风险等级 + 规则 |
| 编排工具 | 多Agent协调 | 快速入门 + API + 集成 |
模板请参见references/archetypes.md
Description Rules
描述规则
- Third person always ("Processes files" not "I help you")
- Include WHAT it does AND WHEN to trigger
- Specific trigger phrases users would say
- Add negative triggers ("Do NOT use for...") to prevent over-triggering
- Max 1024 characters
Template:
yaml
description: [What it does]. Use when [triggers]. Do NOT use for [exclusions].Examples:
yaml
description: Extract text and tables from PDF files, fill forms, merge documents. Use when working with PDF files or when user mentions PDFs, forms, or document extraction.
description: Process and transform CSV data files. Use when working with CSV imports, exports, or data cleaning. Do NOT use for Excel files (.xlsx) or database queries.- 始终使用第三人称(例如“处理文件”而非“我帮你处理文件”)
- 需包含功能描述及触发时机
- 列出用户会使用的具体触发短语
- 添加负向触发条件(“请勿用于...”)以避免误触发
- 最多1024个字符
模板:
yaml
description: [功能描述]. Use when [触发时机]. Do NOT use for [排除场景].示例:
yaml
description: Extract text and tables from PDF files, fill forms, merge documents. Use when working with PDF files or when user mentions PDFs, forms, or document extraction.
description: Process and transform CSV data files. Use when working with CSV imports, exports, or data cleaning. Do NOT use for Excel files (.xlsx) or database queries.SKILL.md Body Rules
SKILL.md正文规则
- Imperative voice ("Extract the data", "Run validation")
- Never second person ("You should...")
- Concise - challenge each line: "Does Claude need this?"
- Under 500 lines, under 5,000 words (~2,000 ideal)
- Put critical instructions at the top of the file
- Use scripts for validation where possible - code is deterministic, language interpretation is not
- "Take your time to do this thoroughly" is more effective in user prompts than in SKILL.md
- 使用祈使语气(例如“提取数据”、“运行验证”)
- 绝不能使用第二人称(例如“你应该...”)
- 简洁凝练——对每一行都要自问:“Claude需要这个吗?”
- 不超过500行,不超过5000字(理想为2000字左右)
- 将关键说明放在文件顶部
- 尽可能使用脚本进行验证——代码是确定性的,而语言解释具有不确定性
- 在用户提示中使用“请仔细完成此任务”比在SKILL.md中更有效
Structure Rules
结构规则
skill-name/
├── SKILL.md # Core guidance only
├── references/ # Detailed docs (on-demand)
├── examples/ # Working code samples
└── scripts/ # Executable utilities- References ONE level deep only - no chains
- Long files (>100 lines): include TOC
- Never include README.md in skill folder (SKILL.md IS the readme)
- Forward slashes only (no Windows paths)
skill-name/
├── SKILL.md # Core guidance only
├── references/ # Detailed docs (on-demand)
├── examples/ # Working code samples
└── scripts/ # Executable utilities- 参考文档仅允许一级深度——不能有嵌套链
- 长文件(>100行):需包含目录
- Skill文件夹中绝不能包含README.md(SKILL.md即为说明文档)
- 仅使用正斜杠(不使用Windows路径)
Anti-Patterns
反模式
| Anti-Pattern | Fix |
|---|---|
| Vague descriptions | Specific triggers + negative triggers |
| Deeply nested references | One level deep |
| README.md in skill folder | Delete it - SKILL.md IS the readme |
| ` in description |
| YAML list for allowed-tools | Comma-separated string |
| 反模式 | 修复方案 |
|---|---|
| 模糊的描述 | 添加具体触发词和负向触发条件 |
| 深度嵌套的参考文档 | 限制为一级深度 |
| Skill文件夹中包含README.md | 删除它——SKILL.md即为说明文档 |
描述中使用 | ` |
| allowed-tools使用YAML列表格式 | 改为逗号分隔的字符串 |
Testing
测试
Define success criteria before building:
- Quantitative: Trigger rate >90% of relevant queries, correct tool sequence, task completes without user intervention
- Qualitative: Output matches expected format, no hallucinated commands, consistent across sessions
Debug technique: Ask Claude "When would you use the [skill name] skill?" - the response reveals how Claude interprets the description.
Test three areas:
- Triggering: Direct trigger phrases, paraphrased requests, and edge cases that should NOT trigger
- Functional: Run each use case end-to-end, check output format and accuracy
- Performance: Compare skill-assisted vs manual - does the skill save time and improve quality?
Pro tip: Iterate on a single challenging task until Claude succeeds, then extract the winning approach into the skill. This grounds design in proven patterns rather than theory.
在构建前定义成功标准:
- 量化标准:相关查询的触发率>90%,工具序列正确,无需用户干预即可完成任务
- 定性标准:输出符合预期格式,无幻觉命令,跨会话保持一致
**调试技巧:**询问Claude "你会在什么时候使用[Skill名称]?"——回复会揭示Claude对描述的理解方式。
测试三个方面:
- 触发测试:直接触发短语、改写后的请求、以及不应触发的边缘情况
- 功能测试:端到端运行每个使用场景,检查输出格式和准确性
- 性能测试:对比使用Skill和手动操作——Skill是否节省时间并提升质量?
**专业提示:**反复迭代单个具有挑战性的任务,直到Claude成功完成,然后将成功方法提炼到Skill中。这会让设计基于已验证的模式而非理论。
Iteration Signals
迭代信号
| Signal | Fix |
|---|---|
| Skill never activates | Add more trigger phrases to description |
| Wrong skill activates | Add "Do NOT use for..." negative triggers |
| Output is wrong | Refine SKILL.md instructions, add examples |
| Output is inconsistent | Reduce degrees of freedom, be more prescriptive |
| 信号 | 修复方案 |
|---|---|
| Skill从未激活 | 在描述中添加更多触发短语 |
| 错误的Skill被激活 | 添加“请勿用于...”负向触发条件 |
| 输出错误 | 优化SKILL.md说明,添加示例 |
| 输出不一致 | 减少自由度,更具指令性 |
Utility Scripts
实用脚本
init_skill.py
init_skill.py
bash
python .claude/skills/create-ultimate-skill/scripts/init_skill.py <skill-name> --path <location>Creates SKILL.md with template, plus scripts/, references/, assets/ directories.
bash
python .claude/skills/create-ultimate-skill/scripts/init_skill.py <skill-name> --path <location>创建带模板的SKILL.md,以及scripts/、references/、assets/目录。
package_skill.py
package_skill.py
bash
python .claude/skills/create-ultimate-skill/scripts/package_skill.py <path/to/skill> [output-dir]Validates and creates distributable zip. Checks frontmatter, naming, ensures no TODOs remain.
bash
python .claude/skills/create-ultimate-skill/scripts/package_skill.py <path/to/skill> [output-dir]验证并创建可分发的zip包。检查frontmatter、命名规则,确保没有遗留的TODO项。
Skill Review Mode
Skill审核模式
When reviewing an existing skill (triggered by or "review my skill"):
--review- Read SKILL.md frontmatter, body, and supporting directories
- Categorise issues by severity:
- Critical: Won't trigger or wrong output (missing description, vague triggers, broken refs)
- Major: Significantly reduces effectiveness (>5,000 words, no progressive disclosure)
- Minor: Polish (inconsistent terminology, missing TOC, no negative triggers)
- Generate structured review report:
markdown
undefined当审核现有Skill时(由或“审核我的Skill”触发):
--review- 阅读SKILL.md的frontmatter、正文及支持目录
- 按严重程度分类问题:
- 严重:无法触发或输出错误(缺少描述、模糊的触发词、损坏的参考)
- 主要:显著降低有效性(>5000字、无渐进式披露)
- 次要:优化问题(术语不一致、缺少目录、无负向触发条件)
- 生成结构化审核报告:
markdown
undefinedSkill Review: [skill-name]
Skill Review: [skill-name]
Summary
Summary
[Assessment, word counts, structure]
[Assessment, word counts, structure]
Description Analysis
Description Analysis
Current: [description]
Issues: [with severity]
Suggested: "[improved version]"
Current: [description]
Issues: [with severity]
Suggested: "[improved version]"
Issues by Severity
Issues by Severity
Critical ([count])
Critical ([count])
- [File]: [Issue] - [Fix]
- [File]: [Issue] - [Fix]
Major ([count])
Major ([count])
- [File]: [Issue] - [Fix]
- [File]: [Issue] - [Fix]
Minor ([count])
Minor ([count])
- [File]: [Issue] - [Suggestion]
- [File]: [Issue] - [Suggestion]
Rating: [Pass / Needs Improvement / Needs Major Revision]
Rating: [Pass / Needs Improvement / Needs Major Revision]
Priority Fixes
Priority Fixes
- [Highest impact]
- [Second]
- [Third]
undefined- [Highest impact]
- [Second]
- [Third]
undefinedReview Checklist
审核检查清单
- Use cases: 2-3 concrete scenarios defined
- name: lowercase, hyphens, ≤64 chars
- description: single-line plain string, third person, specific triggers, ≤1024 chars
- description: negative triggers if needed
- SKILL.md body: <500 lines, <5,000 words
- No README.md in skill folder
- References: one level deep
- Forward slashes only
- Examples concrete, not abstract
- 使用场景:已定义2-3个具体场景
- name:小写、连字符、≤64字符
- description:单行纯文本字符串、第三人称、具体触发词、≤1024字符
- description:按需添加负向触发条件
- SKILL.md正文:<500行、<5000字
- Skill文件夹中无README.md
- 参考文档:仅一级深度
- 仅使用正斜杠
- 示例具体,而非抽象
Latest Documentation
最新文档
Before finalising any skill's frontmatter, fetch the latest official documentation to check for new fields, changed constraints, or updated rules:
WebFetch: https://markdown.new/https://code.claude.com/docs/en/skills.md在最终确定任何Skill的frontmatter之前,获取最新官方文档以检查是否有新字段、已更改的约束或更新的规则:
WebFetch: https://markdown.new/https://code.claude.com/docs/en/skills.mdFurther Reading
扩展阅读
- Skill Archetypes
- Official API Reference
- Skill原型
- 官方API参考