validate-plugin

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Validate Plugin

验证插件

Validate that a plugin follows the correct Claude Code plugin format.
验证插件是否遵循正确的Claude Code插件格式。

When to use

使用场景

After creating or modifying a plugin, run validation to catch structural issues before publishing.
在创建或修改插件后,运行验证以在发布前发现结构问题。

Checks performed

执行的检查项

  1. Directory structure
    .claude-plugin/plugin.json
    exists at plugin root
  2. plugin.json schema — required fields present (name, description, version)
  3. Skills — each skill in
    plugin.json.skills
    has a matching
    skills/<name>/SKILL.md
  4. Commands — each command in
    plugin.json.commands
    has a matching
    commands/<name>.md
  5. Agents — each agent in
    plugin.json.agents
    has a matching
    agents/<name>.md
  6. SKILL.md frontmatter — each skill has
    name
    ,
    description
    , and
    allowed-tools
  7. Agent frontmatter — each agent has
    name
    ,
    description
    , and
    model
  8. No files in wrong locations — skills/commands/agents not inside
    .claude-plugin/
  9. MCP tool references — tools in
    allowed-tools
    are valid
    mcp__claude-flow__*
    identifiers
  1. 目录结构 — 插件根目录下存在
    .claude-plugin/plugin.json
    文件
  2. plugin.json schema — 包含必填字段(name、description、version)
  3. Skills
    plugin.json.skills
    中的每个skill都有对应的
    skills/<name>/SKILL.md
    文件
  4. Commands
    plugin.json.commands
    中的每个command都有对应的
    commands/<name>.md
    文件
  5. Agents
    plugin.json.agents
    中的每个agent都有对应的
    agents/<name>.md
    文件
  6. SKILL.md 前置元数据 — 每个skill都包含
    name
    description
    allowed-tools
    字段
  7. Agent 前置元数据 — 每个agent都包含
    name
    description
    model
    字段
  8. 无文件放置错误 — skills/commands/agents文件未存放在
    .claude-plugin/
    目录内
  9. MCP工具引用
    allowed-tools
    中的工具是有效的
    mcp__claude-flow__*
    标识符

Steps

步骤

  1. Read the plugin's
    plugin.json
  2. For each skill, command, and agent declared, verify the file exists
  3. For each SKILL.md, verify frontmatter has required fields
  4. For each agent .md, verify frontmatter has required fields
  5. Report pass/fail for each check with actionable fix suggestions
  1. 读取插件的
    plugin.json
    文件
  2. 针对每个声明的skill、command和agent,验证对应文件是否存在
  3. 针对每个SKILL.md文件,验证前置元数据包含必填字段
  4. 针对每个agent的.md文件,验证前置元数据包含必填字段
  5. 报告每项检查的通过/失败结果,并提供可操作的修复建议