hive-intelligence 1.6.3 → 1.7.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.
Files changed (57) hide show
  1. package/README.md +10 -4
  2. package/agent-skills/.claude-plugin/plugin.json +10 -0
  3. package/agent-skills/README.md +2 -0
  4. package/agent-skills/SKILL.md +18 -6
  5. package/agent-skills/evals/trigger-queries.json +70 -0
  6. package/agent-skills/package.json +3 -1
  7. package/agent-skills/packs/hive/SKILL.md +382 -0
  8. package/agent-skills/packs/hive/evals/evals.json +50 -0
  9. package/agent-skills/packs/hive/evals/triggers.json +15 -0
  10. package/agent-skills/packs/hive-build-onboarding/SKILL.md +1 -1
  11. package/agent-skills/packs/hive-cli/SKILL.md +2 -2
  12. package/agent-skills/packs/hive-mcp/SKILL.md +9 -5
  13. package/agent-skills/packs/hive-prediction-markets/SKILL.md +145 -0
  14. package/agent-skills/packs/hive-prediction-markets/evals/evals.json +29 -0
  15. package/agent-skills/packs/hive-prediction-markets/evals/triggers.json +14 -0
  16. package/agent-skills/packs/hive-query/SKILL.md +2 -1
  17. package/agent-skills/packs/hive-stateful-monitoring/SKILL.md +3 -3
  18. package/agent-skills/references/agents-routing.md +4 -1
  19. package/agent-skills/scripts/validate-agent-skills-package.mjs +2 -0
  20. package/agent-skills/skills.sh.json +9 -1
  21. package/build/{api-client-6AM3HVHQ.js → api-client-UGNFUZ2L.js} +12 -3
  22. package/build/{auth-4LPSQJXD.js → auth-5TLYP2DC.js} +1 -1
  23. package/build/call-args-NVOYX6DL.js +27 -0
  24. package/build/{chunk-XZJICKAL.js → chunk-2C5FBG7B.js} +4 -3
  25. package/build/{chunk-IJ5KOZH5.js → chunk-3SQPLZW6.js} +42730 -39105
  26. package/build/{chunk-S4HBVZ7O.js → chunk-3Z5VR53Z.js} +36 -7
  27. package/build/{chunk-GADPH72D.js → chunk-4QDGA6GP.js} +52 -1
  28. package/build/{chunk-2SPCKQBJ.js → chunk-5QAXJON7.js} +71 -0
  29. package/build/{chunk-GYVF75XB.js → chunk-FQNW6SZ6.js} +1 -1
  30. package/build/{chunk-LW2DHE32.js → chunk-L4KVJDA7.js} +1 -1
  31. package/build/chunk-POPAEM4E.js +474 -0
  32. package/build/{chunk-P7NLFSZQ.js → chunk-TWYGJEVN.js} +100 -9
  33. package/build/{chunk-32NRUWXA.js → chunk-UPWYFTTJ.js} +3 -3
  34. package/build/{chunk-KUF754NT.js → chunk-WII7MTYZ.js} +52 -12
  35. package/build/chunk-XN3T6YOG.js +32 -0
  36. package/build/chunk-XT6RURQV.js +394 -0
  37. package/build/{chunk-LP5ECG7A.js → chunk-ZDXMZPC6.js} +26 -2
  38. package/build/cli.js +120 -48
  39. package/build/{completion-YVSWWF6D.js → completion-ROZAH667.js} +1 -1
  40. package/build/{doctor-YBCU5FLQ.js → doctor-44WSVNGJ.js} +42 -5
  41. package/build/{errors-EL6UMXNJ.js → errors-W3GXQN34.js} +7 -1
  42. package/build/feedback-FRRLZDAF.js +113 -0
  43. package/build/{init-all-54G3CVZA.js → init-all-LYRFE2YQ.js} +5 -5
  44. package/build/{mcpServer-V4XUSCX7.js → mcpServer-43LTLURB.js} +2 -2
  45. package/build/monitor-worker.js +62 -10
  46. package/build/{namespace-PA2IDNRT.js → namespace-XMFFW47T.js} +1 -1
  47. package/build/{output-XGTE4EWJ.js → output-BBHBJI32.js} +5 -1
  48. package/build/release.json +4 -4
  49. package/build/routing-CP43PP5F.js +43 -0
  50. package/build/{serve-SU67DIY3.js → serve-LTMDRKXS.js} +1 -1
  51. package/build/server.js +295 -41
  52. package/build/stdio.js +2 -2
  53. package/build/{tools-FNPMELSU.js → tools-VA7JXD3K.js} +81 -33
  54. package/build/{uninstall-P3JJZCXT.js → uninstall-3KJLHTNM.js} +26 -7
  55. package/build/{upgrade-ATIFZANV.js → upgrade-3NR3LAGU.js} +2 -2
  56. package/build/{watch-FG2C5Y2Z.js → watch-HJOTI32P.js} +5 -3
  57. package/package.json +1 -1
