glean-plugin-checklist

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Glean Plugin Marketplace Checklist

Glean Plugin Marketplace 检查清单

This skill provides the checklist for correctly adding or modifying plugins in the glean-claude-plugins marketplace repository.
本技能提供了在glean-claude-plugins市场仓库中正确添加或修改插件的检查清单。

Repository Structure

仓库结构

glean-claude-plugins/
├── .claude-plugin/
│   └── marketplace.json      # CRITICAL: Plugin registry - must list all plugins
├── plugins/
│   └── <plugin-name>/
│       ├── .claude-plugin/
│       │   └── plugin.json   # Plugin manifest with version
│       ├── README.md         # Plugin documentation
│       ├── commands/         # Slash commands
│       ├── skills/           # Auto-triggered skills
│       └── agents/           # Autonomous agents
├── README.md                 # Main repo README - must list all plugins
└── package.json              # NPM package with version
glean-claude-plugins/
├── .claude-plugin/
│   └── marketplace.json      # 关键文件:插件注册表 - 必须列出所有插件
├── plugins/
│   └── <plugin-name>/
│       ├── .claude-plugin/
│       │   └── plugin.json   # 带版本信息的插件清单
│       ├── README.md         # 插件文档
│       ├── commands/         # 斜杠命令
│       ├── skills/           # 自动触发技能
│       └── agents/           # 自主Agent
├── README.md                 # 主仓库README - 必须列出所有插件
└── package.json              # 带版本信息的NPM包

Adding a New Plugin Checklist

添加新插件检查清单

When creating a new plugin, you MUST complete ALL of these steps:
创建新插件时,你必须完成以下所有步骤:

1. Create Plugin Directory Structure

1. 创建插件目录结构

bash
mkdir -p plugins/<plugin-name>/.claude-plugin
mkdir -p plugins/<plugin-name>/commands
mkdir -p plugins/<plugin-name>/skills
mkdir -p plugins/<plugin-name>/agents
bash
mkdir -p plugins/<plugin-name>/.claude-plugin
mkdir -p plugins/<plugin-name>/commands
mkdir -p plugins/<plugin-name>/skills
mkdir -p plugins/<plugin-name>/agents

2. Create plugin.json (REQUIRED)

2. 创建plugin.json(必填)

Path:
plugins/<plugin-name>/.claude-plugin/plugin.json
json
{
  "name": "<plugin-name>",
  "version": "<MATCH MARKETPLACE VERSION>",
  "description": "<Brief description>. Requires glean-core.",
  "author": {
    "name": "Glean",
    "email": "steve.calvert@glean.com",
    "url": "https://glean.com"
  },
  "homepage": "https://docs.glean.com/administration/platform/mcp/about",
  "repository": "https://github.com/gleanwork/claude-plugins",
  "license": "MIT",
  "keywords": ["glean", "mcp", "<relevant-keywords>"]
}
CRITICAL: The version MUST match the version in
.claude-plugin/marketplace.json
.
路径:
plugins/<plugin-name>/.claude-plugin/plugin.json
json
{
  "name": "<plugin-name>",
  "version": "<与市场版本匹配>",
  "description": "<简要描述>。需要 glean-core。",
  "author": {
    "name": "Glean",
    "email": "steve.calvert@glean.com",
    "url": "https://glean.com"
  },
  "homepage": "https://docs.glean.com/administration/platform/mcp/about",
  "repository": "https://github.com/gleanwork/claude-plugins",
  "license": "MIT",
  "keywords": ["glean", "mcp", "<相关关键词>"]
}
关键注意事项:版本必须与
.claude-plugin/marketplace.json
中的版本一致。

3. Add to marketplace.json (REQUIRED)

3. 添加至marketplace.json(必填)

Path:
.claude-plugin/marketplace.json
Add entry to the
plugins
array:
json
{
  "name": "<plugin-name>",
  "source": "./plugins/<plugin-name>",
  "description": "<One-line description for marketplace listing>"
}
路径:
.claude-plugin/marketplace.json
plugins
数组中添加条目:
json
{
  "name": "<plugin-name>",
  "source": "./plugins/<plugin-name>",
  "description": "<市场列表用的单行描述>"
}

4. Create Plugin README.md (REQUIRED)

4. 创建插件README.md(必填)

Path:
plugins/<plugin-name>/README.md
Include:
  • Plugin description
  • Prerequisites (usually "Requires glean-core")
  • Available commands
  • Available skills
  • Available agents
  • Usage examples
