Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/okx/plugin-store/market-structure-analyzernpx skills add okx/plugin-store --skill market-structure-analyzergit clone --depth 1 https://github.com/okx/plugin-storeWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00247 | $0.04859 |
| Opus 5 | $0.00123 | $0.02429 |
| Sonnet 5 | $0.00049 | $0.00972 |
| Haiku 4.5 | $0.00025 | $0.00486 |
Grade A, and why
market-structure-analyzer scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
- **Subprocess calls**: `subprocess.run()` with `capture_output=True, text=True, timeout=15` How it starts
The opening of the file, as written. The whole thing — 332 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Market Structure Analyzer v3.0
You are a crypto market-structure research agent. Fetch, analyze, and present advanced derivatives, options, on-chain, smart money, and macro-sentiment indicators. Data flows through three layers:
- OKX CeFi CLI (
okx market) — primary source for all CEX derivatives + price data - OnchainOS CLI (
onchainos) — on-chain smart money signals + DEX hot tokens - Direct HTTP — options chain (gamma wall, skew) + external macro APIs
Quick Start
1. Determine Scope
- Which tokens? Default to BTC if unspecified. Always include BTC as baseline.
- Which categories? Default to all. User might only want derivatives or macro.
- How deep? Quick scan (chat only) or full report (chat + live dashboard).
2. Launch Live Dashboard (recommended)
cd <skill_dir> && python3 msa_server.py
Opens live dashboard at http://localhost:8420 with:
- Interactive K-line candlestick chart (TradingView Lightweight Charts v4)
- Bollinger Bands overlay, RSI pane, MACD pane
- Timeframe selector: 5m / 15m / 1H / 4H / 1D
- Token selector: BTC / ETH / SOL / BNB / DOGE / AVAX / ARB / XRP / LINK / PEPE
- 12-signal composite score with auto-refresh
- Smart Money flow + DEX Hot Tokens panels (OnchainOS)
- All derivatives + macro panels auto-updating
Background threads handle polling:
- Structure indicators: every 60s
- Candle + TA data: every 30s
- Macro + on-chain: every 60s
3. CLI-Only Mode (backward compatible)
cd <skill_dir> && python3 scripts/fetch_market_data.py BTC ETH SOL 2>/dev/null
Outputs JSON to stdout. Works exactly as before, now powered by OKX CLI.
4. Analyze & Present
A) Chat Analysis — always. Use this structure:
## [TOKEN] Market Structure Report — [Date]
### Derivatives Positioning
[2-3 sentences: funding rate direction + trend, OI magnitude + delta, basis contango/backwardation]
Key signal: [single most important takeaway]
### Options Flow (Tier 1 only)
[2-3 sentences: gamma wall location + interpretation, 25-delta skew direction, ATM IV level, butterfly spread]
Key signal: [single most important takeaway]
### On-Chain (MVRV + Realized Price)
[2-3 sentences: MVRV zone, realized price vs market price, 30d MVRV trend]
Key signal: [single most important takeaway]
### Smart Money Flow (OnchainOS)
[2-3 sentences: net buy/sell across ETH/SOL/Base, whale vs smart money flow, top movers]
Key signal: [single most important takeaway — e.g. "whales aggressively accumulating" or "smart money rotating out"]
### DEX Hot Tokens
[1-2 sentences: what's trending on-chain, DEX volume concentration, any correlation with CEX structure]
### Market Microstructure
[2-3 sentences: taker buy/sell aggression, long/short ratio, liquidation pressure + bias]
Key signal: [single most important takeaway]
### Macro Context
[2-3 sentences: Fear/Greed level + trend, BTC dominance, stablecoin dry powder, market cap change]
Key signal: [single most important takeaway]
### Composite Score
[Score from -100 to +100, label (BULLISH/LEAN BULLISH/NEUTRAL/LEAN BEARISH/BEARISH), breakdown of all 12 contributing signals with individual weights]
### Synthesis
[3-5 sentences combining ALL signals — derivatives, options, on-chain, smart money, DEX activity, and macro. Be opinionated but transparent. If signals conflict, say so.]
### Data Availability
[X/Y indicators available. List any unavailable sources.]
What ships with it
14 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- .claude-plugin/plugin.json 728 B
- .gitignore 43 B
- assets/dashboard_template.html 29 KB
- config.py 2.2 KB runs code
- dashboard.html 77 KB
- LICENSE 1.0 KB
- msa_server.py 22 KB runs code
- plugin.yaml 695 B
- README.md 2.4 KB
- references/data-sources.md 8.3 KB
- requirements.txt 82 B
- scripts/fetch_market_data.py 50 KB runs code
- SKILL_SUMMARY.md 1.7 KB
- SUMMARY.md 1.7 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 332 lines · 247 tokens per session scan A 641ed84f1fcb
market-structure-analyzer is a skill published in the GitHub repository okx/plugin-store (11 stars, last pushed 1mo ago), licensed MIT. It adds 247 tokens to every session and 4,859 once invoked, about $0.0012 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
tres-data-collection-commit
Trigger on-chain data collection (a "Commit") in Tres Finance for wallets that have already been onboarded. Use this skill whenever the user wants to collect data, pull balances, sync wallets, refresh on-chain data, run a commit, trigger a commit, or "collect" anything in Tres. This is the second step of the Tres…
ansem-crypto
Use when evaluating crypto narratives, attention rotation, memecoin cycles, Solana-style ecosystem momentum, social distribution, and reflexive retail flows in an Ansem-style crypto market framework.
arthur-hayes-liquidity
Use when evaluating crypto markets through an Arthur Hayes-style liquidity lens: dollar liquidity, funding, risk appetite, cycle psychology, and macro-driven crypto positioning.
portfolio
Cross-chain DeFi portfolio discovery, rebalancing suggestions, and NEAR Intent construction. Activates when the user pastes a wallet address or asks about yield/positions/rebalancing. Bootstraps a per-user "portfolio" project, aggregates positions across all the user's addresses inside one project, and offers a…
bridge
Cross-chain token transfers using Wormhole and CCTP.
bankr
AI-powered crypto trading via natural language through Bankr API.