skill-creator
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkill Creator
Skill Creator
帮助创建符合 Testany 规范的 Claude Code Skills。
Help create Claude Code Skills that comply with Testany's specifications.
Testany Skill 规范(强制)
Testany Skill Specifications (Mandatory)
命名与结构约定
Naming and Structure Conventions
| 约定项 | 规范 |
|---|---|
| 命名语言 | 英文,kebab-case(如 |
| 目录结构 | 扁平结构 |
| 必须文件 | 只需 SKILL.md |
| references 命名 | 英文 |
| Item | Specification |
|---|---|
| Naming Language | English, kebab-case (e.g., |
| Directory Structure | Flat structure |
| Required Files | Only SKILL.md |
| references Naming | English |
审核标准
Review Standards
| 审核项 | 要求 |
|---|---|
| Frontmatter | 必须包含触发词 |
| 行数限制 | SKILL.md < 500 行 |
| 边界检查 | 必须通过 |
| 语言 | 必须中文(技术术语可保留英文) |
| 示例 | 必须有使用示例 |
| Review Item | Requirement |
|---|---|
| Frontmatter | Must include trigger phrases |
| Line Limit | SKILL.md < 500 lines |
| Boundary Check | Must pass |
| Language | Must be Chinese (technical terms can remain in English) |
| Examples | Must include usage examples |
目录结构
Directory Structure
skill-name/
├── SKILL.md (必需)
└── references/ (可选,按需加载的参考文档)不要创建 README.md、CHANGELOG.md 等额外文件。
skill-name/
├── SKILL.md (Required)
└── references/ (Optional, reference documents loaded on demand)Do not create extra files like README.md, CHANGELOG.md, etc.
核心原则
Core Principles
简洁优先
Simplicity First
Context window 是公共资源。只添加 Claude 不知道的信息。
默认假设:Claude 已经很聪明。 用简洁示例代替冗长解释。
Context window is a shared resource. Only add information that Claude doesn't know.
Default Assumption: Claude is already smart. Use concise examples instead of lengthy explanations.
渐进式加载
Progressive Loading
- Metadata(name + description)- 始终在 context 中
- SKILL.md body - 触发后加载
- references/ - 按需加载
- Metadata (name + description) - Always in context
- SKILL.md body - Loaded after triggering
- references/ - Loaded on demand
Skill 创建流程
Skill Creation Process
步骤 1:理解需求
Step 1: Understand Requirements
通过具体示例理解 skill 的使用场景:
- 这个 skill 要支持什么功能?
- 用户会怎么使用它?
- 什么话会触发这个 skill?
Understand the skill's usage scenarios through specific examples:
- What functions should this skill support?
- How will users use it?
- What phrases will trigger this skill?
步骤 2:规划内容
Step 2: Plan Content
分析每个示例,确定需要的资源:
| 资源类型 | 用途 | 示例 |
|---|---|---|
| references/ | 参考文档,按需加载 | 模板、规范、API 文档 |
| scripts/ | 可执行脚本 | 验证、初始化工具 |
| assets/ | 输出资源 | 图片、模板文件 |
Analyze each example to identify required resources:
| Resource Type | Purpose | Example |
|---|---|---|
| references/ | Reference documents, loaded on demand | Templates, specifications, API documents |
| scripts/ | Executable scripts | Validation, initialization tools |
| assets/ | Output resources | Images, template files |
步骤 3:初始化 Skill
Step 3: Initialize Skill
bash
scripts/init_skill.py <skill-name>脚本默认输出到 目录,会创建:
skills/- SKILL.md 模板
- 示例目录结构(scripts/、references/、assets/)
bash
scripts/init_skill.py <skill-name>The script outputs to the directory by default and creates:
skills/- SKILL.md template
- Example directory structure (scripts/, references/, assets/)
步骤 4:编写 SKILL.md
Step 4: Write SKILL.md
Frontmatter(必需)
Frontmatter (Required)
yaml
---
name: skill-name
description: 触发词1、触发词2。功能描述,说明什么时候使用这个 skill。
---重要:description 必须包含触发词,这是 skill 被激活的关键。
yaml
---
name: skill-name
description: Trigger phrase 1, Trigger phrase 2. Function description, explain when to use this skill.
---Important: The description must include trigger phrases, which are key to activating the skill.
Body
Body
- 使用中文撰写
- 简洁明了,< 500 行
- 包含使用示例
- 引用 references 时说明何时读取
- Write in Chinese
- Concise and clear, < 500 lines
- Include usage examples
- Explain when to read references when citing them
步骤 5:验证
Step 5: Validation
bash
scripts/quick_validate.py skills/<skill-name>检查项:
- Frontmatter 格式
- 行数限制
- 触发词存在
bash
scripts/quick_validate.py skills/<skill-name>Check items:
- Frontmatter format
- Line limit
- Presence of trigger phrases
步骤 6:人工审核
Step 6: Manual Review
验证通过后,提交人工审核:
- 功能完整性
- 文档清晰度
- 示例有效性
After passing validation, submit for manual review:
- Functional completeness
- Document clarity
- Example validity
参考示例:prd-writer
Reference Example: prd-writer
prd-writerprd-writer/
├── SKILL.md (233 行)
└── references/
├── new-feature-ui.md
├── new-feature-backend.md
├── integration.md
├── refactoring.md
└── optimization.mdFrontmatter 示例:
yaml
---
name: prd-writer
description: 写 PRD、写产品需求文档、PRD 模板、新功能需求。帮助撰写高质量的产品需求文档,支持多种类型:新功能(有UI/无UI)、第三方集成、功能重构、性能/安全优化。
---注意 description 开头的触发词:
写 PRD、写产品需求文档、PRD 模板、新功能需求prd-writerprd-writer/
├── SKILL.md (233 lines)
└── references/
├── new-feature-ui.md
├── new-feature-backend.md
├── integration.md
├── refactoring.md
└── optimization.mdFrontmatter Example:
yaml
---
name: prd-writer
description: Write PRD, write product requirement document, PRD template, new feature requirements. Help write high-quality product requirement documents, supporting multiple types: new features (with/without UI), third-party integration, function refactoring, performance/security optimization.
---Note the trigger phrases at the start of the description:
Write PRD, write product requirement document, PRD template, new feature requirements常见问题
Frequently Asked Questions
Q: references 和 assets 的区别?
Q: What's the difference between references and assets?
- references/:供 Claude 参考的文档,会加载到 context
- assets/:输出资源(图片、模板),不加载到 context
- references/: Documents for Claude to reference, loaded into context
- assets/: Output resources (images, templates), not loaded into context
Q: SKILL.md 太长怎么办?
Q: What if SKILL.md is too long?
拆分到 references/,在 SKILL.md 中引用并说明何时读取。
Split content into references/, and cite and explain when to read them in SKILL.md.
Q: 如何测试 skill?
Q: How to test a skill?
- 运行 验证格式
quick_validate.py - 实际使用测试功能
- 根据反馈迭代改进
- Run to verify format
quick_validate.py - Test functions through actual usage
- Iterate and improve based on feedback