testing

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Testing Skill — Skill Validation Framework

测试Skill — Skill验证框架

Contract

契约

This skill guarantees:
  • Every skill directory has a SKILL.md file
  • Every SKILL.md has valid YAML frontmatter (name, description)
  • Every SKILL.md has required sections (Contract, Anti-Patterns, Output Format)
  • manifest.json lists every skill directory
  • RESOLVER.md references every skill in the manifest
  • No MECE violations (duplicate triggers across skills)
本Skill保证:
  • 每个skill目录都包含SKILL.md文件
  • 每个SKILL.md都包含有效的YAML前置元数据(name、description)
  • 每个SKILL.md都包含必填章节(Contract、Anti-Patterns、Output Format)
  • manifest.json中列出所有skill目录
  • RESOLVER.md引用manifest中的所有skill
  • 无MECE违规(不同skill之间存在重复触发器)

Phases

阶段

  1. Walk skills directory. List all subdirectories containing SKILL.md.
  2. Validate frontmatter. Parse YAML, check required fields.
  3. Validate sections. Check for Contract, Anti-Patterns, Output Format headings.
  4. Check manifest. Every skill directory must be listed in manifest.json.
  5. Check resolver. Every manifest skill must have a RESOLVER.md entry.
  6. Report results.
Automated:
bun test test/skills-conformance.test.ts test/resolver.test.ts
  1. 遍历skills目录:列出所有包含SKILL.md的子目录。
  2. 验证前置元数据:解析YAML,检查必填字段。
  3. 验证章节:检查是否存在Contract、Anti-Patterns、Output Format标题。
  4. 检查manifest:每个skill目录必须在manifest.json中列出。
  5. 检查resolver:manifest中的每个skill必须在RESOLVER.md中有对应条目。
  6. 生成结果报告
自动化执行:
bun test test/skills-conformance.test.ts test/resolver.test.ts

Output Format

输出格式

Skill Validation Report
========================
Skills found: N
Conformance: N/N pass
Manifest coverage: N/N
Resolver coverage: N/N
MECE violations: N

Issues:
- {skill}: {issue}
Skill Validation Report
========================
Skills found: N
Conformance: N/N pass
Manifest coverage: N/N
Resolver coverage: N/N
MECE violations: N

Issues:
- {skill}: {issue}

Anti-Patterns

反模式

  • Skipping validation after adding a new skill
  • Adding skills to manifest without adding to resolver
  • Creating skills without the conformance template
  • 添加新skill后跳过验证
  • 将skill添加到manifest但未添加到resolver
  • 未使用一致性模板创建skill