跳到正文
Skillpedia
测试81k · #1680

validate-plugin

它能做什么

这项技能根据 Claude Code 的格式检查插件的文件夹、插件文件和技能文件。适用于希望在分享插件前发现错误的开发者。

适用场景

  • ✓当你刚刚创建或修改了一个插件的时候。
  • ✓当插件即将发布,需要最后一次检查的时候。
  • ✓当 Claude Code 拒绝了一个插件,而你需要找出原因的时候。

技能链接

https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-plugin-creator/skills/validate-plugin/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-plugin-creator/skills/validate-plugin/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请在发布前检查我的插件文件夹,看看有没有结构或格式问题。”

每周 5 个新技能,1 分钟读完。

工作原理

这项技能会对文件夹结构、插件文件字段、技能和智能体的标头以及工具引用运行一系列检查。它会报告发现的每个问题,方便你修复。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Validate Plugin

Validate that a plugin follows the correct Claude Code plugin format.

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, non-empty keywords array); name equals the directory name; version is semver
  3. Skills auto-discovery — every skills/<name>/SKILL.md is a valid skill (Claude Code auto-discovers from directory; plugin.json MUST NOT list a skills array)
  4. Commands auto-discovery — every commands/<name>.md is a valid command (auto-discovered; no commands array in plugin.json)
  5. Agents auto-discovery — every agents/<name>.md is a valid agent (auto-discovered; no agents array in plugin.json)
  6. No legacy arrays in plugin.json — presence of skills, commands, or agents arrays in plugin.json is a validation error (they cause Claude Code to reject the plugin)
  7. SKILL.md frontmatter — each skill has name, description, and allowed-tools (no wildcards)
  8. Agent frontmatter — each agent has name, description, and model
  9. No files in wrong locations — skills/commands/agents not inside .claude-plugin/
  10. MCP tool references — tools in allowed-tools use the mcp__plugin_ruflo-core_ruflo__* prefix AND exist: list the real tools with npx @claude-flow/cli@latest mcp tools and flag any name not in it (typos such as hooks_post_task for hooks_post-task, or agentdb_pattern_search for agentdb_pattern-search, are format-valid but do not exist). Also run the repo gates when inside the ruflo repo: node scripts/audit-skill-frontmatter.mjs, audit-plugin-manifest.mjs, audit-plugin-mcp-prefix.mjs

Steps

  1. Read the plugin's plugin.json and assert no skills / commands / agents arrays present
  2. Glob skills/*/SKILL.md, commands/*.md, agents/*.md and validate each frontmatter
  3. For each SKILL.md, verify frontmatter has required fields and allowed-tools has no wildcards
  4. For each agent .md, verify frontmatter has required fields
  5. Report pass/fail for each check with actionable fix suggestions
常见问题

拒绝插件的常见原因是什么?

插件文件以数组形式列出技能、命令或智能体。来源说明这会导致 Claude Code 拒绝该插件。

它会自动修复问题吗?

这项技能的描述涵盖检查和报告,因此由你决定如何修复每个问题。

它会检查每个技能文件的什么内容?

名称、描述和允许使用的工具字段,且不允许使用通配符工具名。

详情

作者的原始描述

Validate a Claude Code plugin structure, frontmatter, and MCP tool references

repo: ruvnet/ruflo

热度

GitHub 星标
81k
排名
#1680
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能