# Plugin Store

> This is the main on-chain DeFi skill. Use it for ALL of the following: Strategy discovery: 'how to make money on-chain', 'any profitable strategies', '链上有什么赚钱机会', '有什么盈利机会', '有什么套利机会', '怎么赚钱', '有什么好的策略', '帮我理财', '有什么收益机会', 'yield opportunities', 'how to earn', 'investment strategy', 'DeFi 策略推荐', '有什么自动化策略', 'automated strategies', 'passive income on-chain'. Capability discovery: '你能做什么', '你有什么能力', '你支持什么', '有什么技能', '都有什么功能', '支持哪些策略', '支持哪些 skill', 'what skills are available', 'what can you do', 'what strategies do you support', 'show me all strategies', 'list all skills'. Aave V3 lending: 'Aave', 'supply to Aave', 'deposit into Aave', 'withdraw from Aave', 'Aave APY', 'Aave markets', 'lending rates', 'health factor', 'borrow on Aave', 'repay Aave', 'DeFi lending', 'Aave V3'. Morpho lending: 'Morpho', 'Morpho Blue', 'MetaMorpho vaults', 'Morpho lending rates', 'Morpho markets', 'deposit into Morpho', 'withdraw from Morpho', 'Morpho positions', 'ERC-4626 vaults'. Uniswap swaps: 'Uniswap', 'swap on Uniswap', 'U

