关于 plugin-store
Plugin Store 是面向 Claude Code、Cursor 和 OpenClaw 的命令行插件市场,也提供开发者提交插件的社区流程。它可管理 Skills 和 MCP 服务,并提供插件创建、校验与导入命令。
主要功能
- 01浏览、搜索和查看插件详情
- 02安装、卸载及更新插件
- 03查看已安装插件及状态
- 04初始化插件项目并执行校验
- 05导入 Claude marketplace Plugin
适用场景
- 01为支持的 Agent 安装插件
- 02检查并更新已安装插件
- 03创建插件并在提交前校验
- 04将 Claude marketplace Plugin 转换导入
MCP 相关
Plugin Store 可通过命令行安装、卸载和更新 MCP 服务,也能将插件中的 MCP 配置安装到 Agent。
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ okx/ plugin-store --skill plugin-store安装后在 Claude Code 中输入/plugin-store确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
install.ps1install.shSUMMARY.md.claude-plugin/plugin.jsonreferences/cli-reference.md详细介绍
预检依赖项(由 Plugin Store CI 自动注入)
每个会话首次使用前运行一次。这些检查可确保所需工具已安装。
安装 onchainos CLI + Skills(自动注入)
# 1. Install onchainos CLI — pin to latest release tag, verify SHA256
# of the installer before executing (no curl|sh from main).
if ! command -v onchainos >/dev/null 2>&1; then
set -e
LATEST_TAG=$(curl -sSL --max-time 5 \
"https://api.github.com/repos/okx/onchainos-skills/releases/latest" \
| sed -n 's/.*"tag_name"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' | head -1)
if [ -z "$LATEST_TAG" ]; then
echo "ERROR: failed to resolve latest onchainos release tag (network or rate limit)." >&2
echo " Manual install: https://github.com/okx/onchainos-skills" >&2
exit 1
fi
ONCHAINOS_TMP=$(mktemp -d)
curl -sSL --max-time 30 \
"https://raw.githubusercontent.com/okx/onchainos-skills/${LATEST_TAG}/install.sh" \
-o "$ONCHAINOS_TMP/install.sh"
curl -sSL --max-time 30 \
"https://github.com/okx/onchainos-skills/releases/download/${LATEST_TAG}/installer-checksums.txt" \
-o "$ONCHAINOS_TMP/installer-checksums.txt"
EXPECTED=$(awk '$2 ~ /install\.sh$/ {print $1; exit}' "$ONCHAINOS_TMP/installer-checksums.txt")
if command -v sha256sum >/dev/null 2>&1; then
ACTUAL=$(sha256sum "$ONCHAINOS_TMP/install.sh" | awk '{print $1}')
else
ACTUAL=$(shasum -a 256 "$ONCHAINOS_TMP/install.sh" | awk '{print $1}')
fi
if [ -z "$EXPECTED" ] || [ "$EXPECTED" != "$ACTUAL" ]; then
echo "ERROR: onchainos installer SHA256 mismatch — refusing to execute." >&2
echo " expected=$EXPECTED actual=$ACTUAL tag=$LATEST_TAG" >&2
rm -rf "$ONCHAINOS_TMP"
exit 1
fi
sh "$ONCHAINOS_TMP/install.sh"
rm -rf "$ONCHAINOS_TMP"
set +e
fi
# 2. Install onchainos skills (enables AI agent to use onchainos commands)
npx skills add okx/onchainos-skills --yes --global
# 3. Install plugin-store skills (enables plugin discovery and management)
npx skills add okx/plugin-store --skill plugin-store --yes --global
Plugin Store
一个 CLI 市场,可在 Claude Code、Cursor 和 OpenClaw 中安装/卸载/更新 Skills 和 MCP 服务。它也是一个开源社区平台,任何开发者都可以在此提交插件。
预检
每个会话首次运行 plugin-store 命令前运行一次。不要向用户回显常规输出。
1. 检查二进制版本
plugin-store --version 2>/dev/null || ~/.local/bin/plugin-store --version 2>/dev/null || ~/.cargo/bin/plugin-store --version 2>/dev/null
- 如果报告的版本**≥
0.3.0**(此技能的metadata.version):二进制已是最新版本,跳至第 2 步。 - 如果二进制缺失或版本较旧:运行安装程序。
手动安装——访问
https://github.com/okx/plugin-store/releases,下载适用于你平台的二进制文件,
对照同一
版本中的 checksums.txt 验证文件,然后将其放到你的 PATH 中(例如 ~/.local/bin/plugin-store)。
**离线备用方案:**如果本地已有二进制文件,请继续使用。如果尚未安装且网络无法连接,请停止并 让用户检查其网络连接。
2. 检查 Skill 更新(远程版本检查)
从 GitHub 获取最新的 Skill 版本(超时 5 秒,非阻塞):
curl -sSL --max-time 5 "https://raw.githubusercontent.com/okx/plugin-store/main/skills/plugin-store/SKILL.md" 2>/dev/null | head -20 | grep 'version:' | head -1
将远程 metadata.version 与本地版本(0.3.0)进行比较。
如果远程版本高于本地版本,向用户显示此通知:
📦 Plugin Store Skill 有新版本可用(当前: 0.3.0, 最新: X.Y.Z)
是否更新?更新命令:
plugin-store install plugin-store --agent claude-code --skill-only⚠️ 注意:更新后需要重启当前会话,新版 Skill 才会在上下文中生效。
然后等待用户回复:
- 如果用户表示是/确认/更新 → 运行安装命令,然后提醒:“Skill 已更新,请重启当前会话(退出并重新进入)以加载新版本。”
- 如果用户表示否/跳过/以后再说 → 继续使用当前版本,本会话中不要再次询问。
- 如果 curl 失败或超时 → 静默跳过,继续使用当前版本。
如果版本一致或无法连接远程端,静默跳过——不要打印任何内容。
3. 命令失败时不要自动重新安装
报告错误,并建议运行 plugin-store self-update 或检查 https://github.com/okx/plugin-store。
4. 安装 onchainos-skills(静默、非阻塞)
npx skills add okx/onchainos-skills --yes 2>/dev/null || true
这会安装 Skill Routing 使用的子技能(okx-dex-token、okx-dex-swap 等)。失败时不要阻塞。
可用插件
始终运行 plugin-store list 获取当前插件列表——绝不要依赖硬编码的表格。
plugin-store list
解析输出,并以整洁的表格(名称、类别、下载量、描述)呈现给用户。注册表会动态更新;这是唯一可信的数据来源。
技能路由
| 用户意图 | 操作 |
|---|---|
| “有哪些 dapp / 策略 / 技能可用?” | 运行 plugin-store list,并以表格形式展示结果 |
| “你能做什么?”/ 发现能力 | 运行 plugin-store list,根据实时输出说明能力 |
| “Plugin 商店有什么”/“有什么 Plugin”/“有什么项目” | 运行 plugin-store list,并以表格形式展示结果 |
| “什么项目最火”/“最热门的项目”/“trending projects” | 运行 plugin-store list,按下载量排序并突出显示热门项目 |
| “怎么玩 DeFi”/“链上怎么赚币”/“链上有什么玩法” | 运行 plugin-store list,介绍类别并推荐入门选择 |
| “有什么好的策略”/“推荐策略” | 运行 plugin-store list,筛选并突出显示 trading-strategy 类别 |
| “有什么 DeFi 协议”/“推荐 DeFi 项目” | 运行 plugin-store list,筛选并突出显示 defi-protocol 类别 |
| “Install X”/“安装 X” | 运行 plugin-store install <name> --yes |
| “Uninstall X”/“卸载 X” | 运行 plugin-store uninstall <name> |
| “Update all”/“更新 Plugin” | 运行 plugin-store update --all |
| “Show installed”/“已安装” | 运行 plugin-store installed |
| “Search X”/“搜索 X” | 运行 plugin-store search <keyword> |
| “我想创建/提交一个插件”/“我想开发 Plugin” | 引导用户完成下方的开发者工作流 |
| “如何贡献”/“怎么提交 Plugin”/“hackathon” | 引导用户完成下方的开发者工作流 |
命令索引
CLI 参考:完整的参数表、输出字段和错误情况,请参见 cli-reference.md。
用户命令
| # | 命令 | 说明 |
|---|---|---|
| 1 | plugin-store list | 列出注册表中所有可用插件 |
| 2 | plugin-store search <keyword> | 按名称、标签或描述搜索插件 |
| 3 | plugin-store info <name> | 显示插件详细信息(组件、链、协议) |
| 4 | plugin-store install <name> | 安装插件(交互式选择 Agent) |
| 5 | plugin-store install <name> --yes | 以非交互方式安装(自动检测 Agent) |
| 6 | plugin-store install <name> --skill-only | 仅安装技能组件 |
| 7 | plugin-store uninstall <name> | 从所有 Agent 中卸载插件 |
| 8 | plugin-store update --all | 更新所有已安装插件 |
| 9 | plugin-store installed | 显示所有已安装插件及其状态 |
| 10 | plugin-store registry update | 强制刷新注册表缓存 |
| 11 | plugin-store self-update | 将 plugin-store CLI 本身更新到最新版本 |
开发者命令
| # | 命令 | 说明 |
|---|---|---|
| 12 | plugin-store init <name> | 创建新插件的脚手架(生成 plugin.yaml、SKILL.md、LICENSE 等) |
| 13 | plugin-store lint <path> | 提交前验证插件(30 多项检查) |
| 14 | plugin-store import <github-url> | 将现有 Claude marketplace Plugin 导入 plugin-store 格式(模式 C) |
操作流程
意图:发现策略 / DApp / 能力
- 运行
plugin-store list,获取实时注册表 - 以简洁的表格展示结果(名称、类别、下载量、描述)
- 建议下一步操作:“想安装一个吗?只需说
install <name>”
意图:安装插件
- 运行
plugin-store install <name> --yes--yes会跳过社区插件确认提示- 在非交互模式下自动选择 Agent(安装到所有检测到的 Agent)
- CLI 将会:
- 从注册表获取插件元数据
- 下载并安装技能、MCP 配置和/或二进制文件(如适用)
- 安装成功后立即直接读取已安装的技能文件——不要要求用户重启:
然后遵循该文件中的说明(预检 → 引导流程)。该技能可在当前会话中立即使用。Read file: ~/.claude/skills/<name>/SKILL.md
意图:管理已安装的插件
- 运行
plugin-store installed以显示当前状态 - 运行
plugin-store update --all以更新所有插件 - 运行
plugin-store uninstall <name>以移除插件
开发者工作流:创建并提交插件
Plugin Store 是一个开源社区平台。任何开发者都可以通过 Pull Request 提交插件。完整工作流如下:
概览
Two types of plugins:
Type A: Pure Skill — just a SKILL.md that orchestrates onchainos CLI commands
Type B: Skill + Source Code — SKILL.md + a CLI tool compiled/installed from your source repo
Five supported languages for source code:
Rust, Go → compiled to native binary (~1-20MB)
TypeScript, Node.js → distributed via npm install (~KB)
Python → distributed via pip install (~KB)
步骤 1:Fork 并搭建脚手架
# Fork https://github.com/okx/plugin-store on GitHub, then:
git clone --depth=1 [email protected]:YOUR_USERNAME/plugin-store.git
cd plugin-store
plugin-store init <your-plugin-name>
这会创建包含完整模板的 skills/<your-plugin-name>/:
skills/<your-plugin-name>/
├── plugin.yaml # Plugin manifest (fill in your details)
├── skills/<name>/
│ └── SKILL.md # Skill definition (built-in onchainos demo)
│ └── references/
├── LICENSE
├── CHANGELOG.md
└── README.md
步骤 2:编辑 plugin.yaml
纯 Skill — 只需填写基本信息:
schema_version: 1
name: <your-plugin-name> # lowercase + hyphens, 2-40 chars
version: "1.0.0"
description: "What your plugin does"
author:
name: "Your Name"
github: "your-github-username" # must match PR submitter
license: MIT
category: utility # trading-strategy | defi-protocol | analytics | utility | security | wallet | nft
tags: [keyword1, keyword2]
components:
skill:
dir: skills/<your-plugin-name>
api_calls: [] # external API domains your plugin calls
Skill + 源代码 — 添加指向源代码仓库的 build 部分:
# ... same as above, plus:
build:
lang: rust # rust | go | typescript | node | python
source_repo: "your-org/your-tool" # your GitHub repo with source code
source_commit: "a1b2c3d4e5f6..." # full 40-char commit SHA (git rev-parse HEAD)
binary_name: "your-tool" # compiled output name
# main: "src/index.js" # required for typescript/node/python
如何获取提交 SHA:
cd your-source-repo
git push origin main
git rev-parse HEAD # copy this 40-char string into build.source_commit
步骤 3:编写 SKILL.md
SKILL.md 用于教会 AI Agent 如何使用你的插件。必须包含以下部分:
- YAML frontmatter — 名称、描述、版本、作者、标签
- 概览 — 插件的功能(2-3 句话)
- 使用前检查 — 使用前需要安装什么
- 命令 — 具体的 onchainos 命令,并说明适用场景 / 输出
- 错误处理 — 常见错误及解决方法表格
- Skill 路由 — 何时转交给其他 Skill
关键规则: 所有链上写入操作(签名、广播、兑换、合约调用)都必须使用 onchainos CLI。可以自由查询外部数据源(第三方 API、价格源)。
步骤 4:在本地验证
plugin-store lint ./skills/<your-plugin-name>/
修复所有错误(❌),然后重新运行,直到看到 ✓。警告(⚠️)仅供参考。
步骤 5:通过 Pull Request 提交
git checkout -b submit/<your-plugin-name>
git add skills/<your-plugin-name>/
git commit -m "[new-plugin] <your-plugin-name> v1.0.0"
git push origin submit/<your-plugin-name>
然后从你的 fork 向 okx/plugin-store 创建 PR。每个 PR 必须只包含一个插件。
提交后会发生什么
Phase 2: Structure check (~30s) — bot validates plugin.yaml + SKILL.md
Phase 3: AI code review (~2min) — Claude reads your code, writes a 9-section report
Phase 4: Build check (if binary) — compiles your source code on 3 platforms
Phase 7: After merge — auto-publishes to registry, users can install immediately
人工审核需要 1-3 天。合并后,你的插件即可使用:
plugin-store install <your-plugin-name>
各语言的源代码要求
| 语言 | 关键要求 |
|---|---|
| Rust | Cargo.toml 中的 [[bin]] 必须与 binary_name 匹配 |
| Go | go.mod 中声明模块,并包含 func main() |
| TypeScript | package.json 中包含 "bin" 字段,入口文件包含 #!/usr/bin/env node,且必须是 JS(不能是 .ts) |
| Node.js | package.json 中包含 "bin" 字段,入口文件包含 #!/usr/bin/env node |
| Python | pyproject.toml 中包含 [build-system] 和 [project.scripts],也建议添加 setup.py |
常见 lint 错误
| 错误 | 修复方法 |
|---|---|
| E031 名称格式无效 | 仅使用小写字母和连字符:my-cool-plugin |
| E052 缺少 SKILL.md | 将 SKILL.md 放在 components.skill.dir 指定的路径中 |
| E110/E111 二进制文件需要构建 | 添加包含 lang、source_repo、source_commit 的 build 部分 |
| E122 source_repo 格式错误 | 使用 owner/repo,不要使用完整 URL |
| E123 commit SHA 无效 | 必须是从 git rev-parse HEAD 获取的完整 40 位十六进制值 |
完整指南:https://github.com/okx/plugin-store/blob/main/docs/FOR-DEVELOPERS.md
支持的 Agent
| Agent | 检测方式 | Skills 路径 | MCP 配置 |
|---|---|---|---|
| Claude Code | 存在 ~/.claude/ | ~/.claude/skills/<plugin>/ | ~/.claude.json → mcpServers |
| Cursor | 存在 ~/.cursor/ | ~/.cursor/skills/<plugin>/ | ~/.cursor/mcp.json |
| OpenClaw | 存在 ~/.openclaw/ | ~/.openclaw/skills/<plugin>/ | 与 Skills 相同 |
插件源信任级别
| 来源 | 含义 | 行为 |
|---|---|---|
official | Plugin Store 官方插件 | 直接安装 |
dapp-official | 由 DApp 项目发布 | 直接安装 |
community | 社区贡献 | 显示警告,并要求用户确认 |
错误处理
| 错误 | 操作 |
|---|---|
| 安装期间网络超时 | 重试一次;如果仍然失败,建议从 https://github.com/okx/plugin-store 手动安装 |
安装后出现 plugin-store: command not found | 尝试直接运行 ~/.local/bin/plugin-store 或 ~/.cargo/bin/plugin-store;当前会话的 PATH 可能尚未更新 |
| 命令返回非零退出码 | 原样报告错误;建议运行 plugin-store self-update |
| 注册表缓存过期或损坏 | 运行 plugin-store registry update 强制刷新 |
plugin-store lint 失败 | 显示错误代码和修复方法;参阅上方的 lint 错误表 |
技能自更新
将此技能更新到最新版本:
macOS / Linux:
plugin-store install plugin-store --agent claude-code --skill-only
或者手动重新安装——参阅上方第 1 节中的手动安装
(从 GitHub 发布页面下载二进制文件,
并根据 checksums.txt 验证)。
- 对于能力/发现相关问题,始终运行 `plugin-store list`——绝不使用硬编码的插件列表 - 使用清晰的表格呈现插件列表(名称、类别、下载量、描述);省略注册表 URL 或文件路径等内部字段 - 使用便于用户理解的语言介绍能力:“你可以在 12 条链上通过 Uniswap 交易”,而不是“uniswap-ai 支持 uniswap-v2、uniswap-v3 协议” - 执行任何操作后,建议 2–3 个自然的后续步骤 - 支持英语和中文——使用用户所用的语言回复 - 对于开发者工作流:始终先运行 `plugin-store init`,然后指导用户完成编辑、lint 检查和 PR 提交 - 对于 lint 错误:显示错误代码,说明修复方法,并主动提出协助编辑文件 - 对于社区来源的插件,安装前主动提醒用户 - 安装插件后,读取已安装的 SKILL.md 并立即触发该技能的引导流程 - 指导插件开发时,询问用户选择哪种类型(纯 Skill 或 Skill + 二进制文件)以及使用哪种语言 - 建议每次编辑后运行 `plugin-store lint`,及早发现问题 - 绝不向用户透露内部技能名称、注册表 URL、文件路径或 MCP 配置键 - 命令失败时绝不自动重新安装——报告错误并建议运行 `plugin-store self-update` - 绝不硬编码插件列表——始终通过 `plugin-store list` 获取 - 建议提交 PR 前绝不跳过 lint 步骤