okx-cex-auth
Use this skill when the user wants to 'login/log in/sign in', 'authenticate', 'authorize',…
Automatically monitors OKX Flash Earn, Fixed Earn and Flexible Earn opportunities, sends push notifications, and guides subscription. 自动监控 OKX 闪赚、定期和活期赚币机会,推送通知并引导申购。Use when user says: 有闪赚通知我, 监控赚币, monitor earn, notify me about earn, 定时检查理财, 执行 earn-hunter 扫描, earn-hunter
$ npx -y skills add okx/agent-skills --skill earn-hunter --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/earn-hunterContext preview
The summary Claude sees to decide when to auto-load this skill.
Automatically monitors OKX Flash Earn, Fixed Earn and Flexible Earn opportunities, sends push notifications, and guides subscription. 自动监控 OKX 闪赚、定期和活期赚币机会,推送通知并引导申购。Use when user says: 有闪赚通知我, 监控赚币, monitor earn, notify me about earn, 定时检查理财, 执行 earn-hunter 扫描, earn-hunter
name: earn-hunter
description: "Automatically monitors OKX Flash Earn, Fixed Earn and Flexible Earn opportunities, sends push notifications, and guides subscription. 自动监控 OKX 闪赚、定期和活期赚币机会,推送通知并引导申购。Use when user says: 有闪赚通知我, 监控赚币, monitor earn, notify me about earn, 定时检查理财, 执行 earn-hunter 扫描, earn-hunter scan, 活期年化高了通知我, 监控活期."
license: MIT
metadata:
author: okx
version: "1.4.8"
homepage: "https://www.okx.com"
agent:
requires:
bins: ["okx"]
install:
- id: okx-cli
kind: node
package: "@okx_ai/okx-trade-cli@1.4.8"
bins: ["okx"]
label: "Install okx CLI (npm)"Automated monitor for OKX Flash Earn, Fixed Earn, and Flexible Earn (Simple Earn) opportunities.
**`{baseDir}`** = the directory containing this SKILL.md file. All relative paths (references/, templates/, config/) are resolved from here.
1. Verify `okx` CLI installed: `which okx`. If missing, install via `npm install -g @okx_ai/okx-trade-cli`. On OpenClaw, also verify the in-session `cron` tool is available in the agent tool list (used for scheduling — not the `openclaw` CLI). 2. Check optional dependent skills:
okx skill list --json
Optional skills (not required for scanning/notifications):
If either is missing, attempt to install but **do not block** if installation fails:
okx skill add okx-cex-earn okx skill add okx-cex-auth
"⚠ `{skill_name}` 安装失败,扫描和通知功能不受影响。申购引导和认证恢复需要该 skill,后续可手动安装。"
4. Auth mode detection — run **both**, first match wins:
5. Init config and state:
cat > ~/.okx/earn-hunter/env.snapshot << SNAP
# auto-generated by earn-hunter activation — $(date -Iseconds)
OKX_BIN=$(command -v okx)
NODE_BIN=$(command -v node)
JQ_BIN=$(command -v jq)
ACTIVATION_PATH=$PATH
SNAPThe scan script sources this file to resolve tool paths even under cron's minimal `PATH=/usr/bin:/bin`.
Config/state/platform JSON read-write done by the agent is only for activation/config management. The recurring **scan itself is performed entirely by `scripts/scan.sh`** (shell + jq) — `jq` is required for scanning. Verify with `which jq`; if missing, install (`brew install jq` / `apt-get install jq`).
Three independent dimensions: **platform** (where the agent runs), **scheduler** (what triggers scans), **notification channel** (where alerts go).
**First run (no `platform.json` exists):**
1. Probe environment clues:
2. Present detection result and **ask user to confirm**:
3. Initialize platform config:
4. Result written to `~/.okx/earn-hunter/platform.json`, subsequent runs skip detection.
**Subsequent runs (platform.json exists):** Read `~/.okx/earn-hunter/platform.json` and extract the `.platform` field (returns `"openclaw"`, `"claude-code"`, `"hermes"`, or `"generic"`).
**No scheduler available on detected platform** (only applies to platforms that should have one but don't) → error: "当前客户端不支持定时任务,请升级到最新版本。" **Generic platform** → no automatic scheduler. Inform: "当前平台不支持自动调度,你可以手动说'执行 earn-hunter 扫描'来触发。"
| File | Scope | Content | |---|---|---| | `config.json` | Shared | Scan scope (flash/fixed/flexible), currencies, APY thresholds, terms, language, verboseLog | | `platform.json` | Platform-specific | Scheduler type/interval, notification channel, TG/Lark credentials | | `state.json` | Shared | Dedup state |
Core config (`config.json`) is identical across platforms. Platform config (`platform.json`) differs — the `scheduler.type` field determines how scans
A collection of AI agent skills for OKX exchange operations. Each skill is a self-contained Markdown file with YAML frontmatter that tells an AI agent when to activate and how to execute tasks via the okx CLI.
Use this skill when the user wants to 'login/log in/sign in', 'authenticate', 'authorize',…
Manage Grid bots (spot/contract/coin-margined) and DCA Martingale bots (Spot DCA 现货马丁 /…
Manages OKX Simple Earn (flexible savings/lending), Flash Earn, On-chain Earn (staking/DeFi),…
Use this skill when the user asks for: price of any asset, ticker, order book, candles,…
This skill should be used when the user asks about 'account balance', 'how much USDT do I…
Use this skill when the user asks to: 'find a trading skill', 'search for skills', 'install a…