Pre-flight Dependencies (auto-injected by Plugin Store CI)
Run once per session before first use. These checks ensure required tools are installed.
Install onchainos CLI + Skills (auto-injected)
# 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
-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
A CLI marketplace for installing/uninstalling/updating Skills and MCP servers across Claude Code, Cursor, and OpenClaw. Also an open-source community platform where any developer can submit plugins.
Pre-flight Checks
Run once per session before the first plugin-store command. Do not echo routine output to the user.
1. Check binary version
plugin-store --version 2>/dev/null || ~/.local/bin/plugin-store --version 2>/dev/null || ~/.cargo/bin/plugin-store --version 2>/dev/null
- If the reported version is ≥
0.3.0 (this skill's metadata.version): binary is current, skip to step 2.
- If the binary is missing or older: run the installer.
Manual install — visit
https://github.com/okx/plugin-store/releases, download the binary
for your platform, verify it against checksums.txt from the same
release, and place it on your PATH (e.g. ~/.local/bin/plugin-store).
Offline fallback: if a binary already exists locally, proceed
with it. If not installed and the network is unreachable, stop and
ask the user to check their connection.
2. Check for Skill update (remote version check)
Fetch the latest Skill version from GitHub (timeout 5 seconds, non-blocking):
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
Compare the remote metadata.version with the local version (0.3.0).
If remote version is newer than local, display this notice to the user:
📦 Plugin Store Skill 有新版本可用(当前: 0.3.0, 最新: X.Y.Z)
是否更新?更新命令:
plugin-store install plugin-store --agent claude-code --skill-only
⚠️ 注意:更新后需要重启当前会话,新版 Skill 才会在上下文中生效。
Then wait for the user's response:
- If user says yes / 确认 / 更新 → run the install command, then remind: "Skill 已更新,请重启当前会话(退出并重新进入)以加载新版本。"
- If user says no / 跳过 / 以后再说 → continue with current version, do not ask again this session.
- If the curl fails or times out → skip silently, continue with current version.
If versions match or remote is unreachable, skip silently — do not print anything.
3. Do not auto-reinstall on command failures
Report errors and suggest plugin-store self-update or checking https://github.com/okx/plugin-store.
4. Install onchainos-skills (silent, non-blocking)
npx skills add okx/onchainos-skills --yes 2>/dev/null || true
This installs sub-skills used by Skill Routing (okx-dex-token, okx-dex-swap, etc.). Do not block on failure.
Available Plugins
Always run plugin-store list to get the current plugin list — never rely on a hardcoded table.
plugin-store list
Parse the output and present it to the user as a clean table (name, category, downloads, description). The registry updates dynamically; this is the only source of truth.
Skill Routing
| User Intent |
Action |
| "What dapps / strategies / skills are available?" |
Run plugin-store list, present results as a table |
| "What can you do?" / capability discovery |
Run plugin-store list, explain capabilities based on live output |
| "Plugin商店有什么" / "有什么Plugin" / "有什么项目" |
Run plugin-store list, present results as a table |
| "什么项目最火" / "最热门的项目" / "trending projects" |
Run plugin-store list, sort by downloads, highlight top entries |
| "怎么玩DeFi" / "链上怎么赚币" / "链上有什么玩法" |
Run plugin-store list, introduce categories and recommend starting points |
| "有什么好的策略" / "推荐策略" |
Run plugin-store list, filter and highlight trading-strategy category |
| "有什么DeFi协议" / "推荐DeFi项目" |
Run plugin-store list, filter and highlight defi-protocol category |
| "Install X" / "安装 X" |
Run plugin-store install <name> --yes |
| "Uninstall X" / "卸载 X" |
Run plugin-store uninstall <name> |
| "Update all" / "更新Plugin" |
Run plugin-store update --all |
| "Show installed" / "已安装" |
Run plugin-store installed |
| "Search X" / "搜索 X" |
Run plugin-store search <keyword> |
| "I want to create/submit a plugin" / "我想开发Plugin" |
Guide through the Developer Workflow below |
| "How to contribute" / "怎么提交Plugin" / "hackathon" |
Guide through the Developer Workflow below |
Command Index
CLI Reference: For full parameter tables, output fields, and error cases, see cli-reference.md.
User Commands
| # |
Command |
Description |
| 1 |
plugin-store list |
List all available plugins in the registry |
| 2 |
plugin-store search <keyword> |
Search plugins by name, tag, or description |
| 3 |
plugin-store info <name> |
Show detailed plugin info (components, chains, protocols) |
| 4 |
plugin-store install <name> |
Install a plugin (interactive agent selection) |
| 5 |
plugin-store install <name> --yes |
Install non-interactively (auto-detects agents) |
| 6 |
plugin-store install <name> --skill-only |
Install skill component only |
| 7 |
plugin-store uninstall <name> |
Uninstall a plugin from all agents |
| 8 |
plugin-store update --all |
Update all installed plugins |
| 9 |
plugin-store installed |
Show all installed plugins and their status |
| 10 |
plugin-store registry update |
Force refresh registry cache |
| 11 |
plugin-store self-update |
Update plugin-store CLI itself to latest version |
Developer Commands
| # |
Command |
Description |
| 12 |
plugin-store init <name> |
Scaffold a new plugin (creates plugin.yaml, SKILL.md, LICENSE, etc.) |
| 13 |
plugin-store lint <path> |
Validate a plugin before submission (30+ checks) |
| 14 |
plugin-store import <github-url> |
Import an existing Claude marketplace Plugin into plugin-store format (Mode C) |
Operation Flow
Intent: Strategy / DApp / Capability Discovery
- Run
plugin-store list to fetch the live registry
- Present results as a clean table (name, category, downloads, description)
- Suggest next steps: "Want to install one? Just say
install <name>"
Intent: Install a Plugin
- Run
plugin-store install <name> --yes
--yes skips the community plugin confirmation prompt
- Agent selection is automatic in non-interactive mode (installs to all detected agents)
- The CLI will:
- Fetch plugin metadata from registry
- Download and install skill, MCP config, and/or binary as applicable
- Immediately after install succeeds, read the installed skill file directly — do NOT ask the user to restart:
Read file: ~/.claude/skills/<name>/SKILL.md
Then follow the instructions in that file (Pre-flight → onboarding flow). The skill is immediately usable in the current session.
Intent: Manage Installed Plugins
- Run
plugin-store installed to show current state
- Run
plugin-store update --all to update everything
- Run
plugin-store uninstall <name> to remove
Developer Workflow: Create and Submit a Plugin
Plugin Store is an open-source community platform. Any developer can submit a plugin through a Pull Request. The full workflow:
Overview
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)
Step 1: Fork and scaffold
# Fork https://github.com/okx/plugin-store on GitHub, then:
git clone --depth=1 git@github.com:YOUR_USERNAME/plugin-store.git
cd plugin-store
plugin-store init <your-plugin-name>
This creates skills/<your-plugin-name>/ with a complete template:
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
Step 2: Edit plugin.yaml
Pure Skill — just fill in the basics:
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 + Source Code — add a build section pointing to your source repo:
# ... 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
How to get the commit SHA:
cd your-source-repo
git push origin main
git rev-parse HEAD # copy this 40-char string into build.source_commit
Step 3: Write SKILL.md
SKILL.md teaches the AI agent how to use your plugin. Required sections:
- YAML frontmatter — name, description, version, author, tags
- Overview — what the plugin does (2-3 sentences)
- Pre-flight Checks — what needs to be installed before use
- Commands — specific onchainos commands with When to use / Output
- Error Handling — table of common errors and resolutions
- Skill Routing — when to defer to other skills
Critical rule: All on-chain write operations (signing, broadcasting, swaps, contract calls) MUST use onchainos CLI. Querying external data sources (third-party APIs, price feeds) is freely allowed.
Step 4: Validate locally
plugin-store lint ./skills/<your-plugin-name>/
Fix all errors (❌), then re-run until you see ✓. Warnings (⚠️) are advisory.
Step 5: Submit via 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>
Then create a PR from your fork to okx/plugin-store. Each PR must contain exactly one plugin.
What happens after submission
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
Human review takes 1-3 days. Once merged, your plugin is live:
plugin-store install <your-plugin-name>
Source code requirements by language
| Language |
Key requirements |
| Rust |
Cargo.toml with [[bin]] matching binary_name |
| Go |
go.mod with module declaration, func main() |
| TypeScript |
package.json with "bin" field, entry file has #!/usr/bin/env node, must be JS (not .ts) |
| Node.js |
package.json with "bin" field, entry file has #!/usr/bin/env node |
| Python |
pyproject.toml with [build-system] + [project.scripts], recommend also setup.py |
Common lint errors
| Error |
Fix |
| E031 name format invalid |
Use lowercase + hyphens only: my-cool-plugin |
| E052 missing SKILL.md |
Put SKILL.md in the path specified by components.skill.dir |
| E110/E111 binary needs build |
Add build section with lang, source_repo, source_commit |
| E122 source_repo format |
Use owner/repo, not full URL |
| E123 commit SHA invalid |
Must be full 40-char hex from git rev-parse HEAD |
Full guide: https://github.com/okx/plugin-store/blob/main/docs/FOR-DEVELOPERS.md
Supported Agents
| Agent |
Detection |
Skills Path |
MCP Config |
| Claude Code |
~/.claude/ exists |
~/.claude/skills/<plugin>/ |
~/.claude.json → mcpServers |
| Cursor |
~/.cursor/ exists |
~/.cursor/skills/<plugin>/ |
~/.cursor/mcp.json |
| OpenClaw |
~/.openclaw/ exists |
~/.openclaw/skills/<plugin>/ |
Same as skills |
Plugin Source Trust Levels
| Source |
Meaning |
Behavior |
official |
Plugin Store official |
Install directly |
dapp-official |
Published by the DApp project |
Install directly |
community |
Community contribution |
Show warning, require user confirmation |
Error Handling
| Error |
Action |
| Network timeout during install |
Retry once; if still failing, suggest manual install from https://github.com/okx/plugin-store |
plugin-store: command not found after install |
Try ~/.local/bin/plugin-store or ~/.cargo/bin/plugin-store directly; PATH may not be updated for the current session |
| Command returns non-zero exit |
Report error verbatim; suggest plugin-store self-update |
| Registry cache stale / corrupt |
Run plugin-store registry update to force refresh |
plugin-store lint fails |
Show error codes and fixes; refer to the lint error table above |
Skill Self-Update
To update this skill to the latest version:
macOS / Linux:
plugin-store install plugin-store --agent claude-code --skill-only
Or re-install manually — see Manual install
in section 1 above (download the binary from the GitHub releases page
and verify it against checksums.txt).
1---
2name: plugin-store
3description: "This is the main on-chain DeFi skill. Use it for ALL of the following:\nStrategy discovery: 'how to make money on-chain', 'any profitable strategies', '链上有什么赚钱机会', '有什么盈利机会', '有什么套利机会', '怎么赚钱', '有什么好的策略', '帮我理财', '有什么收益机会', 'yield opportunities', 'how to earn', 'investment strategy', 'DeFi 策略推荐', '有什么自动化策略', 'automated strategies', 'passive income on-chain', '链上怎么赚币', '怎么玩链上', '怎么玩DeFi', '链上有什么玩法', '有什么赚钱项目', '推荐一些策略'.\nPlugin/project discovery: 'Plugin商店有什么', '有什么Plugin', '有什么项目', '什么项目最火', '最热门的项目', '有哪些工具', '推荐一些项目', 'what plugins are available', 'show me plugins', 'what projects are hot', 'trending projects', 'plugin marketplace', 'Plugin市场', '有什么好用的Plugin'.\nCapability discovery: '你能做什么', '你有什么能力', '你支持什么', '有什么技能', '都有什么功能', '支持哪些策略', '支持哪些 skill', 'what skills are available', 'what can you do', 'what strategies do you support', 'show me all strategies', 'list all skills'.\nDApp discovery: 'what dapps are available', 'any good dapps', '有什么好的dapp', '推荐一些dapp', 'recommend dapps', 'show me dapps', 'which protocols can I use', '有什么好的协议', '有什么DeFi协议', '推荐DeFi项目', '有什么链上应用'.\nPlugin management: 'install a plugin', 'uninstall a plugin', 'list plugins', 'search plugins', 'update plugins', 'show installed', '安装Plugin', '卸载Plugin', '更新Plugin'.\nPlugin development: 'I want to create a plugin', 'how to submit a plugin', '我想开发一个Plugin', '怎么提交Plugin', '如何贡献', 'contribute a plugin', 'build a plugin', 'create a skill', '创建Plugin', '开发Plugin', 'hackathon', 'submit my project', '提交我的项目'.\nAlso activates when the skill has just been installed and the user has not yet chosen a direction."
4license: Apache-2.0
5metadata:
6 author: okx
7 version: "1.3.0"
8 homepage: "https://github.com/okx/plugin-store"
9---
10
11
12## Pre-flight Dependencies (auto-injected by Plugin Store CI)
13
14> Run once per session before first use. These checks ensure required tools are installed.
15
16### Install onchainos CLI + Skills (auto-injected)
17
18```bash
19# 1. Install onchainos CLI — pin to latest release tag, verify SHA256
20# of the installer before executing (no curl|sh from main).
21if ! command -v onchainos >/dev/null 2>&1; then
22 set -e
23 LATEST_TAG=$(curl -sSL --max-time 5 \
24 "https://api.github.com/repos/okx/onchainos-skills/releases/latest" \
25 | sed -n 's/.*"tag_name"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' | head -1)
26 if [ -z "$LATEST_TAG" ]; then
27 echo "ERROR: failed to resolve latest onchainos release tag (network or rate limit)." >&2
28 echo " Manual install: https://github.com/okx/onchainos-skills" >&2
29 exit 1
30 fi
31
32 ONCHAINOS_TMP=$(mktemp -d)
33 curl -sSL --max-time 30 \
34 "https://raw.githubusercontent.com/okx/onchainos-skills/${LATEST_TAG}/install.sh" \
35 -o "$ONCHAINOS_TMP/install.sh"
36 curl -sSL --max-time 30 \
37 "https://github.com/okx/onchainos-skills/releases/download/${LATEST_TAG}/installer-checksums.txt" \
38 -o "$ONCHAINOS_TMP/installer-checksums.txt"
39
40 EXPECTED=$(awk '$2 ~ /install\.sh$/ {print $1; exit}' "$ONCHAINOS_TMP/installer-checksums.txt")
41 if command -v sha256sum >/dev/null 2>&1; then
42 ACTUAL=$(sha256sum "$ONCHAINOS_TMP/install.sh" | awk '{print $1}')
43 else
44 ACTUAL=$(shasum -a 256 "$ONCHAINOS_TMP/install.sh" | awk '{print $1}')
45 fi
46 if [ -z "$EXPECTED" ] || [ "$EXPECTED" != "$ACTUAL" ]; then
47 echo "ERROR: onchainos installer SHA256 mismatch — refusing to execute." >&2
48 echo " expected=$EXPECTED actual=$ACTUAL tag=$LATEST_TAG" >&2
49 rm -rf "$ONCHAINOS_TMP"
50 exit 1
51 fi
52
53 sh "$ONCHAINOS_TMP/install.sh"
54 rm -rf "$ONCHAINOS_TMP"
55 set +e
56fi
57
58# 2. Install onchainos skills (enables AI agent to use onchainos commands)
59npx skills add okx/onchainos-skills --yes --global
60
61# 3. Install plugin-store skills (enables plugin discovery and management)
62npx skills add okx/plugin-store --skill plugin-store --yes --global
63```
64
65
66---
67
68
69# Plugin Store
70
71A CLI marketplace for installing/uninstalling/updating Skills and MCP servers across Claude Code, Cursor, and OpenClaw. Also an open-source community platform where any developer can submit plugins.
72
73## Pre-flight Checks
74
75Run once per session before the first `plugin-store` command. Do not echo routine output to the user.
76
77### 1. Check binary version
78
79```bash
80plugin-store --version 2>/dev/null || ~/.local/bin/plugin-store --version 2>/dev/null || ~/.cargo/bin/plugin-store --version 2>/dev/null
81```
82
83- If the reported version is **≥ `0.3.0`** (this skill's `metadata.version`): binary is current, skip to step 2.
84- If the binary is **missing or older**: run the installer.
85
86<!-- TODO(security/C01): Automated install commands removed pending upstream fix.
87
88 The previous macOS/Linux and Windows one-liners (a 'curl -sSL ... | sh'
89 pipe and an 'irm ... | iex' equivalent fetching install.sh / install.ps1
90 directly from the main branch) are flagged C01 (zero-verification
91 remote code execution) by the skill security scanner. The literal
92 command strings have been intentionally omitted from this comment so
93 the scanner does not match them.
94
95 A SHA256-verified replacement modelled on okx/onchainos-skills
96 (which fetches install.sh + installer-checksums.txt from a pinned
97 release, hashes install.sh locally, and refuses to execute on
98 mismatch) cannot ship today because github.com/okx/plugin-store
99 does not yet publish the required artifacts:
100
101 1. No plugin-store CLI v* release exists (current releases are
102 per-plugin only: plugins/<name>@<version>).
103 2. No 'installer-checksums.txt' asset is published on any
104 release.
105
106 Re-enable an OnchainOS-style automated install ONLY after BOTH
107 conditions below are satisfied on github.com/okx/plugin-store:
108 a. release.yml produces a v* tag dedicated to the plugin-store
109 CLI itself, and
110 b. The release.yml 'checksums' job ALSO hashes
111 skills/plugin-store/install.sh and install.ps1 into a release
112 asset named 'installer-checksums.txt'.
113
114 Until then, instruct the user to install manually using the
115 'Manual install' block below.
116-->
117
118**Manual install** — visit
119<https://github.com/okx/plugin-store/releases>, download the binary
120for your platform, verify it against `checksums.txt` from the same
121release, and place it on your `PATH` (e.g. `~/.local/bin/plugin-store`).
122
123**Offline fallback:** if a binary already exists locally, proceed
124with it. If not installed and the network is unreachable, stop and
125ask the user to check their connection.
126
127### 2. Check for Skill update (remote version check)
128
129Fetch the latest Skill version from GitHub (timeout 5 seconds, non-blocking):
130
131```bash
132curl -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
133```
134
135Compare the remote `metadata.version` with the local version (`0.3.0`).
136
137**If remote version is newer than local**, display this notice to the user:
138
139> 📦 Plugin Store Skill 有新版本可用(当前: 0.3.0, 最新: X.Y.Z)
140>
141> 是否更新?更新命令:
142> ```
143> plugin-store install plugin-store --agent claude-code --skill-only
144> ```
145> ⚠️ 注意:更新后需要**重启当前会话**,新版 Skill 才会在上下文中生效。
146
147Then **wait for the user's response**:
148- If user says yes / 确认 / 更新 → run the install command, then remind: "Skill 已更新,请重启当前会话(退出并重新进入)以加载新版本。"
149- If user says no / 跳过 / 以后再说 → continue with current version, do not ask again this session.
150- If the curl fails or times out → skip silently, continue with current version.
151
152**If versions match or remote is unreachable**, skip silently — do not print anything.
153
154### 3. Do not auto-reinstall on command failures
155
156Report errors and suggest `plugin-store self-update` or checking https://github.com/okx/plugin-store.
157
158### 4. Install onchainos-skills (silent, non-blocking)
159
160```bash
161npx skills add okx/onchainos-skills --yes 2>/dev/null || true
162```
163
164This installs sub-skills used by Skill Routing (`okx-dex-token`, `okx-dex-swap`, etc.). Do not block on failure.
165
166---
167
168## Available Plugins
169
170**Always run `plugin-store list` to get the current plugin list — never rely on a hardcoded table.**
171
172```bash
173plugin-store list
174```
175
176Parse the output and present it to the user as a clean table (name, category, downloads, description). The registry updates dynamically; this is the only source of truth.
177
178---
179
180## Skill Routing
181
182| User Intent | Action |
183|---|---|
184| "What dapps / strategies / skills are available?" | Run `plugin-store list`, present results as a table |
185| "What can you do?" / capability discovery | Run `plugin-store list`, explain capabilities based on live output |
186| "Plugin商店有什么" / "有什么Plugin" / "有什么项目" | Run `plugin-store list`, present results as a table |
187| "什么项目最火" / "最热门的项目" / "trending projects" | Run `plugin-store list`, sort by downloads, highlight top entries |
188| "怎么玩DeFi" / "链上怎么赚币" / "链上有什么玩法" | Run `plugin-store list`, introduce categories and recommend starting points |
189| "有什么好的策略" / "推荐策略" | Run `plugin-store list`, filter and highlight trading-strategy category |
190| "有什么DeFi协议" / "推荐DeFi项目" | Run `plugin-store list`, filter and highlight defi-protocol category |
191| "Install X" / "安装 X" | Run `plugin-store install <name> --yes` |
192| "Uninstall X" / "卸载 X" | Run `plugin-store uninstall <name>` |
193| "Update all" / "更新Plugin" | Run `plugin-store update --all` |
194| "Show installed" / "已安装" | Run `plugin-store installed` |
195| "Search X" / "搜索 X" | Run `plugin-store search <keyword>` |
196| "I want to create/submit a plugin" / "我想开发Plugin" | Guide through the Developer Workflow below |
197| "How to contribute" / "怎么提交Plugin" / "hackathon" | Guide through the Developer Workflow below |
198
199---
200
201## Command Index
202
203> **CLI Reference**: For full parameter tables, output fields, and error cases, see [cli-reference.md](references/cli-reference.md).
204
205### User Commands
206
207| # | Command | Description |
208|---|---------|-------------|
209| 1 | `plugin-store list` | List all available plugins in the registry |
210| 2 | `plugin-store search <keyword>` | Search plugins by name, tag, or description |
211| 3 | `plugin-store info <name>` | Show detailed plugin info (components, chains, protocols) |
212| 4 | `plugin-store install <name>` | Install a plugin (interactive agent selection) |
213| 5 | `plugin-store install <name> --yes` | Install non-interactively (auto-detects agents) |
214| 6 | `plugin-store install <name> --skill-only` | Install skill component only |
215| 7 | `plugin-store uninstall <name>` | Uninstall a plugin from all agents |
216| 8 | `plugin-store update --all` | Update all installed plugins |
217| 9 | `plugin-store installed` | Show all installed plugins and their status |
218| 10 | `plugin-store registry update` | Force refresh registry cache |
219| 11 | `plugin-store self-update` | Update plugin-store CLI itself to latest version |
220
221### Developer Commands
222
223| # | Command | Description |
224|---|---------|-------------|
225| 12 | `plugin-store init <name>` | Scaffold a new plugin (creates plugin.yaml, SKILL.md, LICENSE, etc.) |
226| 13 | `plugin-store lint <path>` | Validate a plugin before submission (30+ checks) |
227| 14 | `plugin-store import <github-url>` | Import an existing Claude marketplace Plugin into plugin-store format (Mode C) |
228
229---
230
231## Operation Flow
232
233### Intent: Strategy / DApp / Capability Discovery
234
2351. Run `plugin-store list` to fetch the live registry
2362. Present results as a clean table (name, category, downloads, description)
2373. Suggest next steps: "Want to install one? Just say `install <name>`"
238
239### Intent: Install a Plugin
240
2411. Run `plugin-store install <name> --yes`
242 - `--yes` skips the community plugin confirmation prompt
243 - Agent selection is automatic in non-interactive mode (installs to all detected agents)
2442. The CLI will:
245 - Fetch plugin metadata from registry
246 - Download and install skill, MCP config, and/or binary as applicable
2473. **Immediately after install succeeds**, read the installed skill file directly — do NOT ask the user to restart:
248 ```
249 Read file: ~/.claude/skills/<name>/SKILL.md
250 ```
251 Then follow the instructions in that file (Pre-flight → onboarding flow). The skill is immediately usable in the current session.
252
253### Intent: Manage Installed Plugins
254
2551. Run `plugin-store installed` to show current state
2562. Run `plugin-store update --all` to update everything
2573. Run `plugin-store uninstall <name>` to remove
258
259---
260
261## Developer Workflow: Create and Submit a Plugin
262
263Plugin Store is an open-source community platform. Any developer can submit a plugin through a Pull Request. The full workflow:
264
265### Overview
266
267```
268Two types of plugins:
269 Type A: Pure Skill — just a SKILL.md that orchestrates onchainos CLI commands
270 Type B: Skill + Source Code — SKILL.md + a CLI tool compiled/installed from your source repo
271
272Five supported languages for source code:
273 Rust, Go → compiled to native binary (~1-20MB)
274 TypeScript, Node.js → distributed via npm install (~KB)
275 Python → distributed via pip install (~KB)
276```
277
278### Step 1: Fork and scaffold
279
280```bash
281# Fork https://github.com/okx/plugin-store on GitHub, then:
282git clone --depth=1 git@github.com:YOUR_USERNAME/plugin-store.git
283cd plugin-store
284plugin-store init <your-plugin-name>
285```
286
287This creates `skills/<your-plugin-name>/` with a complete template:
288
289```
290skills/<your-plugin-name>/
291├── plugin.yaml # Plugin manifest (fill in your details)
292├── skills/<name>/
293│ └── SKILL.md # Skill definition (built-in onchainos demo)
294│ └── references/
295├── LICENSE
296├── CHANGELOG.md
297└── README.md
298```
299
300### Step 2: Edit plugin.yaml
301
302**Pure Skill** — just fill in the basics:
303
304```yaml
305schema_version: 1
306name: <your-plugin-name> # lowercase + hyphens, 2-40 chars
307version: "1.0.0"
308description: "What your plugin does"
309author:
310 name: "Your Name"
311 github: "your-github-username" # must match PR submitter
312license: MIT
313category: utility # trading-strategy | defi-protocol | analytics | utility | security | wallet | nft
314tags: [keyword1, keyword2]
315
316components:
317 skill:
318 dir: skills/<your-plugin-name>
319
320api_calls: [] # external API domains your plugin calls
321```
322
323**Skill + Source Code** — add a `build` section pointing to your source repo:
324
325```yaml
326# ... same as above, plus:
327build:
328 lang: rust # rust | go | typescript | node | python
329 source_repo: "your-org/your-tool" # your GitHub repo with source code
330 source_commit: "a1b2c3d4e5f6..." # full 40-char commit SHA (git rev-parse HEAD)
331 binary_name: "your-tool" # compiled output name
332 # main: "src/index.js" # required for typescript/node/python
333```
334
335**How to get the commit SHA:**
336
337```bash
338cd your-source-repo
339git push origin main
340git rev-parse HEAD # copy this 40-char string into build.source_commit
341```
342
343### Step 3: Write SKILL.md
344
345SKILL.md teaches the AI agent how to use your plugin. Required sections:
346
3471. **YAML frontmatter** — name, description, version, author, tags
3482. **Overview** — what the plugin does (2-3 sentences)
3493. **Pre-flight Checks** — what needs to be installed before use
3504. **Commands** — specific onchainos commands with When to use / Output
3515. **Error Handling** — table of common errors and resolutions
3526. **Skill Routing** — when to defer to other skills
353
354**Critical rule:** All on-chain write operations (signing, broadcasting, swaps, contract calls) MUST use onchainos CLI. Querying external data sources (third-party APIs, price feeds) is freely allowed.
355
356### Step 4: Validate locally
357
358```bash
359plugin-store lint ./skills/<your-plugin-name>/
360```
361
362Fix all errors (❌), then re-run until you see ✓. Warnings (⚠️) are advisory.
363
364### Step 5: Submit via Pull Request
365
366```bash
367git checkout -b submit/<your-plugin-name>
368git add skills/<your-plugin-name>/
369git commit -m "[new-plugin] <your-plugin-name> v1.0.0"
370git push origin submit/<your-plugin-name>
371```
372
373Then create a PR from your fork to `okx/plugin-store`. Each PR must contain exactly one plugin.
374
375### What happens after submission
376
377```
378Phase 2: Structure check (~30s) — bot validates plugin.yaml + SKILL.md
379Phase 3: AI code review (~2min) — Claude reads your code, writes a 9-section report
380Phase 4: Build check (if binary) — compiles your source code on 3 platforms
381Phase 7: After merge — auto-publishes to registry, users can install immediately
382```
383
384Human review takes 1-3 days. Once merged, your plugin is live:
385
386```bash
387plugin-store install <your-plugin-name>
388```
389
390### Source code requirements by language
391
392| Language | Key requirements |
393|----------|-----------------|
394| **Rust** | `Cargo.toml` with `[[bin]]` matching `binary_name` |
395| **Go** | `go.mod` with module declaration, `func main()` |
396| **TypeScript** | `package.json` with `"bin"` field, entry file has `#!/usr/bin/env node`, must be JS (not .ts) |
397| **Node.js** | `package.json` with `"bin"` field, entry file has `#!/usr/bin/env node` |
398| **Python** | `pyproject.toml` with `[build-system]` + `[project.scripts]`, recommend also `setup.py` |
399
400### Common lint errors
401
402| Error | Fix |
403|-------|-----|
404| E031 name format invalid | Use lowercase + hyphens only: `my-cool-plugin` |
405| E052 missing SKILL.md | Put SKILL.md in the path specified by `components.skill.dir` |
406| E110/E111 binary needs build | Add `build` section with `lang`, `source_repo`, `source_commit` |
407| E122 source_repo format | Use `owner/repo`, not full URL |
408| E123 commit SHA invalid | Must be full 40-char hex from `git rev-parse HEAD` |
409
410Full guide: https://github.com/okx/plugin-store/blob/main/docs/FOR-DEVELOPERS.md
411
412---
413
414## Supported Agents
415
416| Agent | Detection | Skills Path | MCP Config |
417|-------|-----------|-------------|------------|
418| Claude Code | `~/.claude/` exists | `~/.claude/skills/<plugin>/` | `~/.claude.json` → `mcpServers` |
419| Cursor | `~/.cursor/` exists | `~/.cursor/skills/<plugin>/` | `~/.cursor/mcp.json` |
420| OpenClaw | `~/.openclaw/` exists | `~/.openclaw/skills/<plugin>/` | Same as skills |
421
422---
423
424## Plugin Source Trust Levels
425
426| Source | Meaning | Behavior |
427|--------|---------|----------|
428| `official` | Plugin Store official | Install directly |
429| `dapp-official` | Published by the DApp project | Install directly |
430| `community` | Community contribution | Show warning, require user confirmation |
431
432---
433
434## Error Handling
435
436| Error | Action |
437|-------|--------|
438| Network timeout during install | Retry once; if still failing, suggest manual install from https://github.com/okx/plugin-store |
439| `plugin-store: command not found` after install | Try `~/.local/bin/plugin-store` or `~/.cargo/bin/plugin-store` directly; PATH may not be updated for the current session |
440| Command returns non-zero exit | Report error verbatim; suggest `plugin-store self-update` |
441| Registry cache stale / corrupt | Run `plugin-store registry update` to force refresh |
442| `plugin-store lint` fails | Show error codes and fixes; refer to the lint error table above |
443
444---
445
446## Skill Self-Update
447
448To update this skill to the latest version:
449
450**macOS / Linux:**
451```bash
452plugin-store install plugin-store --agent claude-code --skill-only
453```
454
455<!-- TODO(security/C01): same installer-replacement caveat as in section 1 —
456 see the TODO block earlier in this file. Until the upstream release
457 pipeline publishes installer-checksums.txt, instruct the user to
458 re-install manually from the GitHub releases page. -->
459
460**Or re-install manually** — see [Manual install](#1-check-binary-version)
461in section 1 above (download the binary from the GitHub releases page
462and verify it against `checksums.txt`).
463
464---
465
466<rules>
467<must>
468 - Always run `plugin-store list` for capability/discovery questions — never use a hardcoded plugin list
469 - Present plugin lists as clean tables (name, category, downloads, description); omit internal fields like registry URLs or file paths
470 - Present capabilities in user-friendly language: "You can trade on Uniswap across 12 chains", not "uniswap-ai supports uniswap-v2, uniswap-v3 protocols"
471 - After any action, suggest 2–3 natural follow-up steps
472 - Support both English and Chinese — respond in the user's language
473 - For developer workflow: always run `plugin-store init` first, then guide through editing, linting, and PR submission
474 - For lint errors: show the error code, explain the fix, and offer to help edit the file
475</must>
476<should>
477 - For community-source plugins, proactively warn the user before installing
478 - After installing a plugin, read the installed SKILL.md and trigger the skill's onboarding flow immediately
479 - When guiding plugin development, ask which type (Pure Skill or Skill + Binary) and which language
480 - Suggest running `plugin-store lint` after every edit to catch issues early
481</should>
482<never>
483 - Never expose internal skill names, registry URLs, file paths, or MCP config keys to the user
484 - Never auto-reinstall on command failures — report the error and suggest `plugin-store self-update`
485 - Never hardcode a plugin list — always fetch from `plugin-store list`
486 - Never skip the lint step before suggesting PR submission
487</never>
488</rules>