skill-creator

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Skill 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(如
prd-writer
目录结构扁平结构
skills/xxx/
必须文件只需 SKILL.md
references 命名英文
ItemSpecification
Naming LanguageEnglish, kebab-case (e.g.,
prd-writer
)
Directory StructureFlat structure
skills/xxx/
Required FilesOnly SKILL.md
references NamingEnglish

审核标准

Review Standards

审核项要求
Frontmatter必须包含触发词
行数限制SKILL.md < 500 行
边界检查必须通过
quick_validate.py
+ 人工审核
语言必须中文(技术术语可保留英文)
示例必须有使用示例
Review ItemRequirement
FrontmatterMust include trigger phrases
Line LimitSKILL.md < 500 lines
Boundary CheckMust pass
quick_validate.py
+ manual review
LanguageMust be Chinese (technical terms can remain in English)
ExamplesMust 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

  1. Metadata(name + description)- 始终在 context 中
  2. SKILL.md body - 触发后加载
  3. references/ - 按需加载
  1. Metadata (name + description) - Always in context
  2. SKILL.md body - Loaded after triggering
  3. 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 TypePurposeExample
references/Reference documents, loaded on demandTemplates, specifications, API documents
scripts/Executable scriptsValidation, initialization tools
assets/Output resourcesImages, 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
skills/
directory by default and creates:
  • 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-writer
是一个符合 Testany 规范的 skill 示例:
prd-writer/
├── SKILL.md (233 行)
└── references/
    ├── new-feature-ui.md
    ├── new-feature-backend.md
    ├── integration.md
    ├── refactoring.md
    └── optimization.md
Frontmatter 示例
yaml
---
name: prd-writer
description: 写 PRD、写产品需求文档、PRD 模板、新功能需求。帮助撰写高质量的产品需求文档,支持多种类型:新功能(有UI/无UI)、第三方集成、功能重构、性能/安全优化。
---
注意 description 开头的触发词:
写 PRD、写产品需求文档、PRD 模板、新功能需求
prd-writer
is an example of a skill that complies with Testany's specifications:
prd-writer/
├── SKILL.md (233 lines)
└── references/
    ├── new-feature-ui.md
    ├── new-feature-backend.md
    ├── integration.md
    ├── refactoring.md
    └── optimization.md
Frontmatter 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?

  1. 运行
    quick_validate.py
    验证格式
  2. 实际使用测试功能
  3. 根据反馈迭代改进
  1. Run
    quick_validate.py
    to verify format
  2. Test functions through actual usage
  3. Iterate and improve based on feedback