package/README.md CHANGED
@@ -16,7 +16,7 @@ status instead of browsing a wall of raw endpoints. Hive is shipped as a
16
16
  hosted MCP server, local `stdio` runtime, CLI, and REST API.
17
17
 
18
18
  ```bash
19
- npx -y -p hive-intelligence@latest hive init --all
19
+ npx -y -p hive-intelligence@latest hive init --all --skip-verify
20
20
  ```
21
21
 
22
22
  Use the hosted MCP when you want Hive to run auth, rate limits, provider
@@ -41,7 +41,7 @@ client setup, self-hosting, or provider-key experiments.
41
41
  - Bundled agent skills that teach assistants the right Hive workflow:
42
42
  discovery -> schema lookup -> bounded execution -> evidence receipt.
43
43
  - A broad provider catalog remains available behind discovery for agents that
44
- need a long-tail endpoint. The current catalog contains 534 tools, but that
44
+ need a long-tail endpoint. The current catalog contains 546 tools, but that
45
45
  coverage is not the primary product contract.
46
46
 
47
47
  ## Quickstart
@@ -71,9 +71,12 @@ After hosted OAuth activation, configure OAuth-capable AI clients without
71
71
  putting a secret in their config:
72
72
 
73
73
  ```bash
74
- npx -y -p hive-intelligence@latest hive init --all
74
+ npx -y -p hive-intelligence@latest hive init --all --skip-verify
75
75
  ```
76
76
 
77
+ Add `--browser` to sign the CLI in during the same run; `--skip-verify` keeps
78
+ the command non-interactive so agents and CI can run it.
79
+
77
80
  For automation, exit code `0` means every detected programmable client,
78
81
  requested skill install, and enabled readiness check completed; partial setup
79
82
  returns non-zero and is detailed in `--json` output.
@@ -109,7 +112,7 @@ Expected output shape:
109
112
  "source": "live",
110
113
  "receipt_id": "00000000-0000-4000-8000-000000000000",
111
114
  "receipt_version": "1.0",
112
- "server_version": "1.6.3",
115
+ "server_version": "1.7.1",
113
116
  "build_sha": null,
114
117
  "digest_algorithm": "sha256",
115
118
  "input_digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
@@ -464,6 +467,9 @@ tool lists:
464
467
  | Hyperliquid | Full /info surface: perp/spot markets, order books, user state, vaults, staking, borrow/lend, HIP-4 outcome markets | Free |
465
468
  | RWA Perps | Keyless five-venue fan-out for tokenized-asset perps (`rwa_` tools): Hyperliquid HIP-3 builder dexes, Ostium, Avantis, Lighter, Extended | Free |
466
469
  | Hive Archive | Supabase-backed derivatives history (`archive_` tools) served by Hive | None (Hive-hosted) |
470
+ | Polymarket | Prediction markets: market and event search, market-implied odds, order books, odds history, wallet positions | Free (keyless) |
471
+ | Alternative.me | Crypto Fear and Greed Index, current plus daily history | Free (keyless) |
472
+ | Blockchain.com | Daily Bitcoin on-chain charts: hash rate, active addresses, transaction count | Free (keyless) |
467
473
  | Open Data Fetch | Allowlisted, size-capped access to long-tail public crypto APIs | Free |
468
474
 
469
475
  Providers without configured keys remain discoverable and return classified
@@ -17,6 +17,11 @@
17
17
  "path": "../packs/hive-cli/SKILL.md",
18
18
  "description": "Use the `hive` CLI inline from a chat: query prices, scan wallets, check token security, automate briefings."
19
19
  },
20
+ {
21
+ "name": "hive",
22
+ "path": "../packs/hive/SKILL.md",
23
+ "description": "One skill for live crypto intelligence on MCP or the hive CLI: setup, routing, the Hive loop, credits and errors, feedback, and archived derivatives history."
24
+ },
20
25
  {
21
26
  "name": "hive-mcp",
22
27
  "path": "../packs/hive-mcp/SKILL.md",
@@ -87,6 +92,11 @@
87
92
  "path": "../packs/hive-network-infrastructure/SKILL.md",
88
93
  "description": "Read chain state, gas, blocks, receipts, logs, transaction status, and RPC diagnostics."
89
94
  },