路径:
plugins/<plugin-name>/README.md
需包含:
  • 插件描述
  • 前置条件(通常为“需要 glean-core”)
  • 可用命令
  • 可用技能
  • 可用Agent
  • 使用示例

5. Update Main README.md (REQUIRED)

5. 更新主README.md(必填)

Path:
README.md
Update THREE sections:
a) Quick Start section - Add install command:
markdown
/plugin install <plugin-name>
b) Plugins table - Add row:
markdown
| **[<plugin-name>](plugins/<plugin-name>)** | <Description> | [README](plugins/<plugin-name>/README.md) |
c) "Which Plugin Do I Need?" section - Add use case:
markdown
| <Use case description> | `glean-core` + `<plugin-name>` |
路径:
README.md
更新三个部分:
a) 快速入门章节 - 添加安装命令:
markdown
/plugin install <plugin-name>
b) 插件表格 - 添加行:
markdown
| **[<plugin-name>](plugins/<plugin-name>)** | <描述> | [README](plugins/<plugin-name>/README.md) |
c) “我需要哪个插件?”章节 - 添加使用场景:
markdown
| <使用场景描述> | `glean-core` + `<plugin-name>` |

Version Management

版本管理

All plugins should have the same version as the marketplace:
  1. Check current version:
    jq '.version' .claude-plugin/marketplace.json
  2. Set plugin version to match in
    plugins/<plugin-name>/.claude-plugin/plugin.json
When releasing a new version:
  1. Update
    .claude-plugin/marketplace.json
    version
  2. Update
    package.json
    version
  3. Update ALL
    plugins/*/.claude-plugin/plugin.json
    versions
所有插件的版本应与市场版本保持一致:
  1. 查看当前版本:
    jq '.version' .claude-plugin/marketplace.json
  2. plugins/<plugin-name>/.claude-plugin/plugin.json
    中设置插件版本以匹配市场版本
发布新版本时:
  1. 更新
    .claude-plugin/marketplace.json
    中的版本
  2. 更新
    package.json
    中的版本
  3. 更新所有
    plugins/*/.claude-plugin/plugin.json
    中的版本

Verification Commands

验证命令

After adding a plugin, verify with:
bash
undefined
添加插件后,使用以下命令验证:
bash
undefined

Check marketplace.json is valid JSON

检查marketplace.json是否为有效的JSON

jq . .claude-plugin/marketplace.json
jq . .claude-plugin/marketplace.json

List all plugins in marketplace

列出市场中的所有插件

jq -r '.plugins[].name' .claude-plugin/marketplace.json
jq -r '.plugins[].name' .claude-plugin/marketplace.json

Check all plugin versions match

检查所有插件版本是否匹配

for p in plugins/*/.claude-plugin/plugin.json; do echo "$p: $(jq -r '.version' "$p")" done
for p in plugins/*/.claude-plugin/plugin.json; do echo "$p: $(jq -r '.version' "$p")" done

Check README mentions the plugin

检查README中是否提及该插件

grep "<plugin-name>" README.md
undefined
grep "<plugin-name>" README.md
undefined

Common Mistakes to Avoid

需避免的常见错误

  1. Forgetting marketplace.json - Plugin won't appear in marketplace
  2. Version mismatch - Can cause installation issues
  3. Missing README update - Users won't know plugin exists
  4. Wrong source path - Use
    ./plugins/<name>
    not
    plugins/<name>
  1. 忘记更新marketplace.json - 插件不会在市场中显示
  2. 版本不匹配 - 可能导致安装问题
  3. 未更新README - 用户无法知晓该插件的存在
  4. 源路径错误 - 应使用
    ./plugins/<name>
    而非
    plugins/<name>

Using plugin-dev:create-plugin

使用plugin-dev:create-plugin

The
/plugin-dev:create-plugin
command can help scaffold the plugin, but you MUST still:
  1. Add to
    .claude-plugin/marketplace.json
    manually
  2. Update the main
    README.md
    manually
  3. Ensure versions match
Always run the verification commands after using
/plugin-dev:create-plugin
.
/plugin-dev:create-plugin
命令可帮助搭建插件框架,但你仍需手动完成以下操作:
  1. 手动将插件添加至
    .claude-plugin/marketplace.json
  2. 手动更新主
    README.md
  3. 确保版本一致
使用
/plugin-dev:create-plugin
后,务必运行验证命令。