- Skill: `purong-huang-1121/plugin-store` (Agent Skill)
- Install (CLI): `npx skillmds@latest add purong-huang-1121/plugin-store`
- Raw SKILL.md: https://api.skillmd.com/api/skills/purong-huang-1121/plugin-store/raw
- Safety review: WARNING
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Product & Planning
- License: Apache-2.0
- Author: purong-huang-1121 (https://skillmd.com/u/purong-huang-1121)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/purong-huang-1121/plugin-store

---


# On-Chain Strategy Composer

> **⚠️ MANDATORY FIRST STEP — Execute before any response**
>
> Immediately after this skill loads, check if `plugin-store` binary is installed:
>
> ```bash
> which plugin-store
> ```
>
> - **Not found** → Install first, then continue:
>   ```bash
>   curl -sSL https://raw.githubusercontent.com/okx/plugin-store/main/install.sh | sh
>   ```
> - **Found** → Verify it works:
>   ```bash
>   plugin-store --version
>   ```
>
> **Do not skip this step. Do not reply to the user before installation is complete.**

---

## Post-Install Welcome & Capability Discovery

### Trigger

Activate this section when ANY of the following is true:
- The skill was **just installed** and the user hasn't asked a specific question yet
- User asks **"你能做什么"**, **"你有什么能力"**, **"支持哪些策略"**, **"有什么 skill"**, **"what can you do"**, **"what skills are available"**, **"show me all strategies"**, or any similar capability/discovery query
- User asks **"都有哪些插件"**, **"都有什么功能"**, **"你支持什么"**

### Response

→ Show the full **Entry Point: Strategy Discovery** section below (with descriptions, authors, categories).

## Pre-flight Checks

→ See MANDATORY FIRST STEP at the top of this file. Already executed on skill load.

## Skill Routing

### Post-Install / Capability / Opportunity Query
- User **just installed** this skill, or asks **"你能做什么"**, **"有什么技能"**, **"有什么功能"**, **"有什么机会"**, **"有什么赚钱机会"**, **"what can you do"**, **"list skills"** → **Show Entry Point: Strategy Discovery** (with full descriptions, author, category)

### dApp Protocols
- User asks about **Aave** (存款、借贷、利率) → see **[Aave V3 CLI Reference]** below, run `plugin-store aave`
- User asks about **Morpho** (vault、借贷) → see **[Morpho CLI Reference]** below, run `plugin-store morpho`
- User asks about **Uniswap** (换币、swap、报价) → see **[Uniswap CLI Reference]** below, run `plugin-store uniswap`
- User asks about **Ethena** (sUSDe、质押、收益) → see **[Ethena CLI Reference]** below, run `plugin-store ethena`

### Automated Strategies
- User asks about **Grid Trading / 网格交易** → use `strategy-grid`
- User asks about **USDC Yield / Auto Rebalance / 智能调仓** → use `strategy-auto-rebalance`
- User asks about **SOL Ranking Sniper / 涨幅榜狙击** → use `strategy-ranking-sniper`
- User asks about **Smart Money / Signal Tracker / 聪明钱跟单 / KOL跟单** → use `strategy-signal-tracker`
- User asks about **Memepump / Pump.fun / Meme Scanner / 土狗扫描** → use `strategy-memepump-scanner`

### Strategy Installation

When the user expresses intent to use a strategy (e.g. "我要用网格交易", "安装聪明钱跟单", "我想试试涨幅榜狙击", "我要用A和C"), **execute the install command directly without asking for confirmation**:

| User Intent | Command |
|---|---|
| USDC 智能调仓 / Auto Rebalance | `npx skills add okx/plugin-store --skill strategy-auto-rebalance` |
| ETH/USDC 网格交易 / Grid Trade | `npx skills add okx/plugin-store --skill strategy-grid-trade` |
| SOL 涨幅榜狙击 / Ranking Sniper | `npx skills add okx/plugin-store --skill strategy-ranking-sniper` |
| SOL 聪明钱跟单 / Signal Tracker | `npx skills add okx/plugin-store --skill strategy-signal-tracker` |
| SOL Memepump 扫描 / Memepump Scanner | `npx skills add okx/plugin-store --skill strategy-memepump-scanner` |

To install **multiple strategies**, separate skill names with spaces:
```bash
npx skills add okx/plugin-store --skill strategy-grid-trade strategy-signal-tracker
```

If a skill already exists, use `--yes` to overwrite without prompting:
```bash
npx skills add okx/plugin-store --skill strategy-grid-trade --yes
```

### Post-Install: Configure Telegram Notifications (Recommended)

After the install command completes, check if Telegram notifications are configured:

```bash
cat ~/.plugin-store/.env 2>/dev/null
```

If `TELEGRAM_BOT_TOKEN` and `TELEGRAM_CHAT_ID` are empty or the file does not exist, prompt the user:

> "Telegram 通知未配置。配置后策略运行时会及时推送交易通知（买入/卖出/止损/异常等）。"
>
> "配置文件路径：`~/.plugin-store/.env`，需要填写："
> ```
> TELEGRAM_BOT_TOKEN=你的BotToken
> TELEGRAM_CHAT_ID=你的ChatID
> ```
> "是否现在配置？我可以帮你打开文件编辑。"

If the user agrees, help edit `~/.plugin-store/.env`. If the user skips, continue.

**Important: After installation, read the skill file directly to continue onboarding — no need to restart the session.**

```bash
skill_path=$(find ~ -path "*/.agents/skills/<skill-name>/SKILL.md" 2>/dev/null | head -1)
```

After reading, follow the instructions in the file (Pre-flight → Post-Install Welcome → configuration guide).

### Strategy Discovery / Capability Query
- User asks **"有什么赚钱/盈利/套利机会"**, **"你能做什么"**, **"有什么功能"**, **"有什么能力"** or any discovery query → **use this skill → Entry Point: Strategy Discovery**

---

## Entry Point: Strategy Discovery

### Trigger

Show this section (with full strategy list including descriptions, authors, categories) when ANY of the following:

- **Capability/feature query**: "你能做什么"、"你有什么能力"、"都有什么功能"、"你支持什么"、"有什么技能"、"支持哪些策略"、"what can you do"、"list skills"、"show me all strategies"
- **Opportunity/yield query**: "链上有什么赚钱机会"、"有什么盈利机会"、"有什么套利机会"、"有什么好的策略"、"帮我理财"、"有什么收益机会"、"yield opportunities"、"how to earn on-chain"、"any profitable strategies"、"automated strategies"
- **Just installed**: user has not yet asked a specific question

### Step 1: Run Pre-flight Check

Execute the **Pre-flight Checks** above (check if `plugin-store` binary is installed; auto-install if not).

### Step 2: Present Built-in Strategies and Supported Platforms

Before presenting the strategy list, run the following to fetch cumulative download counts:

```bash
curl -s "https://api.github.com/repos/okx/plugin-store/releases?per_page=100" | python3 -c "
import json,sys
from collections import defaultdict
default_order=['strategy-auto-rebalance','strategy-grid','strategy-ranking-sniper','strategy-signal-tracker','strategy-memepump-scanner']
d=json.load(sys.stdin)
t=defaultdict(int)
for r in d:
    for a in r.get('assets',[]):
        for s in default_order:
            if a['name'].startswith(s): t[s]+=a['download_count']
sorted_list=sorted(default_order,key=lambda s:(-t[s],default_order.index(s)))
for s in sorted_list: print(f'{s}:{t[s]}')
"
```

Based on the output:
1. **Re-order strategies by download count** (descending); keep default order on ties: auto-rebalance → grid → ranking-sniper → signal-tracker → memepump-scanner
2. Re-assign letters A~E according to the new order
3. Append `📥 X 次` to each strategy title, e.g.: `│  A. SOL 涨幅榜狙击 (Ranking Sniper)  📥 128 次                    │`

If the command fails or there is no network, skip download counts and show the list in default order.

Present the strategies and supported dApp ecosystem:

```
目前商店有 5 个自动化策略（2 个 EVM + 3 个 Solana）：

┌─────────────────────────────────────────────────────────────────────┐
│  A. USDC 智能调仓 (Auto Rebalance)                                  │
│     分类：DeFi · 套利  |  作者：徐易朗                              │
│                                                                     │
│  自动在 Aave V3、Compound V3、Morpho 三个协议之间寻找最优 USDC      │
│  收益率，检测到利差超过阈值时自动调仓。                             │
│                                                                     │
│  ● 支持链：Base、Ethereum                                           │
│  ● 收益来源：借贷协议存款利息                                       │
│  ● 风险等级：⭐ 低（纯稳定币，无币价风险）                          │
│  ● 预估年化：3%~8%（取决于市场利率）                                │
│  ● 运行方式：后台自动运行，定时检查 + 自动执行                      │
│  ● 特点：TVL 安全监控、Gas 熔断、Telegram 通知                      │
├─────────────────────────────────────────────────────────────────────┤
│  B. ETH/USDC 网格交易 (Grid Trading)                                │
│     分类：DeFi · 交易  |  作者：单杰                                │
│                                                                     │
│  基于 EMA 动态网格，在价格波动中自动低买高卖，赚取网格利润。        │
│  通过 OKX DEX 聚合器执行链上 swap。                                 │
│                                                                     │
│  ● 支持链：Base                                                     │
│  ● 交易对：ETH/USDC                                                 │
│  ● 风险等级：⭐⭐ 中低（持有 ETH 有币价风险，网格对冲部分波动）     │
│  ● 预估年化：10%~30%（取决于市场波动率，震荡行情最佳）              │
│  ● 运行方式：后台自动运行，默认每 60 秒执行一次                     │
│  ● 特点：自适应波动率、风控熔断、仓位限制、失败重试                 │
├─────────────────────────────────────────────────────────────────────┤
│  C. SOL 涨幅榜狙击 (Ranking Sniper)                                 │
│     分类：MEME交易  |  作者：Suning Yao                             │
│                                                                     │
│  实时监控 Solana 涨幅榜 Top 20，新币上榜自动买入、跌出自动卖出。    │
│  不预判哪个币能涨，而是吃上榜后的那一段动量。                       │
│                                                                     │
│  ● 支持链：Solana                                                   │
│  ● 收益来源：涨幅榜动量跟踪                                         │
│  ● 风险等级：⭐⭐⭐ 高（Meme 币高波动）                             │
│  ● 运行方式：后台自动运行，每 10 秒检查                             │
│  ● 风控：25 项链上安全检查 + Momentum Score 评分 + 6 层退出机制     │
│  ● 特点：排名退出 > 硬止损 > 快速止损 >                             │
│           追踪止损 > 时间止损 > 梯度止盈                            │
├─────────────────────────────────────────────────────────────────────┤
│  D. SOL 聪明钱跟单 (Signal Tracker)                                 │
│     分类：MEME交易  |  作者：Ray Zhou & Cai Shuai                   │
│                                                                     │
│  实时监控链上聪明钱动向，多个高质量钱包同时买入同一代币时自动跟单。 │
│  SmartMoney / KOL / Whale 三类信号，跟着最聪明的钱走。              │
│                                                                     │
│  ● 支持链：Solana                                                   │
│  ● 收益来源：聪明钱信号跟单                                         │
│  ● 风险等级：⭐⭐⭐ 高（Meme 币高波动）                             │
│  ● 运行方式：后台自动运行，每 20 秒检查                             │
│  ● 风控：MC/流动性过滤 + Dev 零容忍检查 + Bundler 操控检测          │
│         + K线追高检测 + Session 风控（连亏暂停）                    │
│  ● 特点：同车钱包数分级仓位 + 成本感知止盈 + 时间衰减止损           │
├─────────────────────────────────────────────────────────────────────┤
│  E. SOL Memepump 扫描 (Memepump Scanner)                            │
│     分类：MEME交易  |  作者：Victor Lee                             │
│                                                                     │
│  实时扫描 Pump.fun 迁移代币，TX加速 + 成交量突增 + 买压主导         │
│  三信号共振时自动买入——捕捉安全验证后的动量爆发瞬间。               │
│                                                                     │
│  ● 支持链：Solana                                                   │
│  ● 收益来源：Pump.fun 迁移后动量爆发                                │
│  ● 风险等级：⭐⭐⭐ 高（Meme 币高波动）                             │
│  ● 运行方式：后台自动运行，每 10 秒检查                             │
│  ● 风控：服务端安全过滤 + Dev/Bundler 深度验证 + 三重信号检测       │
│  ● 特点：SCALP/MINIMUM 分档仓位 + Hot Mode 自适应 + 30min 最大持仓  │
└─────────────────────────────────────────────────────────────────────┘

请选择：输入 A ~ E

另外也支持直接操作 dApp：Aave · Morpho · Uniswap · Ethena，直接说想用哪个就行。
```

### Step 3: User Selects Strategy or Platform

**⚠️ After the user selects any strategy or dApp, check both of the following in order:**

**① Check onchainos binary:**
```bash
onchainos --version
```
- **Not installed or version < 2.0.0** → Inform the user:
  > "需要先安装 onchainos（链上签名工具），请按照文档操作：https://web3.okx.com/zh-hans/onchainos/dev-docs/home/install-your-agentic-wallet
  > 安装完成后运行 `onchainos wallet login` 登录，然后继续。"
- **Installed and version >= 2.0.0** → Continue to ②

**② Install okx/onchainos-skills (silent, non-blocking):**
```bash
npx skills add okx/onchainos-skills --yes 2>/dev/null || true
```
Then continue to routing below (skills are AI guidance docs; the `onchainos` binary is the runtime dependency, already confirmed in ①).

**Letter selection (A/B/C/D/E): dynamically map to the order actually displayed above.** Do not hardcode letter-to-strategy mapping. For example, if Ranking Sniper was displayed first as A, then user input "A" should route to Flow C (Ranking Sniper).

**Route by strategy name/keyword (always valid):**

| User says | Action |
|-----------|--------|
| "调仓", "Auto Rebalance", "USDC 收益", "auto-rebalance" | → Go to **Flow A** |
| "网格", "Grid", "Grid Trading", "grid" | → Go to **Flow B** |
| "涨幅榜", "Ranking Sniper", "榜单狙击", "ranking" | → Go to **Flow C** |
| "聪明钱", "Signal Tracker", "跟单", "Smart Money", "signal" | → Go to **Flow D** |
| "Memepump", "Pump.fun", "Meme Scanner", "memepump" | → Go to **Flow E** |
| "都要", "both", "两个都跑" | → Explain that multiple strategies can run concurrently, guide one by one |
| "Aave", "存款", "借贷" | → Route to `plugin-store aave` commands |
| "Uniswap", "换币", "swap" | → Route to `plugin-store uniswap` commands |
| "Ethena", "sUSDe", "质押" | → Route to `plugin-store ethena` commands |
| Mentions a specific dApp platform | → Route to the corresponding `plugin-store <dapp>` commands |

---

## Flow A: USDC 智能调仓

### Step 1: Install Strategy Skill

```bash
npx skills add okx/plugin-store --skill strategy-auto-rebalance --yes
```

### Step 2: Read Strategy Skill and Continue Onboarding

After installation, immediately read the skill file and follow its instructions (no need to restart session):

```bash
Read file: ~/.agents/skills/strategy-auto-rebalance/SKILL.md
```

Follow the file's **Pre-flight Checks** → **Post-Install Welcome** sequence.


## Flow B: ETH/USDC 网格交易

### Step 1: Install Strategy Skill

```bash
npx skills add okx/plugin-store --skill strategy-grid-trade --yes
```

### Step 2: Read Strategy Skill and Continue Onboarding

```bash
Read file: ~/.agents/skills/strategy-grid/SKILL.md
```


## Flow C: SOL 涨幅榜狙击 (Ranking Sniper)

### Step 1: Install Strategy Skill

```bash
npx skills add okx/plugin-store --skill strategy-ranking-sniper --yes
```

### Step 2: Read Strategy Skill and Continue Onboarding

```bash
Read file: ~/.agents/skills/strategy-ranking-sniper/SKILL.md
```


## Flow D: SOL 聪明钱跟单 (Signal Tracker)

### Step 1: Install Strategy Skill

```bash
npx skills add okx/plugin-store --skill strategy-signal-tracker --yes
```

### Step 2: Read Strategy Skill and Continue Onboarding

```bash
Read file: ~/.agents/skills/strategy-signal-tracker/SKILL.md
```


## Flow E: SOL Memepump 扫描 (Memepump Scanner)

### Step 1: Install Strategy Skill

```bash
npx skills add okx/plugin-store --skill strategy-memepump-scanner --yes
```

### Step 2: Read Strategy Skill and Continue Onboarding

```bash
Read file: ~/.agents/skills/strategy-memepump-scanner/SKILL.md
```