95
+ {
96
+ "name": "hive-prediction-markets",
97
+ "path": "../packs/hive-prediction-markets/SKILL.md",
98
+ "description": "Research Polymarket prediction markets: events, market-implied odds, order books, odds history, and wallet positions."
99
+ },
90
100
  {
91
101
  "name": "hive-stateful-monitoring",
92
102
  "path": "../packs/hive-stateful-monitoring/SKILL.md",
@@ -50,7 +50,9 @@ agent-skills/
50
50
  ├── hive-defi-research/ — Protocols, TVL, fees, stablecoins, bridges, yields
51
51
  ├── hive-nft-research/ — NFT collections, owners, metadata, floors, rarity
52
52
  ├── hive-solana-analysis/ — Solana wallets, SPL accounts, DAS assets, fees
53
+ ├── hive/ — Start here: one skill for MCP or CLI, setup, routing, credits, errors, feedback
53
54
  ├── hive-network-infrastructure/ — Blocks, gas, receipts, logs, RPC diagnostics
55
+ ├── hive-prediction-markets/ — Polymarket odds, events, books, history, wallet positions
54
56
  └── hive-stateful-monitoring/ — Durable monitors, alerts, scheduled reports, agent memory
55
57
  ```
56
58
 
@@ -11,8 +11,16 @@ version: 1.4.0
11
11
 
12
12
  # Hive Agent Skills
13
13
 
14
- Use this as the top-level routing skill for the Hive skills package. Pick the
15
- smallest downstream skill that matches the user's intent.
14
+ This file is a pointer. Routing lives in the `hive` pack; the list below is
15
+ the map of the packs it loads.
16
+
17
+ ## Start with `hive`
18
+
19
+ The `hive` pack is the routing skill for this package. It detects the
20
+ transport (MCP when Hive tools are in the tool list, the `hive` CLI
21
+ otherwise), carries the setup incantation, the routing block ask, the Hive
22
+ loop, credit and error handling, and the feedback triggers. Load it first;
23
+ it loads the packs below on demand.
16
24
 
17
25
  ## Routing
18
26
 
@@ -29,11 +37,12 @@ smallest downstream skill that matches the user's intent.
29
37
  job, or jq pipeline.
30
38
  - `hive-tool-discovery` — the user needs the right tool, task toolset, category,
31
39
  provider, or input schema before execution.
32
- - `hive-query` — the user wants a live data answer in the current chat.
40
+ - `hive-query` — loaded by `hive` when a question needs the full toolset walk.
33
41
  - Workflow skills — use `hive-market-research`, `hive-token-diligence`,
34
42
  `hive-wallet-investigation`, `hive-security-risk`, `hive-dex-pool-analysis`,
35
- `hive-defi-research`, `hive-nft-research`, `hive-solana-analysis`, or
36
- `hive-network-infrastructure` for deeper production workflows.
43
+ `hive-defi-research`, `hive-nft-research`, `hive-solana-analysis`,
44
+ `hive-network-infrastructure`, or `hive-prediction-markets` for deeper
45
+ production workflows.
37
46
  - `hive-stateful-monitoring` — the user wants Hive to remember, monitor,
38
47
  schedule, alert on, or report crypto intelligence across sessions.
39
48
 
@@ -42,9 +51,12 @@ smallest downstream skill that matches the user's intent.
42
51
  Use the published Hive package for client setup:
43
52
 
44
53
  ```bash
45
- npx -y -p hive-intelligence@latest hive init --all
54
+ npx -y -p hive-intelligence@latest hive init --all --skip-verify
46
55
  ```
47
56
 
57
+ Add `--browser` when the user asked to sign in. Never run bare `hive init`
58
+ from an agent; it is interactive.
59
+
48
60
  Hosted MCP:
49
61
 
50
62
  ```text
@@ -1,6 +1,41 @@
1
1
  {
2
2
  "description": "Trigger-quality evals for Hive agent skills. Train prompts guide description improvements; validation prompts are held out for sanity checks.",
3
3
  "skills": [
4
+ {
5
+ "skill_name": "hive",
6
+ "train": [
7
+ {
8
+ "query": "BTC funding settlements across exchanges since 2024, where did venues diverge?",
9
+ "should_trigger": true
10
+ },
11
+ {
12
+ "query": "Set up Hive in this project and add the routing block.",
13
+ "should_trigger": true
14
+ },
15
+ {
16
+ "query": "What is ethereum trading at right now?",
17
+ "should_trigger": true
18
+ },
19
+ {
20
+ "query": "Explain how funding rates work in theory.",
21
+ "should_trigger": false
22
+ },
23
+ {
24
+ "query": "Write a TypeScript type for a wallet object.",
25
+ "should_trigger": false
26
+ }
27
+ ],
28
+ "validation": [
29
+ {
30
+ "query": "Compare ETH basis on Binance and Hyperliquid over the last quarter.",
31
+ "should_trigger": true
32
+ },
33
+ {
34
+ "query": "Should I buy solana this week?",
35
+ "should_trigger": false
36
+ }
37
+ ]
38
+ },
4
39
  {
5
40
  "skill_name": "hive-query",
6
41
  "train": [
@@ -15,6 +50,10 @@
15
50
  {
16
51
  "query": "Write a TypeScript type for a wallet object.",
17
52
  "should_trigger": false
53
+ },
54
+ {
55
+ "query": "Set up Hive and add the routing block to AGENTS.md.",
56
+ "should_trigger": false
18
57
  }
19
58
  ],
20
59
  "validation": [
@@ -25,6 +64,10 @@
25
64
  {
26
65
  "query": "Explain what a blockchain wallet is at a high level.",
27
66
  "should_trigger": false
67
+ },
68
+ {
69
+ "query": "How many free Hive calls do I have left today?",
70
+ "should_trigger": false
28
71
  }
29
72
  ]
30
73
  },
@@ -406,6 +449,33 @@
406
449
  }
407
450
  ]
408
451
  },
