skill-validator

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Skill Validator

Skill Validator

Purpose and Intent

目的与用途

The
skill-validator
is the primary quality control tool for this repository. It ensures that every AI Agent Skill is "machine-consumable" by validating it against the
agentskills.io
standard and the repository's
AGENTS.md
rules.
skill-validator
是本仓库的核心质量控制工具。它通过对照
agentskills.io
标准和仓库的
AGENTS.md
规则进行验证,确保每个AI Agent Skill都能被“机器消费”。

When to Use

使用场景

  • During Development: Run this skill every time you create or modify a skill.
  • CI/CD Integration: Automatically block Pull Requests that contain non-compliant skill definitions.
  • Repository Audits: Periodically scan the entire
    agent-skills/
    directory to ensure long-term compliance as specifications evolve.
  • 开发过程中:每次创建或修改技能时运行此工具。
  • CI/CD集成:自动拦截包含不符合规范的技能定义的Pull Requests。
  • 仓库审计:定期扫描整个
    agent-skills/
    目录,确保随着规范演进,技能仍能长期符合要求。

When NOT to Use

不适用场景

  • Code Logic Validation: This tool does not "run" the skills or verify their internal logic; it only validates the "contract" (the YAML and Markdown).
  • 代码逻辑验证:本工具不会“运行”技能或验证其内部逻辑;它仅验证“契约”(即YAML和Markdown文件)。

Error Conditions and Edge Cases

错误情况与边缘案例

  • Invalid YAML: If
    skill.yaml
    cannot be parsed, the validator will fail immediately with a syntax error.
  • Missing Required Fields: Any missing field defined in the
    agentskills.io
    specification will result in
    is_valid: false
    .
  • Empty Directories: Folders in
    agent-skills/
    that do not contain a
    skill.yaml
    will be flagged as invalid skills.
  • 无效YAML:如果
    skill.yaml
    无法被解析,验证器会立即因语法错误而失败。
  • 缺少必填字段:任何
    agentskills.io
    规范中定义的必填字段缺失,都会导致
    is_valid: false
  • 空目录
    agent-skills/
    下不包含
    skill.yaml
    的文件夹会被标记为无效技能。

Security and Data-Handling Considerations

安全与数据处理注意事项

  • ReadOnly Access: The skill only requires read permissions for the target directory.
  • No External Calls: Validation is performed locally using the embedded schema rules.
  • 只读访问:本工具仅需要目标目录的读取权限。
  • 无外部调用:验证通过内嵌的规则在本地执行。