@vike-io/cli 0.7.3 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +30 -8
- package/package.json +2 -2
- package/{SKILL.md → skills/vike/SKILL.md} +79 -1
- package/skills/vike-core/SKILL.md +1 -1
- package/skills/vike-hl-position-match/SKILL.md +86 -0
- package/skills/vike-router/SKILL.md +1 -0
- package/skills/vike-wallet-trace/SKILL.md +10 -0
- package/skills.sh.json +101 -0
- package/src/auth.js +1 -1
- package/src/commands/auth.js +1 -1
- package/src/commands/init.js +1 -1
- package/src/commands/install.js +128 -0
- package/src/commands/perp.js +24 -0
- package/src/index.js +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes are documented here. Entries follow [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
4
4
|
|
|
5
|
+
## 0.8.0 — HL share-card reverse-lookup + multi-IDE installer + SKILL.md hardening
|
|
6
|
+
|
|
7
|
+
- **`vike perp find-position`** (new command, alias for the new `hl_position_match` MCP tool). Reverse-lookup a Hyperliquid open position from share-card details: paste `coin + side + leverage + entry` and get the wallet(s) holding a matching open position back. Walks widening entry tolerance bands (tight 0.05% → loose 0.5% → fallback 1.0%) with leverage tolerance ±0.5; tie-break by closest mark price. Returns `tolerance_used` so callers can flag low-confidence matches. Backed by `position_snapshots_latest` — near-real-time, no new schema.
|
|
8
|
+
- **`vike install`** (new command). One-shot multi-IDE skill drop: `--claude` writes `~/.claude/skills/vike/SKILL.md`; `--cursor` / `--copilot` / `--agents` update marker-fenced blocks in `.cursorrules` / `.github/copilot-instructions.md` / `AGENTS.md` (idempotent — re-running replaces the block, never clobbers surrounding user content). `--all` writes every target at once.
|
|
9
|
+
- **Root `SKILL.md` hardening**: added a "Critical Rules" block (8 hard rules agents most often violate), per-service "Historical Data Availability" tables (transfers per chain, prices per venue, HL perps, CEX perps, Polymarket — so agents stop over-promising data we don't have), and UTM-tagged signup links for attribution.
|
|
10
|
+
- New skill playbook: `vike-hl-position-match`. Total: 40 skills (was 39), 35 MCP tools (was 34).
|
|
11
|
+
|
|
5
12
|
## 0.7.3 — agent-discoverable SKILL.md + auto GH releases
|
|
6
13
|
|
|
7
14
|
- **Root-level `SKILL.md`** — single agent-discoverable entry point covering all 34 MCP tools, auth flow, intent → tool routing table, and per-service tool reference. Ships in the npm package so installing `@vike-io/cli` also installs the skill. Existing per-tool playbooks under `skills/` are unchanged and cross-linked from the root.
|
package/README.md
CHANGED
|
@@ -5,13 +5,26 @@
|
|
|
5
5
|
[](https://www.npmjs.com/package/@vike-io/cli)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
[](https://nodejs.org)
|
|
8
|
+
[](https://skills.sh/vike-io/vike-cli)
|
|
8
9
|
|
|
9
10
|
> **Command-line interface for the [vike.io](https://vike.io) API.** On-chain analytics, perpetuals, options flow, and prediction-market data across 11 chains — designed to be driven by AI agents (Claude Code, OpenClaw) as well as humans.
|
|
10
11
|
|
|
11
12
|
## Install
|
|
12
13
|
|
|
13
14
|
```bash
|
|
15
|
+
# Standard install — gives you the `vike` binary
|
|
14
16
|
npm install -g @vike-io/cli
|
|
17
|
+
|
|
18
|
+
# OR install just the skill playbooks into your AI agent (Claude Code, Cursor,
|
|
19
|
+
# Codex, Copilot, OpenCode and 50+ more — auto-detected):
|
|
20
|
+
npx skills add vike-io/vike-cli
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
After `npm install`, you can also drop the skill into AI agents from the CLI itself:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
vike install --all # writes to ~/.claude/skills/vike/, .cursorrules,
|
|
27
|
+
# .github/copilot-instructions.md, AGENTS.md
|
|
15
28
|
```
|
|
16
29
|
|
|
17
30
|
## Quick start
|
|
@@ -22,7 +35,7 @@ vike doctor # confirm everything works
|
|
|
22
35
|
vike token search BTC # your first query
|
|
23
36
|
```
|
|
24
37
|
|
|
25
|
-
Get an API key at [vike.io/api
|
|
38
|
+
Get an API key at [vike.io/account?tab=api-keys](https://vike.io/account?tab=api-keys).
|
|
26
39
|
|
|
27
40
|
## Commands at a glance
|
|
28
41
|
|
|
@@ -50,15 +63,24 @@ Run `vike schema --pretty` for the full command + flag reference.
|
|
|
50
63
|
|
|
51
64
|
## For AI agents
|
|
52
65
|
|
|
53
|
-
This package ships **skill playbooks** under [`skills/`](skills/) — markdown files designed to be loaded by AI coding agents (Claude Code,
|
|
66
|
+
This package ships **41 skill playbooks** under [`skills/`](skills/) — markdown files designed to be loaded by AI coding agents (Claude Code, Cursor, Codex, Copilot, OpenCode, …) so they know when and how to invoke each command. They are grouped in [`skills.sh.json`](skills.sh.json) by domain (Tokens / Wallets / CEX perps / Hyperliquid / Options / Polymarket / Alerts / Web research).
|
|
54
67
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
-
|
|
68
|
+
Three install paths, pick whichever fits your stack:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# 1. Install just the skill files for your agent (no Node binary needed):
|
|
72
|
+
npx skills add vike-io/vike-cli # auto-detects the agent
|
|
73
|
+
npx skills add vike-io/vike-cli -a claude-code # explicit target
|
|
74
|
+
npx skills add vike-io/vike-cli --list # list all 41 first
|
|
75
|
+
|
|
76
|
+
# 2. Use the CLI itself to install the umbrella skill into multiple agents:
|
|
77
|
+
vike install --claude --cursor --copilot --agents
|
|
78
|
+
|
|
79
|
+
# 3. Manual: point your agent at the skills/ folder of this npm package
|
|
80
|
+
# (lives at node_modules/@vike-io/cli/skills/ after install).
|
|
81
|
+
```
|
|
60
82
|
|
|
61
|
-
|
|
83
|
+
Entry-point skill: `vike` (the umbrella) — auto-routes the user's question to the right specialized skill below. Bypass it and pick a specialized one if you know exactly which you need (e.g. `vike-hl-position-match` for reverse-lookup of an HL share card).
|
|
62
84
|
|
|
63
85
|
## Auth
|
|
64
86
|
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.8.1",
|
|
7
7
|
"description": "AI-agent CLI for vike.io on-chain analytics, perps, options, and prediction markets across 11 chains",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"main": "src/index.js",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"src/**/*.js",
|
|
15
15
|
"scripts/postinstall.js",
|
|
16
16
|
"skills/**",
|
|
17
|
-
"
|
|
17
|
+
"skills.sh.json",
|
|
18
18
|
"CHANGELOG.md"
|
|
19
19
|
],
|
|
20
20
|
"scripts": {
|
|
@@ -12,6 +12,21 @@ Answer on-chain questions using the vike.io platform: 11 chains (ETH, BSC, Base,
|
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
|
+
## Critical Rules
|
|
16
|
+
|
|
17
|
+
Hard rules — agents that violate these produce wrong answers. Read once, apply always.
|
|
18
|
+
|
|
19
|
+
1. **Addresses are always full 0x-hex (42 chars).** Never truncate when querying. Never display truncated when the user asks for the address — they'll copy-paste it.
|
|
20
|
+
2. **Symbols are case-insensitive in queries, but display as the user typed.** `btc` and `BTC` both resolve; echo back what they wrote.
|
|
21
|
+
3. **Time windows are UTC, day-boundaries cut at 00:00 UTC.** "Today" = since 00:00 UTC today, not local-time today.
|
|
22
|
+
4. **Default page size is 50, max 500.** Don't request `--limit 10000` to "get everything" — paginate or use a screener tool instead.
|
|
23
|
+
5. **Refresh cadence varies by tool.** Wallet PnL, HL positions: ≤2 min. Transfer-derived metrics: 5 min. Token price history: 1 min. Always assume <5 min unless a tool says otherwise.
|
|
24
|
+
6. **USD amounts are floats in dollars.** `--min-usd 10000` = ten thousand dollars, not micro-USD.
|
|
25
|
+
7. **`--json` flag is always available** on CLI commands and gives stable machine-readable output. Default (human) format may change; `--json` will not.
|
|
26
|
+
8. **Resolve a token before asking transfer/holder questions.** `token_search` → take the canonical address → pass to `token_transfers` / `token_holders`. Symbol-only queries lose precision on tickers that collide across chains (e.g. FUN, BEAM, USDC).
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
15
30
|
## Step 1: Confirm Authentication
|
|
16
31
|
|
|
17
32
|
Follow this decision tree **before every session**. Do not skip to Step 2 until auth is confirmed.
|
|
@@ -32,7 +47,7 @@ If the user has no API key yet, tell them:
|
|
|
32
47
|
|
|
33
48
|
> **To use vike, you'll need a free API key:**
|
|
34
49
|
>
|
|
35
|
-
> 1. Visit https://vike.io/api
|
|
50
|
+
> 1. Visit https://vike.io/account?tab=api-keys&utm_source=skill&utm_medium=ai&utm_campaign=cli_skill, sign in, and copy a key (starts with `vk_`).
|
|
36
51
|
> 2. Save it: `vike login --api-key vk_...` (or `export VIKE_API_KEY=vk_...`).
|
|
37
52
|
> 3. Verify: `vike doctor`.
|
|
38
53
|
>
|
|
@@ -68,6 +83,7 @@ X-API-KEY: vk_...
|
|
|
68
83
|
| Funding rates across CEX perps (Binance/Bybit/OKX/Aster/HL) | **CEX Perps** | `vike perp funding` / `perp_funding` |
|
|
69
84
|
| Price spreads of same symbol across CEX perp venues | **CEX Perps** | `vike perp spreads` / `perp_spreads` |
|
|
70
85
|
| Top Hyperliquid perp traders by PnL / volume | **HL Perps** | `vike perp top-traders` / `hl_perp_top_traders` |
|
|
86
|
+
| Reverse-lookup an HL share card → which wallet holds it | **HL Perps** | `vike perp find-position` / `hl_position_match` |
|
|
71
87
|
| Deribit options flow, put/call ratios, IV | **Options** | `vike options flow` / `options_flow` |
|
|
72
88
|
| Active Polymarket markets, volume, odds | **Polymarket** | `vike polymarket markets` / `polymarket_markets` |
|
|
73
89
|
| Single Polymarket market detail | **Polymarket** | `vike polymarket detail` / `polymarket_market_detail` |
|
|
@@ -195,6 +211,7 @@ On-chain perps data: snapshots, fills, ledger, funding, attribution.
|
|
|
195
211
|
| Tool | Description | Skill |
|
|
196
212
|
|---|---|---|
|
|
197
213
|
| `hl_perp_top_traders` | Top HL traders by PnL/volume over a window | [vike-hl-top-traders](skills/vike-hl-top-traders/SKILL.md), [vike-hl-trader-profile](skills/vike-hl-trader-profile/SKILL.md) |
|
|
214
|
+
| `hl_position_match` | Reverse-lookup: share-card details (coin/side/lev/entry) → wallet holding that open position | [vike-hl-position-match](skills/vike-hl-position-match/SKILL.md) |
|
|
198
215
|
|
|
199
216
|
For per-symbol HL screening / individual trader deep-dive, use [vike-perp-screener](skills/vike-perp-screener/SKILL.md) and [vike-hl-trader-profile](skills/vike-hl-trader-profile/SKILL.md).
|
|
200
217
|
|
|
@@ -260,6 +277,67 @@ General web search + AI-summarized fetch for off-chain context (news, docs, soci
|
|
|
260
277
|
|
|
261
278
|
---
|
|
262
279
|
|
|
280
|
+
## Historical data availability
|
|
281
|
+
|
|
282
|
+
Coverage windows per dataset. Don't ask for data older than the window — the tool will return empty or 503.
|
|
283
|
+
|
|
284
|
+
### Transfers & on-chain (per chain)
|
|
285
|
+
|
|
286
|
+
| Chain | Earliest block / date | Notes |
|
|
287
|
+
|---|---|---|
|
|
288
|
+
| Ethereum | 2018-01 (block ~4.85M) | Full history; ETH + ERC-20 |
|
|
289
|
+
| BSC | 2021-01 | Full history; BNB + BEP-20 |
|
|
290
|
+
| Base | 2023-08 (chain launch) | Full history |
|
|
291
|
+
| Arbitrum | 2024-Q3 onward | Backfill in progress; pre-2024 sparse |
|
|
292
|
+
| HyperEVM | 2025-Q1 (chain launch) | Full history |
|
|
293
|
+
| Bitcoin | 2024-01 | Recent windows only — full-history backfill not active |
|
|
294
|
+
| Solana | 2026-Q1 onward | Recent only — see `vike-cli` chain-coverage notes |
|
|
295
|
+
| Tron/XMR/ZEC/Dash | 2024 onward | Recent only |
|
|
296
|
+
|
|
297
|
+
### Prices (data_history, spot)
|
|
298
|
+
|
|
299
|
+
| Venue | Earliest | Notes |
|
|
300
|
+
|---|---|---|
|
|
301
|
+
| Binance | 2017-08 | Full minute-level OHLCV |
|
|
302
|
+
| Bybit | 2020-03 | Full minute-level OHLCV |
|
|
303
|
+
| OKX | 2019-04 | Full minute-level OHLCV |
|
|
304
|
+
| Gate | 2017 (CSV) → 2024-05 (CSV ends) | After 2024-05 use API; capped 10k minutes/request |
|
|
305
|
+
| Coinbase | 2015 | Full history (recently added) |
|
|
306
|
+
| KuCoin | 2018 | Full history (recently added) |
|
|
307
|
+
| Pyth | 2023 | On-chain price feed; sparse pre-2023 |
|
|
308
|
+
| Deribit options | 2020 onward | BTC + ETH only |
|
|
309
|
+
|
|
310
|
+
### Hyperliquid perps (hl_perps DB)
|
|
311
|
+
|
|
312
|
+
| Dataset | Window | Notes |
|
|
313
|
+
|---|---|---|
|
|
314
|
+
| Snapshots (positions / equity) | 30 days | TTL — older snapshots dropped |
|
|
315
|
+
| Fills | 30 days | TTL |
|
|
316
|
+
| Ledger (deposits/withdrawals) | 30 days | TTL |
|
|
317
|
+
| Funding payments | 90 days | API-backed since 2026-04-22 |
|
|
318
|
+
| Daily attributed PnL | All-time | `wallet_pnl_attributed_daily` is the long-history view |
|
|
319
|
+
| Daily flows | All-time | `wallet_flows_daily` |
|
|
320
|
+
| Top-trader leaderboards | rolling 24h / 7d / 30d | derived on-the-fly |
|
|
321
|
+
|
|
322
|
+
### CEX perps (data_perp DB)
|
|
323
|
+
|
|
324
|
+
| Dataset | Window |
|
|
325
|
+
|---|---|
|
|
326
|
+
| `tickers_1m` (ticker snapshots) | rolling 24h |
|
|
327
|
+
| Funding rates | 90 days |
|
|
328
|
+
| Trades (ws_trades) | rolling 7-30 days per venue |
|
|
329
|
+
|
|
330
|
+
### Polymarket
|
|
331
|
+
|
|
332
|
+
| Dataset | Window | Notes |
|
|
333
|
+
|---|---|---|
|
|
334
|
+
| Active markets | live | scraper paused 2026-05-24 (CF block); historical snapshots still queryable |
|
|
335
|
+
| Wallet positions | last known snapshot | not real-time until scraper resumes |
|
|
336
|
+
|
|
337
|
+
If your query needs older data than what's listed: say so clearly and offer the nearest in-range window. Don't silently return empty.
|
|
338
|
+
|
|
339
|
+
---
|
|
340
|
+
|
|
263
341
|
## Cost & rate-limit awareness
|
|
264
342
|
|
|
265
343
|
- **Cheap (counts as 1 credit):** `token_search`, `wallet_summary`, `alerts_list`, `wallet_ens`, `perp_funding`.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: vike-hl-position-match
|
|
3
|
+
description: Reverse-lookup a Hyperliquid open position from share-card details (coin + side + leverage + entry price). Use when the user pastes or describes a HL share card and asks "whose card is this?", "find this trader", or "who has a 25x ETH long open at $3,200?". Returns matching wallet(s) ranked by entry-price proximity.
|
|
4
|
+
allowed-tools: Bash(vike:*)
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# vike-hl-position-match
|
|
8
|
+
|
|
9
|
+
Find the wallet(s) holding an open Hyperliquid perp position that match a share card.
|
|
10
|
+
|
|
11
|
+
## Command
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
vike perp find-position
|
|
15
|
+
--coin <SYM> # e.g. BTC, ETH, SOL
|
|
16
|
+
--side long|short
|
|
17
|
+
--leverage <X> # e.g. 25
|
|
18
|
+
--entry <PRICE> # entry price from the card
|
|
19
|
+
[--mark <PRICE>] # current mark price — sharpens tie-break when multiple wallets share entry
|
|
20
|
+
[--limit N] # max matches, default 10, max 50
|
|
21
|
+
[--json]
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## How matching works
|
|
25
|
+
|
|
26
|
+
The tool walks three widening entry-price tolerance bands until it finds at least one match:
|
|
27
|
+
|
|
28
|
+
| Band | Tolerance | When it's used |
|
|
29
|
+
|---|---|---|
|
|
30
|
+
| tight | ±0.05% | First pass — most share cards round-trip exactly |
|
|
31
|
+
| loose | ±0.5% | Fallback if no tight matches |
|
|
32
|
+
| fallback | ±1.0% | Last resort — anything wider is noise |
|
|
33
|
+
|
|
34
|
+
Leverage must be within **±0.5** of the queried value (so `--leverage 5` matches positions at 4.5×–5.5×). Tie-breaking inside a band is by closest live `mark_price` to the queried `--mark` (or to `--entry` if `--mark` is not given).
|
|
35
|
+
|
|
36
|
+
The response includes `tolerance_used` so the caller knows which band matched (`tight` / `loose` / `fallback` / `no_match`).
|
|
37
|
+
|
|
38
|
+
## Common queries
|
|
39
|
+
|
|
40
|
+
| User says | Flags |
|
|
41
|
+
|---|---|
|
|
42
|
+
| "Find this share card: 25x ETH long, entry $3,210" | `--coin ETH --side long --leverage 25 --entry 3210` |
|
|
43
|
+
| "Whose 10x BTC short is open at $58,400? Current mark $57,900" | `--coin BTC --side short --leverage 10 --entry 58400 --mark 57900` |
|
|
44
|
+
| "Top 5 matches for 50x SOL long around $145" | `--coin SOL --side long --leverage 50 --entry 145 --limit 5` |
|
|
45
|
+
|
|
46
|
+
## Output schema
|
|
47
|
+
|
|
48
|
+
```jsonc
|
|
49
|
+
{
|
|
50
|
+
"match_count": 3,
|
|
51
|
+
"tolerance_used": "tight", // tight | loose | fallback | no_match
|
|
52
|
+
"query": { "coin": "ETH", "side": "long", "leverage": 25, "entry_price": 3210, "mark_price_hint": 3215 },
|
|
53
|
+
"matches": [
|
|
54
|
+
{
|
|
55
|
+
"address": "0x...",
|
|
56
|
+
"coin": "ETH", "side": "long",
|
|
57
|
+
"snapshot_ts": 1716700000, // unix seconds — how fresh the snapshot is
|
|
58
|
+
"size_token": 12.5, "size_usd": 40250,
|
|
59
|
+
"entry_price": 3209.8, "mark_price": 3215.3,
|
|
60
|
+
"leverage": 25.0,
|
|
61
|
+
"liquidation_price": 3082.1,
|
|
62
|
+
"unrealized_pnl": 68.75,
|
|
63
|
+
"entry_dist_pct": 0.0062 // |query.entry - match.entry| / query.entry × 100
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Reading the result
|
|
70
|
+
|
|
71
|
+
- **Multiple matches at the exact same entry** (e.g. five wallets long ETH at 3210.00) — popular round-number entries collide. Treat as ambiguous; surface all and let the user disambiguate by size or address. Don't claim "this is the wallet" when `match_count > 1` in the tight band.
|
|
72
|
+
- **`tolerance_used: fallback`** — the closest match is >0.5% off the queried entry. The card might be from a previous fill that's since been added to (size-weighted entry moves on add) or from a different exchange. Treat as low-confidence.
|
|
73
|
+
- **`tolerance_used: no_match`** — the position is closed, the entry was from a margin-changing event, or the wallet was outside our HL coverage. Don't suggest a wallet anyway.
|
|
74
|
+
- **`snapshot_ts`** is the snapshot time of that position row. The pipeline refreshes <5 min behind live; older `snapshot_ts` doesn't mean the position is stale, just that the wallet hasn't transacted since.
|
|
75
|
+
|
|
76
|
+
## Anti-patterns
|
|
77
|
+
|
|
78
|
+
- Don't fabricate matches when the tool returns `match_count: 0`. Say "no open position matches that share card" — closed positions, post-card adds, or non-HL cards all produce empty results.
|
|
79
|
+
- Don't strip the address when displaying — share-card investigations always want the full 0x...40hex (users copy-paste it).
|
|
80
|
+
- Don't infer trader skill from a single share-card match. Use `vike perp top-traders` or `vike wallet summary` for profile context.
|
|
81
|
+
|
|
82
|
+
## Pairs well with
|
|
83
|
+
|
|
84
|
+
- [vike-wallet-summary](../vike-wallet-summary/SKILL.md) — once you have the address, get the trader's HL profile + multi-chain identity.
|
|
85
|
+
- [vike-hl-top-traders](../vike-hl-top-traders/SKILL.md) — check if the matched wallet is on a leaderboard.
|
|
86
|
+
- [vike-wallet-label-provenance](../vike-wallet-label-provenance/SKILL.md) — find out if the wallet is a known CEX/fund/MM rather than a retail trader.
|
|
@@ -22,6 +22,7 @@ Route the user's question to the right `vike-*` skill.
|
|
|
22
22
|
| Perp funding rates / arb opportunities | `vike-perp-funding-arb` |
|
|
23
23
|
| Cross-venue perp price spreads | `vike-perp-spread-arb` |
|
|
24
24
|
| Top Hyperliquid perp traders | `vike-hl-top-traders` |
|
|
25
|
+
| Match an HL share card → wallet (reverse-lookup) | `vike-hl-position-match` |
|
|
25
26
|
| Profile a single HL perp trader | `vike-hl-trader-profile` |
|
|
26
27
|
| HL market overview (vol/OI/funding) | `vike-perp-screener` |
|
|
27
28
|
| Compare a symbol across all perp venues | `vike-cross-venue-perps` |
|
|
@@ -68,6 +68,16 @@ Tool credits = 4 per call (heavier than other graph-less tools). Graph explodes
|
|
|
68
68
|
- Don't depth-5 by default. Graph blows up; results become noise.
|
|
69
69
|
- Don't ignore `min_usd` — without it, dust transfers create false-positive edges.
|
|
70
70
|
|
|
71
|
+
## Visual graph (web UI)
|
|
72
|
+
|
|
73
|
+
When the user wants to *see* the network rather than read JSON, surface the URL:
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
https://vike.io/spot/wallet/<address>
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Tell them to click the **Graph** tab. It renders the same trace data as a force-directed graph (nodes coloured by hop depth, sized by USD volume, animated directional particles on edges). Clicking any non-root node navigates to that wallet's graph. Use this in chat replies when the user says "show me", "visualize", or pastes a wallet address asking for an exploration view — JSON is for downstream pipelines, the URL is for humans.
|
|
80
|
+
|
|
71
81
|
## Pairs well with
|
|
72
82
|
|
|
73
83
|
- `vike labels <addr>` — identify any interesting node
|
package/skills.sh.json
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://skills.sh/schemas/skills.sh.schema.json",
|
|
3
|
+
"notGrouped": "bottom",
|
|
4
|
+
"groupings": [
|
|
5
|
+
{
|
|
6
|
+
"title": "Quick start",
|
|
7
|
+
"description": "Start here. The umbrella skill auto-routes user questions to the right specialized skill below.",
|
|
8
|
+
"skills": [
|
|
9
|
+
"vike",
|
|
10
|
+
"vike-router",
|
|
11
|
+
"vike-core"
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"title": "Tokens",
|
|
16
|
+
"description": "Resolve, screen, and research tokens across 11 chains. Smart-money inflow, holders, recent transfers, OHLCV.",
|
|
17
|
+
"skills": [
|
|
18
|
+
"vike-token-search",
|
|
19
|
+
"vike-token-research",
|
|
20
|
+
"vike-token-transfers",
|
|
21
|
+
"vike-token-holders",
|
|
22
|
+
"vike-token-screener",
|
|
23
|
+
"vike-smart-money-discovery"
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"title": "Wallets",
|
|
28
|
+
"description": "Per-wallet profile, PnL, counterparty graphs, ENS, batch labelling, fund affiliation, DeFi positions.",
|
|
29
|
+
"skills": [
|
|
30
|
+
"vike-wallet-summary",
|
|
31
|
+
"vike-wallet-portfolio",
|
|
32
|
+
"vike-wallet-discover",
|
|
33
|
+
"vike-wallet-transactions",
|
|
34
|
+
"vike-wallet-counterparties",
|
|
35
|
+
"vike-wallet-trace",
|
|
36
|
+
"vike-wallet-compare",
|
|
37
|
+
"vike-wallet-batch",
|
|
38
|
+
"vike-wallet-pnl-history",
|
|
39
|
+
"vike-wallet-balances",
|
|
40
|
+
"vike-wallet-ens",
|
|
41
|
+
"vike-wallet-label-provenance",
|
|
42
|
+
"vike-fund-holdings",
|
|
43
|
+
"vike-defi-positions"
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"title": "CEX perps",
|
|
48
|
+
"description": "Funding-rate arb + cross-venue mark-price spreads across Binance, Bybit, OKX, Aster, Hyperliquid.",
|
|
49
|
+
"skills": [
|
|
50
|
+
"vike-perp-funding-arb",
|
|
51
|
+
"vike-perp-spread-arb",
|
|
52
|
+
"vike-perp-screener",
|
|
53
|
+
"vike-cross-venue-perps"
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"title": "Hyperliquid perps",
|
|
58
|
+
"description": "Deep on-chain HL coverage: top traders, full trader profiles, and share-card reverse-lookup.",
|
|
59
|
+
"skills": [
|
|
60
|
+
"vike-hl-top-traders",
|
|
61
|
+
"vike-hl-trader-profile",
|
|
62
|
+
"vike-hl-position-match"
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"title": "Options",
|
|
67
|
+
"description": "Deribit BTC/ETH options flow + put-call ratios.",
|
|
68
|
+
"skills": [
|
|
69
|
+
"vike-options-flow"
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"title": "Polymarket",
|
|
74
|
+
"description": "Prediction-market discovery, single-market deep-dives, trader profiles, and smart-money leaderboards.",
|
|
75
|
+
"skills": [
|
|
76
|
+
"vike-polymarket-markets",
|
|
77
|
+
"vike-polymarket-market-detail",
|
|
78
|
+
"vike-polymarket-trader",
|
|
79
|
+
"vike-polymarket-smart-money",
|
|
80
|
+
"vike-polymarket-screener"
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"title": "Alerts",
|
|
85
|
+
"description": "Create, list, edit, delete price + flow alerts; register HTTPS webhooks with HMAC delivery.",
|
|
86
|
+
"skills": [
|
|
87
|
+
"vike-alerts-setup",
|
|
88
|
+
"vike-alerts-webhook"
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"title": "Web research",
|
|
93
|
+
"description": "Off-chain context: general web search and AI-summarized URL fetch for news, docs, and social.",
|
|
94
|
+
"skills": [
|
|
95
|
+
"vike-web-search",
|
|
96
|
+
"vike-web-fetch",
|
|
97
|
+
"vike-web-research"
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
}
|
package/src/auth.js
CHANGED
|
@@ -48,7 +48,7 @@ export function requireApiKey() {
|
|
|
48
48
|
if (!key) {
|
|
49
49
|
throw new Error(
|
|
50
50
|
'No API key. Run `vike login --api-key <key>` or set VIKE_API_KEY. ' +
|
|
51
|
-
'Get a key at https://vike.io/api
|
|
51
|
+
'Get a key at https://vike.io/account?tab=api-keys',
|
|
52
52
|
);
|
|
53
53
|
}
|
|
54
54
|
return key;
|
package/src/commands/auth.js
CHANGED
|
@@ -8,7 +8,7 @@ export function registerLogin(program) {
|
|
|
8
8
|
.option('--api-key <key>', 'API key (vk_...)')
|
|
9
9
|
.action(async (opts) => {
|
|
10
10
|
if (!opts.apiKey) {
|
|
11
|
-
console.error('Pass --api-key <vk_...>. Get a key at https://vike.io/api
|
|
11
|
+
console.error('Pass --api-key <vk_...>. Get a key at https://vike.io/account?tab=api-keys');
|
|
12
12
|
process.exitCode = 1;
|
|
13
13
|
return;
|
|
14
14
|
}
|
package/src/commands/init.js
CHANGED
|
@@ -15,7 +15,7 @@ export function registerInit(program) {
|
|
|
15
15
|
if (!key) {
|
|
16
16
|
const rl = createInterface({ input: stdin, output: stdout });
|
|
17
17
|
try {
|
|
18
|
-
console.log('Get your API key at https://vike.io/api
|
|
18
|
+
console.log('Get your API key at https://vike.io/account?tab=api-keys');
|
|
19
19
|
key = (await rl.question('Paste your API key (vk_...): ')).trim();
|
|
20
20
|
} finally {
|
|
21
21
|
rl.close();
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
// `vike install` — copy SKILL.md into the agent-discoverable locations for
|
|
2
|
+
// supported IDEs/agents so the skill loads without the user having to wire
|
|
3
|
+
// it up manually.
|
|
4
|
+
//
|
|
5
|
+
// Targets:
|
|
6
|
+
// --claude → ~/.claude/skills/vike/SKILL.md
|
|
7
|
+
// --cursor → ./.cursorrules (project root, joined under "## vike skill" header)
|
|
8
|
+
// --copilot → ./.github/copilot-instructions.md (same join pattern)
|
|
9
|
+
// --agents → ./AGENTS.md (same join pattern, project-root convention)
|
|
10
|
+
// --all → all of the above
|
|
11
|
+
//
|
|
12
|
+
// Behaviour: idempotent. For files we don't own (project-root markdown), we
|
|
13
|
+
// detect a fenced "<!-- vike-skill:begin -->...<!-- vike-skill:end -->" block
|
|
14
|
+
// and replace just that block — never clobber the rest of the user's file.
|
|
15
|
+
|
|
16
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync, statSync } from 'node:fs';
|
|
17
|
+
import { homedir } from 'node:os';
|
|
18
|
+
import { join, dirname, resolve } from 'node:path';
|
|
19
|
+
import { fileURLToPath } from 'node:url';
|
|
20
|
+
|
|
21
|
+
const BEGIN = '<!-- vike-skill:begin -->';
|
|
22
|
+
const END = '<!-- vike-skill:end -->';
|
|
23
|
+
|
|
24
|
+
function readSkillSource() {
|
|
25
|
+
// Umbrella SKILL.md lives at skills/vike/SKILL.md (moved from the repo
|
|
26
|
+
// root so the skills-CLI auto-discovers all 40 nested skills instead of
|
|
27
|
+
// stopping at the root one). Fallback to the old root path keeps older
|
|
28
|
+
// installs working until they upgrade.
|
|
29
|
+
const here = fileURLToPath(import.meta.url);
|
|
30
|
+
const root = resolve(dirname(here), '..', '..');
|
|
31
|
+
for (const rel of ['skills/vike/SKILL.md', 'SKILL.md']) {
|
|
32
|
+
const candidate = resolve(root, rel);
|
|
33
|
+
if (existsSync(candidate)) return readFileSync(candidate, 'utf8');
|
|
34
|
+
}
|
|
35
|
+
throw new Error(`SKILL.md not found under ${root}. Reinstall @vike-io/cli.`);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function writeStandalone(path, skill) {
|
|
39
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
40
|
+
writeFileSync(path, skill, { mode: 0o644 });
|
|
41
|
+
return { path, mode: 'replaced' };
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function upsertBlock(path, skill, header) {
|
|
45
|
+
const wrapped = `${BEGIN}\n${header ? header + '\n\n' : ''}${skill}\n${END}`;
|
|
46
|
+
if (!existsSync(path)) {
|
|
47
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
48
|
+
writeFileSync(path, wrapped + '\n', { mode: 0o644 });
|
|
49
|
+
return { path, mode: 'created' };
|
|
50
|
+
}
|
|
51
|
+
const current = readFileSync(path, 'utf8');
|
|
52
|
+
if (current.includes(BEGIN) && current.includes(END)) {
|
|
53
|
+
const before = current.slice(0, current.indexOf(BEGIN));
|
|
54
|
+
const after = current.slice(current.indexOf(END) + END.length);
|
|
55
|
+
writeFileSync(path, before + wrapped + after, { mode: 0o644 });
|
|
56
|
+
return { path, mode: 'updated' };
|
|
57
|
+
}
|
|
58
|
+
const sep = current.endsWith('\n') ? '\n' : '\n\n';
|
|
59
|
+
writeFileSync(path, current + sep + wrapped + '\n', { mode: 0o644 });
|
|
60
|
+
return { path, mode: 'appended' };
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function installClaude(skill) {
|
|
64
|
+
return writeStandalone(join(homedir(), '.claude', 'skills', 'vike', 'SKILL.md'), skill);
|
|
65
|
+
}
|
|
66
|
+
function installCursor(skill, cwd) {
|
|
67
|
+
return upsertBlock(join(cwd, '.cursorrules'), skill, '# vike skill — on-chain analytics for AI agents');
|
|
68
|
+
}
|
|
69
|
+
function installCopilot(skill, cwd) {
|
|
70
|
+
return upsertBlock(
|
|
71
|
+
join(cwd, '.github', 'copilot-instructions.md'),
|
|
72
|
+
skill,
|
|
73
|
+
'# vike skill — on-chain analytics for AI agents'
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
function installAgents(skill, cwd) {
|
|
77
|
+
return upsertBlock(join(cwd, 'AGENTS.md'), skill, '# vike skill — on-chain analytics for AI agents');
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function registerInstall(program) {
|
|
81
|
+
program
|
|
82
|
+
.command('install')
|
|
83
|
+
.description('Copy vike SKILL.md into agent-discoverable locations (Claude, Cursor, Copilot, AGENTS.md)')
|
|
84
|
+
.option('--claude', 'Install to ~/.claude/skills/vike/SKILL.md')
|
|
85
|
+
.option('--cursor', 'Append/update vike block in ./.cursorrules')
|
|
86
|
+
.option('--copilot', 'Append/update vike block in ./.github/copilot-instructions.md')
|
|
87
|
+
.option('--agents', 'Append/update vike block in ./AGENTS.md')
|
|
88
|
+
.option('--all', 'Install to every supported target')
|
|
89
|
+
.option('--cwd <dir>', 'Project root (defaults to current directory)')
|
|
90
|
+
.action((opts) => {
|
|
91
|
+
const cwd = opts.cwd ? resolve(opts.cwd) : process.cwd();
|
|
92
|
+
const targets = opts.all
|
|
93
|
+
? { claude: true, cursor: true, copilot: true, agents: true }
|
|
94
|
+
: opts;
|
|
95
|
+
if (!targets.claude && !targets.cursor && !targets.copilot && !targets.agents) {
|
|
96
|
+
console.error('No target selected. Use --claude / --cursor / --copilot / --agents / --all.');
|
|
97
|
+
console.error('Examples:');
|
|
98
|
+
console.error(' vike install --claude');
|
|
99
|
+
console.error(' vike install --all');
|
|
100
|
+
process.exitCode = 1;
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
let skill;
|
|
104
|
+
try {
|
|
105
|
+
skill = readSkillSource();
|
|
106
|
+
} catch (e) {
|
|
107
|
+
console.error(`vike install: ${e.message}`);
|
|
108
|
+
process.exitCode = 1;
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
const results = [];
|
|
112
|
+
try {
|
|
113
|
+
if (targets.claude) results.push(installClaude(skill));
|
|
114
|
+
if (targets.cursor) results.push(installCursor(skill, cwd));
|
|
115
|
+
if (targets.copilot) results.push(installCopilot(skill, cwd));
|
|
116
|
+
if (targets.agents) results.push(installAgents(skill, cwd));
|
|
117
|
+
} catch (e) {
|
|
118
|
+
console.error(`vike install: ${e.message}`);
|
|
119
|
+
process.exitCode = 1;
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
for (const r of results) {
|
|
123
|
+
const size = (() => { try { return statSync(r.path).size; } catch { return 0; } })();
|
|
124
|
+
console.log(`${r.mode.padEnd(8)} ${r.path} (${size} bytes)`);
|
|
125
|
+
}
|
|
126
|
+
console.log(`\nInstalled ${results.length} target(s). Restart your AI client to pick up the skill.`);
|
|
127
|
+
});
|
|
128
|
+
}
|
package/src/commands/perp.js
CHANGED
|
@@ -31,6 +31,30 @@ export function registerPerp(program) {
|
|
|
31
31
|
} catch (err) { emitError(err, opts); }
|
|
32
32
|
});
|
|
33
33
|
|
|
34
|
+
cmd
|
|
35
|
+
.command('find-position')
|
|
36
|
+
.description('Reverse-lookup HL open positions matching a share-card (coin/side/lev/entry)')
|
|
37
|
+
.requiredOption('--coin <s>', 'Asset symbol (e.g. BTC, ETH)')
|
|
38
|
+
.requiredOption('--side <s>', 'long | short')
|
|
39
|
+
.requiredOption('--leverage <x>', 'Leverage from the share card (e.g. 25)')
|
|
40
|
+
.requiredOption('--entry <p>', 'Entry price from the share card')
|
|
41
|
+
.option('--mark <p>', 'Optional current mark price (sharpens tie-break)')
|
|
42
|
+
.option('--limit <n>', 'Max matches (default 10, max 50)', '10')
|
|
43
|
+
.option('--json', 'Emit JSON')
|
|
44
|
+
.action(async (opts) => {
|
|
45
|
+
try {
|
|
46
|
+
const r = await callTool('hl_position_match', {
|
|
47
|
+
coin: opts.coin,
|
|
48
|
+
side: opts.side,
|
|
49
|
+
leverage: Number(opts.leverage),
|
|
50
|
+
entry_price: Number(opts.entry),
|
|
51
|
+
mark_price: opts.mark != null ? Number(opts.mark) : undefined,
|
|
52
|
+
limit: parseInt10(opts.limit, 10),
|
|
53
|
+
});
|
|
54
|
+
emit(r, opts);
|
|
55
|
+
} catch (err) { emitError(err, opts); }
|
|
56
|
+
});
|
|
57
|
+
|
|
34
58
|
cmd
|
|
35
59
|
.command('top-traders')
|
|
36
60
|
.description('Top Hyperliquid perp wallets by PnL / ROI / win rate / volume')
|
package/src/index.js
CHANGED
|
@@ -12,6 +12,7 @@ import { registerWeb } from './commands/web.js';
|
|
|
12
12
|
// commands. New wallet subcommands (counterparties, pnl-history, balances,
|
|
13
13
|
// ens) are added under registerWallet.
|
|
14
14
|
import { registerInit } from './commands/init.js';
|
|
15
|
+
import { registerInstall } from './commands/install.js';
|
|
15
16
|
import { registerDoctor } from './commands/doctor.js';
|
|
16
17
|
import { registerSchema } from './commands/schema.js';
|
|
17
18
|
import { registerLogin, registerLogout } from './commands/auth.js';
|
|
@@ -55,6 +56,7 @@ program.hook('postAction', (_thisCmd, actionCmd) => {
|
|
|
55
56
|
registerLogin(program);
|
|
56
57
|
registerLogout(program);
|
|
57
58
|
registerInit(program);
|
|
59
|
+
registerInstall(program);
|
|
58
60
|
registerDoctor(program);
|
|
59
61
|
registerSchema(program);
|
|
60
62
|
registerToken(program);
|