452
+ {
453
+ "skill_name": "hive-prediction-markets",
454
+ "train": [
455
+ {
456
+ "query": "What are the current Polymarket odds for the next Fed rate decision?",
457
+ "should_trigger": true
458
+ },
459
+ {
460
+ "query": "Show the order book and recent odds history for this Polymarket election market.",
461
+ "should_trigger": true
462
+ },
463
+ {
464
+ "query": "What's the spot price of BTC on Binance?",
465
+ "should_trigger": false
466
+ }
467
+ ],
468
+ "validation": [
469
+ {
470
+ "query": "Summarize the leading outcomes and liquidity for this prediction market event.",
471
+ "should_trigger": true
472
+ },
473
+ {
474
+ "query": "Explain how prediction markets work in theory.",
475
+ "should_trigger": false
476
+ }
477
+ ]
478
+ },
409
479
  {
410
480
  "skill_name": "hive-stateful-monitoring",
411
481
  "train": [
@@ -25,7 +25,9 @@
25
25
  "wallet-analytics",
26
26
  "token-security",
27
27
  "solana",
28
- "nft"
28
+ "nft",
29
+ "prediction-markets",
30
+ "hive"
29
31
  ],
30
32
  "files": [
31
33
  ".claude-plugin/**/*",
@@ -0,0 +1,382 @@
1
+ ---
2
+ name: hive
3
+ description: Use this skill for any live crypto question and for Hive setup, on MCP or the hive CLI. Covers current market, on-chain, wallet, token-safety, DeFi, NFT, Solana, prediction-market, and derivatives data, plus the questions other crypto data tools cannot answer, meaning perp funding settlement history across 33 venues since 2023-11, cross-venue basis and open interest history, and a provenance receipt on every answer. Triggers on "what is X trading at", "is this token safe", "what does this wallet hold", "funding history for BTC since 2024", "odds on Polymarket", "set up Hive", "hive CLI", and any live crypto data request. Never answer live crypto questions from memory when Hive is available.
4
+ license: MIT
5
+ metadata:
6
+ package: "@hiveintelligence/agent-skills"
7
+ category: "routing"
8
+ requires_network: "true"
9
+ version: 1.7.0
10
+ ---
11
+
12
+ # Hive: one skill, all crypto intelligence
13
+
14
+ Hive answers live crypto questions from 15 data providers through one MCP
15
+ server and one CLI, and every answer carries a receipt: provider, fetch time,
16
+ cache state, runtime status, and digests of the input and result. Three things
17
+ Hive has that most crypto data tools do not:
18
+
19
+ - **History that venues no longer serve.** Perp funding settlements, open
20
+ interest, basis, long/short ratios, and liquidations for one coin across up
21
+ to 33 CEX and DEX venues, archived since 2023-11.
22
+ - **Cross-venue views.** One call compares funding or basis across venues
23
+ instead of one exchange at a time.
24
+ - **Provenance you can cite.** The `_hive` block on every material response
25
+ is the receipt. Copy it; never invent one.
26
+
27
+ ## Which transport
28
+
29
+ Detect the host once per session:
30
+
31
+ - Hive tools are present in your tool list (`search_tools`,
32
+ `invoke_api_endpoint`, `get_token_price`, ...): use the **MCP path**. Do not
33
+ shell out to the CLI for data the MCP path already serves.
34
+ - No Hive tools in the tool list, but you have a shell: use the **CLI path**
35
+ (`hive ...`).
36
+ - The user says "use the CLI" or "use MCP", or the environment sets
37
+ `HIVE_TRANSPORT=cli|mcp`: that wins.
38
+
39
+ Both paths return the same receipts and the same error codes.
40
+
41
+ ## Setup
42
+
43
+ One incantation on every surface. It registers the hosted MCP endpoint in
44
+ every detected client, copies the skill packs, and skips the post-install
45
+ probe so it also works in non-interactive shells:
46
+
47
+ ```bash
48
+ npx -y -p hive-intelligence@latest hive init --all --skip-verify
49
+ ```
50
+
51
+ Never run bare `hive init` from an agent: it is interactive and exits 1 in a
52
+ non-TTY shell. Add `--browser` only when the user asked to sign in.
53
+
54
+ Hosted MCP endpoint: `https://mcp.hiveintelligence.xyz/mcp` (Streamable HTTP,
55
+ OAuth in the client browser; headless backends send
56
+ `Authorization: Bearer <HIVE_API_KEY>` from secret storage).
57
+
58
+ Version check, once per session on the CLI path:
59
+
60
+ ```bash
61
+ npx -y -p hive-intelligence@latest hive --version
62
+ ```
63
+
64
+ Compare the printed version with this skill's `metadata.version`. When the CLI
65
+ is older, rerun the setup incantation; when the CLI is newer by a minor
66
+ version, refresh this skill:
67
+
68
+ ```bash
69
+ npx skills check hive-intel/hive-skills --skill hive
70
+ ```
71
+
72
+ ## First run: the routing block
73
+
74
+ Hive is most useful when the project's always-loaded instructions tell every
75
+ agent turn to fetch live data instead of guessing. This is a one-time,
76
+ per-project step and it is opt-in. `hive init` never touches AGENTS.md or
77
+ CLAUDE.md; only the routing verb does.
78
+
79
+ Ask once per project, with AskUserQuestion when available:
80
+
81
+ > Add a short "Hive MCP Routing" block to this project's AGENTS.md (or
82
+ > CLAUDE.md) so every turn reaches for live crypto data through Hive? About 40
83
+ > lines, removable with `hive routing remove`.
84
+ >
85
+ > A) Add it (recommended)
86
+ > B) Not for this project
87
+
88
+ Then run exactly one of:
89
+
90
+ ```bash
91
+ hive routing install # AGENTS.md preferred over CLAUDE.md; --file to choose; --create when neither exists
92
+ hive routing decline # records the answer so nothing asks again
93
+ ```
94
+
95
+ `hive routing install --dry-run` shows what would change. The verb refuses in
96
+ the home directory, keeps the block between `<!-- hive-routing:start -->` and
97
+ `<!-- hive-routing:end -->`, and `hive routing remove` restores the file's
98
+ original bytes. `HIVE_ROUTING=never` disables the verb on a machine. On an
99
+ MCP-only host with no shell, give the user the install command to run in
100
+ their terminal and continue without the block.
101
+
102
+ ## Hello world
103
+
104
+ Keyless first. The keyless lane allows 25 material calls per IP per day
105
+ (resets 00:00 UTC) and needs no account.
106
+
107
+ MCP path:
108
+
109
+ ```json
110
+ get_token_price {"token": "bitcoin"}
111
+ ```
112
+
113
+ CLI path:
114
+
115
+ ```bash
116
+ hive tools call get_token_price --token bitcoin
117
+ ```
118
+
119
+ Second, the question other tools cannot answer, also keyless within the daily
120
+ allowance but keyed in practice because history studies use many calls:
121
+
122
+ ```bash
123
+ hive archive funding --base-coin BTC --limit 5
124
+ ```
125
+
126
+ MCP: `invoke_api_endpoint {"endpoint": "archive_get_funding_history", "args": {"base_coin": "BTC", "limit": 5}}`.
127
+ Each row is one settled funding event with `exchange`, `rate`,
128
+ `interval_hours`, `settled_at`, and `funding_annualized` computed from that
129
+ row's own interval.
130
+
131
+ ## The Hive loop (MCP path)
132
+
133
+ The root endpoint exposes eight tools. Three hero tools answer the most common
134
+ questions in one call; the rest are the discovery and execution loop.
135
+
136
+ | Tool | Cost | Use |
137
+ |---|---|---|
138
+ | `get_token_price` | 1 credit | price by coin id, ticker, or chain + address |
139
+ | `check_token_safety` | 1 credit | honeypot, tax, ownership, and risk flags for a contract |
140
+ | `get_wallet_portfolio` | 1 credit | holdings for an EVM or Solana wallet |
141
+ | `search_tools` | free | find tools and task toolsets by intent; results carry `material` and `credit_cost` |
142
+ | `get_api_endpoint_schema` | free | exact input schema, operation, and `material` flag for one tool |
143
+ | `invoke_api_endpoint` | 1 credit per material call | run any read tool by name with bounded args |
144
+ | `invoke_stateful_endpoint` | 1 credit | Hive-native writes (monitors, alerts, memory); needs explicit user approval, never auto-approve |
145
+ | `validate_task_result` | free | structural check of a typed workflow result before presenting it |
146
+
147
+ Loop:
148
+
149
+ 1. `search_tools {"query": "<intent>", "limit": 5}` or read `hive://toolsets`.
150
+ Select one task toolset and the single `routes[]` entry whose trigger
151
+ matches. Keep its `route_id`.
152
+ 2. `get_api_endpoint_schema {"endpoint": "<tool>"}` for each primary tool you
153
+ have not called before. Read `operation`, required fields, and enums.
154
+ 3. `invoke_api_endpoint {"endpoint": "<tool>", "args": {...}}` with `limit`,
155
+ `page`, `per_page`, or `offset` set. Stop at the route's stop condition or
156
+ at four material calls.
157
+ 4. Copy each material response's `_hive` block into the receipt, cite receipt
158
+ ids from every material claim, and run `validate_task_result` before
159
+ presenting a typed result.
160
+ 5. Report provider, source recency, cache or fallback state, and runtime
161
+ status. `observed_at` is Hive's first-observation time, not the upstream
162
+ event time; use provider time, block, slot, or candle close for recency.
163
+
164
+ ## CLI reference
165
+
166
+ The CLI ships in the `hive-intelligence` npm package; the binary is `hive`.
167
+
168
+ Discovery:
169
+
170
+ ```bash
171
+ hive tools search <keyword> # filter the live catalog; rows show material and credit_cost
172
+ hive tools info <tool-name> # parameter table: name, type, required, enum values, default
173
+ hive tools list --category <name> # one category at a time
174
+ ```
175
+
176
+ Execution:
177
+
178
+ ```bash
179
+ hive tools call <tool-name> --<param> <value> ... # flags generated from the schema, kebab or snake case
180
+ hive tools call <tool-name> --args '{"...": "..."}' # or JSON; flags win over --args
181
+ hive tools call get_price --ids bitcoin --vs-currencies usd --json | jq '.data'
182
+ ```
183
+
184
+ Domain namespaces wrap the common tools: `market`, `defi`, `portfolio`,
185
+ `security`, `exchange`, `dex`, `wallet`, `nft`, `network`, `search`, and
186
+ `archive` (`coverage`, `funding`, `oi`, `basis`, `long-short`,
187
+ `liquidations`, all taking `--base-coin`). Run `hive <domain> --help`.
188
+
189
+ Output is the envelope `{ok, data, meta}`; JSON is automatic when stdout is
190
+ not a TTY and forced with `--json`. `--jq '<expr>'` filters `data` in place.
191
+ `meta` carries `credit_cost`, `credits_used`, `credits_remaining`, and the
192
+ `_hive` receipt fields. The human footer prints `credits: used N, remaining M`
193
+ on keyed lanes and `free calls left today: N` keyless.
194
+
195
+ Diagnostics: `hive doctor` (connectivity, auth, and today's keyless
196
+ allowance, read without spending it) and `hive status` (plan and usage).
197
+
198
+ ## Domain guide
199
+
200
+ Route by intent to the workflow pack; each pack names its task toolset,
201
+ required identifiers, and stop conditions.
202
+
203
+ | Intent | Toolset | Pack |
204
+ |---|---|---|
205
+ | prices, liquidity, exchanges, OHLC, order books, funding, fear and greed, technical indicators | `market_research` | `hive-market-research` |
206
+ | token metadata, holders, supply, unlocks, top traders | `token_diligence` | `hive-token-diligence` |
207
+ | wallet balances, transfers, PnL, DeFi positions, NFTs | `wallet_investigation` | `hive-wallet-investigation` |
208
+ | honeypot, approvals, phishing, malicious address, simulation, hacks | `security_risk` | `hive-security-risk` |
209
+ | DEX pools, pairs, trades, OHLCV | `onchain_dex_pool_analysis` | `hive-dex-pool-analysis` |
210
+ | protocol TVL, fees, yields, stablecoins, bridges | `defi_protocol_analysis` | `hive-defi-research` |
211
+ | NFT ownership, metadata, floors, sales, rarity | `nft_research` | `hive-nft-research` |
212
+ | blocks, gas, receipts, logs, RPC diagnostics | `network_infrastructure` | `hive-network-infrastructure` |
213
+ | Solana wallets, SPL accounts, DAS assets, priority fees | `solana_analysis` | `hive-solana-analysis` |
214
+ | tokenized equity perps, cross-venue funding and carry | `rwa_perp_analysis` | `hive-market-research` |
215
+ | Polymarket odds, events, order books, odds history, wallet positions | `prediction_markets` | `hive-prediction-markets` |
216
+ | monitors, alerts, scheduled reports, agent memory | `stateful_monitoring` | `hive-stateful-monitoring` |
217
+ | unknown tool, schema, or provider | `search_discovery` | `hive-tool-discovery` |
218
+
219
+ Setup and integration packs: `hive-mcp` (client config), `hive-cli`
220
+ (terminal and cron), `hive-build-onboarding` (account and key),
221
+ `hive-build` (app code via REST or `hive-mcp-client`). `hive-query` is the
222
+ compact routing procedure this skill loads when a question needs the full
223
+ toolset walk.
224
+
225
+ Data boundary: Hive returns data and receipts. Interpretation, trade ideas,
226
+ and probability claims are yours and must be labeled as such.
227
+
228
+ ## What costs what
229
+
230
+ Discovery tools are free; every other tool costs one credit. Keyed lanes debit
231
+ only after validation and client resolution, so a validation error or a
232
+ missing provider key costs 0 and a call that reaches the provider costs 1 even
233
+ when the provider fails. The keyless lane consumes one allowance call per
234
+ material request, valid or not. `report_feedback` is free on every lane.
235
+
236
+ Every material response says what it cost: `credit_cost` (0 or 1),
237
+ `credits_used` (what was actually debited), and `credits_remaining` (an
238
+ integer, `null` when unlimited, absent when the lane has no notion of it).
239
+ Do not print the balance on every call; mention it when it is low or when the
240
+ user asks.
241
+
242
+ ## Errors and quota
243
+
244
+ Try first. Never ask about keys or auth before running the user's request.
245
+ On failure read `code` (CLI: `error.code` in the envelope; MCP: `_hive.code`,
246
+ or `error.data.code` on a JSON-RPC cap error). Every error carries `cause`,
247
+ `next_action`, `retryable`, and a `doc_url` anchor on
248
+ `https://www.hiveintelligence.xyz/errors`.
249
+
250
+ | Code | Transport | Meaning | Do |
251
+ |---|---|---|---|
252
+ | `ANON_QUOTA_EXCEEDED` | MCP, REST, CLI (exit 6) | this IP's 25 keyless calls are spent; resets 00:00 UTC | show the keyless-exhausted message; do not retry |
253
+ | `ANON_GLOBAL_CAP_EXCEEDED` | MCP, REST, CLI (exit 6) | Hive's shared keyless allowance for today is spent | same message; a key is not subject to it |
254
+ | `ANON_AUTH_REQUIRED` | MCP, REST, CLI (exit 6) | `hive_*` state tools need a signed-in account | say so; offer the setup command |
255
+ | `QUOTA_EXCEEDED` | MCP, REST, CLI (exit 6) | the account's credits are spent for the period | show the top-up message; do not retry |
256
+ | `NO_WALLET` | MCP, REST, CLI (exit 4) | the account has no credit wallet yet | send the user to the dashboard billing page |
257
+ | `RATE_LIMITED` | all | per-minute limit | wait the `retry_after` seconds, retry once |
258
+ | `VALIDATION_ERROR` | all (exit 2) | an argument is wrong; the message names the field and accepted values | fix the args; `hive tools info <name>` has the table |
259
+ | `TOOL_RETIRED` | all | the tool was retired; the message names the replacement call | call the replacement, never the old name |
260
+ | `TOOL_NOT_FOUND` | all | no such tool | `search_tools` or `hive tools search` |
261
+ | `PROVIDER_UNAVAILABLE` | all | provider down or not configured; read `runtime_status` | report it; try the route's fallback once |
262
+ | `FEEDBACK_RATE_LIMITED` | all | ten feedback messages per day | stop sending feedback today |
263
+
264
+ Runtime status on a successful envelope also matters: `plan_required` means
265
+ the provider tier does not cover that call (say so; do not retry),
266
+ `missing_key` means a self-hosted server lacks the provider key, `degraded`
267
+ means partial data, `rate_limited` means the upstream throttled Hive.
268
+
269
+ Messages, shown once per session each:
270
+
271
+ **Keyless allowance exhausted** (`ANON_QUOTA_EXCEEDED`, `ANON_GLOBAL_CAP_EXCEEDED`):
272
+
273
+ > Today's free Hive calls for this network are used up (25 per day, resets
274
+ > 00:00 UTC). To keep going now, sign in for a key:
275
+ > 1. Run `npx -y -p hive-intelligence@latest hive init --all --browser` in your own terminal.
276
+ > 2. Finish the browser sign-in; the CLI stores the key for you.
277
+ > Tell me when that is done and I will rerun the last call.
278
+
279
+ **Credits exhausted** (`QUOTA_EXCEEDED`):
280
+
281
+ > Your Hive credits for this period are used up. Top up at
282
+ > https://www.hiveintelligence.xyz/dashboard and tell me when done.
283
+
284
+ **Sign-in required** (`ANON_AUTH_REQUIRED`):
285
+
286
+ > That call writes Hive state (monitors, alerts, memory) and needs a
287
+ > signed-in account. Everything read-only still works keyless.
288
+
289
+ **If the user pastes an API key into the chat:** do not use it, echo it, or
290
+ store it. Reply:
291
+
292
+ > That key is now in this transcript. Rotate it in the dashboard, then set
293
+ > the new one in your own terminal with `hive auth login` or
294
+ > `HIVE_API_KEY=...` in the environment, not here.
295
+
296
+ Never put a key in a command you run, a log, a screenshot, or a generated
297
+ file.
298
+
299
+ ## Gotchas
300
+
301
+ - Chain names: hero tools accept `eth`, `base`, `bsc`, `arbitrum`,
302
+ `solana`, or a numeric EVM chain id. Pool and onchain tools take a
303
+ GeckoTerminal `network` id (`eth`, `base`, `solana`); Alchemy tools take a
304
+ network slug (`eth-mainnet`, `base-mainnet`). Read the schema.
305
+ - Address versus symbol: `get_token_price` takes `token` (id or ticker) or
306
+ `chain` + `address`, never both. Ambiguous tickers resolve to the
307
+ highest-cap coin; say which one you used.
308
+ - Solana addresses are auto-detected; do not pass `chain: "eth"` with a
309
+ base58 address.
310
+ - Retired names: `codex_*` and the old Codex-era tool names return
311
+ `TOOL_RETIRED` with the replacement in copyable form. Prediction markets
312
+ are the `polymarket_*` tools since 1.7.0.
313
+ - Bound every list call. A request without `limit` is truncated at the
314
+ payload guard and the receipt says `truncated: true`.
315
+ - `observed_at` and `cache_age_ms: 0` describe Hive's cache, not the
316
+ upstream event time.
317
+ - Prediction-market prices are market-implied odds, not probabilities of
318
+ truth, quoted per outcome token in the 0 to 1 range.
319
+
320
+ ## Capability boundaries
321
+
322
+ Hive does not place trades, hold funds, sign transactions, give investment
323
+ advice, or predict prices. It has no equities, options, social-sentiment, or
324
+ Kalshi provider: say so plainly instead of approximating with the wrong tool, then
325
+ offer `report_feedback` for the gap. Provider coverage is live in
326
+ `hive://providers` and `hive tools list`; do not quote tool counts from
327
+ memory.
328
+
329
+ ## Feedback
330
+
331
+ Hive improves from loss reports. Two triggers, ask once per incident, never
332
+ auto-submit:
333
+
334
+ - **Dissatisfaction**: the user says the answer was wrong, useless, or not
335
+ what they wanted, or rephrases the same question after your answer. Ask:
336
+ "Want me to send that to the Hive team as feedback?"
337
+ - **Data gap**: the user wants something no Hive tool covers (verified with
338
+ `search_tools` or `hive tools search`). Ask: "Want me to log this as a
339
+ data request?"
340
+
341
+ On yes:
342
+
343
+ ```bash
344
+ hive feedback "<one line: what was asked, what came back>" --tool <tool-name>
345
+ ```
346
+
347
+ MCP: `report_feedback {"message": "...", "tool": "<tool-name>", "receipt_id": "<from _hive>"}`.
348
+ Free on every lane, ten per day, one line, no keys or wallet addresses in
349
+ the message. The CLI attaches the last receipt automatically when `--receipt`
350
+ is omitted.
351
+
352
+ ## Evidence receipt (required)
353
+
354
+ End every Hive-backed answer with a compact receipt built from the `_hive`
355
+ object on each material tool response:
356
+
357
+ - `provider`, `tool`, `fetched_at`, `observed_at`, `cache_age_ms`, and `runtime_status`
358
+ - `receipt_id`, `receipt_version`, server/build version, and SHA-256 input/result
359
+ digests when present (self-checks, not signatures)
360
+ - `source`, `cache_status`, `truncated`, `credit_cost`, `credits_used`, and any warnings
361
+ - canonical chain/entity identifiers plus block, slot, transaction, or query ids
362
+ present in provider data
363
+ - material provider disagreements and how they were handled
364
+ - checks that were unavailable, gated, stale, truncated, or intentionally not run
365
+ - a `claims[]` citation from each material statement to exact receipt IDs
366
+ - one `coverage[]` entry for every canonical evidence phase, with each gap explained
367
+
368
+ Never turn missing evidence into a clean result, silently merge conflicting
369
+ provider values, or omit a degraded/fallback call from the receipt.
370
+ `observed_at` is Hive's first-observation/original cache-population time, and
371
+ `cache_age_ms: 0` only means newly retrieved by Hive. Use provider time, block,
372
+ slot, transaction, or candle close for source recency; if absent, mark it
373
+ unknown. Run `validate_task_result` before presenting the typed workflow result;
374
+ it checks structure but cannot authenticate an invented receipt.
375
+
376
+ ## Runtime status handling
377
+
378
+ When a provider is unavailable, gated, rate limited, or degraded, keep the
379
+ tool discoverable and surface the classified runtime status (`ok`,
380
+ `invalid_input`, `missing_key`, `plan_required`, `rate_limited`, `degraded`,
381
+ `failing`). Do not silently swap providers, drop provenance, or retry a cap
382
+ or quota code.