hive-intelligence 1.1.2 → 1.1.4

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 (148) hide show
  1. package/LICENSE +12 -10
  2. package/README.md +325 -351
  3. package/agent-skills/.claude-plugin/plugin.json +111 -0
  4. package/agent-skills/.mcp.json +11 -0
  5. package/agent-skills/AGENTS.md +37 -0
  6. package/agent-skills/LICENSE +21 -0
  7. package/agent-skills/README.md +145 -0
  8. package/agent-skills/SKILL.md +80 -0
  9. package/agent-skills/evals/README.md +20 -0
  10. package/agent-skills/evals/trigger-queries.json +464 -0
  11. package/agent-skills/package.json +49 -0
  12. package/agent-skills/packs/hive-build/SKILL.md +328 -0
  13. package/agent-skills/packs/hive-build/evals/evals.json +28 -0
  14. package/agent-skills/packs/hive-build-onboarding/SKILL.md +137 -0
  15. package/agent-skills/packs/hive-build-onboarding/evals/evals.json +27 -0
  16. package/agent-skills/packs/hive-cli/SKILL.md +141 -0
  17. package/agent-skills/packs/hive-cli/evals/evals.json +27 -0
  18. package/agent-skills/packs/hive-defi-research/SKILL.md +42 -0
  19. package/agent-skills/packs/hive-defi-research/evals/evals.json +27 -0
  20. package/agent-skills/packs/hive-defi-research/references/workflow.md +41 -0
  21. package/agent-skills/packs/hive-dex-pool-analysis/SKILL.md +41 -0
  22. package/agent-skills/packs/hive-dex-pool-analysis/evals/evals.json +27 -0
  23. package/agent-skills/packs/hive-dex-pool-analysis/references/workflow.md +42 -0
  24. package/agent-skills/packs/hive-market-research/SKILL.md +45 -0
  25. package/agent-skills/packs/hive-market-research/evals/evals.json +27 -0
  26. package/agent-skills/packs/hive-market-research/references/workflow.md +47 -0
  27. package/agent-skills/packs/hive-mcp/SKILL.md +147 -0
  28. package/agent-skills/packs/hive-mcp/evals/evals.json +38 -0
  29. package/agent-skills/packs/hive-mcp/references/client-install-matrix.md +83 -0
  30. package/agent-skills/packs/hive-mcp/references/clients.md +141 -0
  31. package/agent-skills/packs/hive-network-infrastructure/SKILL.md +44 -0
  32. package/agent-skills/packs/hive-network-infrastructure/evals/evals.json +27 -0
  33. package/agent-skills/packs/hive-network-infrastructure/references/workflow.md +41 -0
  34. package/agent-skills/packs/hive-nft-research/SKILL.md +41 -0
  35. package/agent-skills/packs/hive-nft-research/evals/evals.json +27 -0
  36. package/agent-skills/packs/hive-nft-research/references/workflow.md +42 -0
  37. package/agent-skills/packs/hive-prediction-markets/SKILL.md +44 -0
  38. package/agent-skills/packs/hive-prediction-markets/evals/evals.json +27 -0
  39. package/agent-skills/packs/hive-prediction-markets/references/workflow.md +42 -0
  40. package/agent-skills/packs/hive-query/SKILL.md +99 -0
  41. package/agent-skills/packs/hive-query/evals/evals.json +38 -0
  42. package/agent-skills/packs/hive-query/references/root-mcp-workflow.md +54 -0
  43. package/agent-skills/packs/hive-security-risk/SKILL.md +42 -0
  44. package/agent-skills/packs/hive-security-risk/evals/evals.json +27 -0
  45. package/agent-skills/packs/hive-security-risk/references/workflow.md +46 -0
  46. package/agent-skills/packs/hive-solana-analysis/SKILL.md +42 -0
  47. package/agent-skills/packs/hive-solana-analysis/evals/evals.json +27 -0
  48. package/agent-skills/packs/hive-solana-analysis/references/workflow.md +42 -0
  49. package/agent-skills/packs/hive-stateful-monitoring/SKILL.md +75 -0
  50. package/agent-skills/packs/hive-stateful-monitoring/evals/evals.json +49 -0
  51. package/agent-skills/packs/hive-token-diligence/SKILL.md +44 -0
  52. package/agent-skills/packs/hive-token-diligence/evals/evals.json +27 -0
  53. package/agent-skills/packs/hive-token-diligence/references/workflow.md +45 -0
  54. package/agent-skills/packs/hive-tool-discovery/SKILL.md +49 -0
  55. package/agent-skills/packs/hive-tool-discovery/evals/evals.json +38 -0
  56. package/agent-skills/packs/hive-tool-discovery/references/discovery-surfaces.md +62 -0
  57. package/agent-skills/packs/hive-wallet-investigation/SKILL.md +42 -0
  58. package/agent-skills/packs/hive-wallet-investigation/evals/evals.json +27 -0
  59. package/agent-skills/packs/hive-wallet-investigation/references/workflow.md +45 -0
  60. package/agent-skills/references/agents-routing.md +51 -0
  61. package/agent-skills/scripts/validate-agent-skills-package.mjs +216 -0
  62. package/agent-skills/skills.sh.json +41 -0
  63. package/bin/hive-mcp.js +33 -0
  64. package/build/{alias-INGXWFCG.js → alias-3OPMQF4X.js} +2 -3
  65. package/build/api-client-EPF6FD7A.js +28 -0
  66. package/build/auth-Q5Q24IRI.js +39 -0
  67. package/build/browser-auth-VPF5LZMZ.js +8 -0
  68. package/build/{cache-US4LSZPI.js → cache-T6KC5YEY.js} +2 -3
  69. package/build/{chunk-QMRVH5ZP.js → chunk-3WYWXTNN.js} +9 -2
  70. package/build/chunk-4F5CI6LX.js +340 -0
  71. package/build/chunk-5XXI25JE.js +496 -0
  72. package/build/chunk-7JWXBKEJ.js +252 -0
  73. package/build/chunk-CEWCB5YS.js +71 -0
  74. package/build/{chunk-CGXVV6WR.js → chunk-FH3YGSY5.js} +86 -105
  75. package/build/chunk-FRXMGRZQ.js +102 -0
  76. package/build/chunk-GZPDEXO4.js +126 -0
  77. package/build/chunk-IZPAMRHP.js +43 -0
  78. package/build/chunk-JTUKQWIO.js +79720 -0
  79. package/build/{chunk-CP3FXEQA.js → chunk-NP6NSOG2.js} +4 -6
  80. package/build/{chunk-XQJ6PB2L.js → chunk-POT2MBEK.js} +0 -1
  81. package/build/chunk-VBOKVQ74.js +280 -0
  82. package/build/{chunk-WKVZVQTG.js → chunk-YZ2PXBJK.js} +6 -4
  83. package/build/chunk-ZCU7XQKF.js +14 -0
  84. package/build/chunk-ZTJVOWDQ.js +85 -0
  85. package/build/chunk-ZXB53E7H.js +246 -0
  86. package/build/cli.js +138 -125
  87. package/build/{completion-J6HFY6PS.js → completion-46K674EL.js} +54 -50
  88. package/build/config-XE6Q5P4I.js +57 -0
  89. package/build/{config-dir-IEOID7Q6.js → config-dir-MAWX5AUF.js} +2 -3
  90. package/build/{doctor-7WZMCQC7.js → doctor-HGMQE6IN.js} +37 -13
  91. package/build/{errors-U6UZWVSD.js → errors-J2PH3NLJ.js} +2 -3
  92. package/build/format-5X2HIVDT.js +42 -0
  93. package/build/{init-CAVIFVSH.js → init-JMDNM7ZZ.js} +1 -2
  94. package/build/init-all-5SKNV75X.js +273 -0
  95. package/build/mcpServer-5TKKSKJM.js +21 -0
  96. package/build/monitor-worker.js +1140 -0
  97. package/build/{namespace-7JWWBWBL.js → namespace-FSX2G3NM.js} +2 -3
  98. package/build/{open-FUXYIHFO.js → open-5A6ZQMGC.js} +5 -6
  99. package/build/{output-7PGQWJY2.js → output-V3D4YZ6U.js} +2 -3
  100. package/build/serve-AGCOXXFM.js +49 -0
  101. package/build/server.js +5042 -14125
  102. package/build/setup-RMETGJWK.js +135 -0
  103. package/build/stdio.js +32 -0
  104. package/build/{telemetry-KNWMQURH.js → telemetry-WCME5XEU.js} +4 -4
  105. package/build/{tools-VRRMBCZQ.js → tools-KAB6QBZC.js} +15 -15
  106. package/build/uninstall-FLJMBBSC.js +114 -0
  107. package/build/update-check-LNZQK3XA.js +18 -0
  108. package/build/upgrade-DTUIHVPS.js +171 -0
  109. package/build/version-I6HDAF4L.js +14 -0
  110. package/build/{watch-A75SVIQ6.js → watch-YNN255QX.js} +7 -7
  111. package/package.json +124 -53
  112. package/bin/hive.js +0 -25
  113. package/build/alias-INGXWFCG.js.map +0 -1
  114. package/build/auth-77MKFFBQ.js +0 -233
  115. package/build/auth-77MKFFBQ.js.map +0 -1
  116. package/build/cache-US4LSZPI.js.map +0 -1
  117. package/build/chunk-CGXVV6WR.js.map +0 -1
  118. package/build/chunk-CP3FXEQA.js.map +0 -1
  119. package/build/chunk-DTUDM6HX.js +0 -3108
  120. package/build/chunk-DTUDM6HX.js.map +0 -1
  121. package/build/chunk-LBTLYTZS.js +0 -115
  122. package/build/chunk-LBTLYTZS.js.map +0 -1
  123. package/build/chunk-OK3LSM73.js +0 -22
  124. package/build/chunk-OK3LSM73.js.map +0 -1
  125. package/build/chunk-QMRVH5ZP.js.map +0 -1
  126. package/build/chunk-RRI526CJ.js +0 -212
  127. package/build/chunk-RRI526CJ.js.map +0 -1
  128. package/build/chunk-WKVZVQTG.js.map +0 -1
  129. package/build/chunk-XQJ6PB2L.js.map +0 -1
  130. package/build/cli.js.map +0 -1
  131. package/build/completion-J6HFY6PS.js.map +0 -1
  132. package/build/config-ANFERP7A.js +0 -99
  133. package/build/config-ANFERP7A.js.map +0 -1
  134. package/build/config-dir-IEOID7Q6.js.map +0 -1
  135. package/build/doctor-7WZMCQC7.js.map +0 -1
  136. package/build/errors-U6UZWVSD.js.map +0 -1
  137. package/build/format-CVLLK6GD.js +0 -75
  138. package/build/format-CVLLK6GD.js.map +0 -1
  139. package/build/init-CAVIFVSH.js.map +0 -1
  140. package/build/namespace-7JWWBWBL.js.map +0 -1
  141. package/build/open-FUXYIHFO.js.map +0 -1
  142. package/build/output-7PGQWJY2.js.map +0 -1
  143. package/build/server.js.map +0 -1
  144. package/build/telemetry-KNWMQURH.js.map +0 -1
  145. package/build/tools-VRRMBCZQ.js.map +0 -1
  146. package/build/version-3TZ3U4IR.js +0 -9
  147. package/build/version-3TZ3U4IR.js.map +0 -1
  148. package/build/watch-A75SVIQ6.js.map +0 -1
@@ -0,0 +1,328 @@
1
+ ---
2
+ name: hive-build
3
+ description: Use this skill when the user is integrating Hive into application code, backend services, agents, cron jobs, source-controlled adapters, or production systems rather than asking a one-off chat query. Covers the TypeScript MCP client adapter when installed from a controlled source or release tarball, REST fallback execution, retries, typed responses, schema discovery, and safe secret handling.
4
+ license: MIT
5
+ metadata:
6
+ package: "@hiveintelligence/agent-skills"
7
+ category: "build"
8
+ requires_network: "true"
9
+ version: 1.0.0
10
+ ---
11
+
12
+ # hive-build — Integrate Hive Into App Code
13
+
14
+ Use this skill when the user is writing code that should call Hive at
15
+ runtime (a TypeScript app, Python script, Next.js API route, Rust service,
16
+ LangChain agent, Go cron job...).
17
+
18
+ If the user just wants live data in this chat, route to `hive-query`
19
+ instead. If they're adding Hive to an MCP-capable client, route to
20
+ `hive-mcp`. This skill is for "I'm writing code."
21
+
22
+ ## Integration path
23
+
24
+ - **TypeScript / custom app default** — `hive-mcp-client` from a controlled source checkout or release tarball
25
+ - **MCP transport** — `https://mcp.hiveintelligence.xyz/mcp`
26
+ - **REST fallback base** — `https://mcp.hiveintelligence.xyz/api/v1`
27
+ - **REST execute** — `POST /execute` with `{"tool": "...", "args": {...}}`
28
+ - **REST catalog** — `GET /tools?search=...&limit=...`
29
+ - **Health** — `GET https://mcp.hiveintelligence.xyz/health`
30
+
31
+ Auth header on every request: `Authorization: Bearer $HIVE_API_KEY`.
32
+
33
+ ## Pattern by language
34
+
35
+ ### Python (sync — `requests`)
36
+
37
+ ```python
38
+ import os, requests
39
+ from typing import Any
40
+
41
+ def hive(tool: str, args: dict[str, Any] | None = None) -> dict[str, Any]:
42
+ r = requests.post(
43
+ "https://mcp.hiveintelligence.xyz/api/v1/execute",
44
+ headers={"Authorization": f"Bearer {os.environ['HIVE_API_KEY']}"},
45
+ json={"tool": tool, "args": args or {}},
46
+ timeout=30,
47
+ )
48
+ r.raise_for_status()
49
+ return r.json()
50
+
51
+ print(hive("get_price", {"ids": "bitcoin", "vs_currencies": "usd"}))
52
+ ```
53
+
54
+ ### Python (async — `httpx`)
55
+
56
+ ```python
57
+ import os
58
+ import asyncio
59
+ import httpx
60
+
61
+ class HiveClient:
62
+ def __init__(self, key: str | None = None):
63
+ key = key or os.environ["HIVE_API_KEY"]
64
+ self._client = httpx.AsyncClient(
65
+ base_url="https://mcp.hiveintelligence.xyz",
66
+ headers={"Authorization": f"Bearer {key}"},
67
+ timeout=httpx.Timeout(30, connect=5),
68
+ limits=httpx.Limits(max_connections=32),
69
+ )
70
+
71
+ async def execute(self, tool: str, args: dict | None = None) -> dict:
72
+ r = await self._client.post(
73
+ "/api/v1/execute",
74
+ json={"tool": tool, "args": args or {}},
75
+ )
76
+ r.raise_for_status()
77
+ return r.json()
78
+
79
+ async def aclose(self):
80
+ await self._client.aclose()
81
+
82
+ async def briefing():
83
+ h = HiveClient()
84
+ try:
85
+ prices, tvl, oi = await asyncio.gather(
86
+ h.execute("get_price", {"ids": "bitcoin,ethereum"}),
87
+ h.execute("get_protocol_tvl", {}),
88
+ h.execute("get_open_interest", {"exchange": "binance"}),
89
+ )
90
+ return {"prices": prices, "tvl": tvl[:5], "oi": oi}
91
+ finally:
92
+ await h.aclose()
93
+ ```
94
+
95
+ Hive bills one credit per call regardless of concurrency, so fan-out
96
+ is the right default for research / reporting agents.
97
+
98
+ ### TypeScript (Node, serverless, edge)
99
+
100
+ Prefer the typed MCP adapter for TypeScript applications when you control the
101
+ server application. It centralizes the root MCP contract, auth headers, schema
102
+ lookup, endpoint invocation, retries, metadata resources, and normalized result
103
+ parsing.
104
+
105
+ ```bash
106
+ npm install hive-mcp-client
107
+ ```
108
+
109
+ ```ts
110
+ import {
111
+ createHiveMcpClient,
112
+ getHiveEndpointSchema,
113
+ invokeHiveEndpoint,
114
+ readHiveMetadataSnapshot,
115
+ } from "hive-mcp-client";
116
+
117
+ export async function getBtcPrice() {
118
+ const hive = await createHiveMcpClient({
119
+ apiKey: process.env.HIVE_API_KEY,
120
+ clientName: "my-app",
121
+ retry: { attempts: 2, baseDelayMs: 500 },
122
+ });
123
+
124
+ try {
125
+ const schema = await getHiveEndpointSchema(hive, "get_price");
126
+ const result = await invokeHiveEndpoint(hive, "get_price", {
127
+ ids: "bitcoin",
128
+ vs_currencies: "usd",
129
+ });
130
+ const metadata = await readHiveMetadataSnapshot(hive);
131
+
132
+ return {
133
+ schema,
134
+ result,
135
+ metadataStatus: metadata.status,
136
+ };
137
+ } finally {
138
+ await hive.close();
139
+ }
140
+ }
141
+ ```
142
+
143
+ Keep `HIVE_API_KEY` server-side. For browser UI, call your own backend route
144
+ and never expose a full Hive key to the client.
145
+
146
+ ### Go (`net/http`)
147
+
148
+ ```go
149
+ type HiveClient struct {
150
+ Key string
151
+ HTTP *http.Client
152
+ }
153
+
154
+ func (h *HiveClient) Execute(tool string, args any) ([]byte, error) {
155
+ body, _ := json.Marshal(map[string]any{"tool": tool, "args": args})
156
+ req, _ := http.NewRequest("POST",
157
+ "https://mcp.hiveintelligence.xyz/api/v1/execute",
158
+ bytes.NewReader(body))
159
+ req.Header.Set("Authorization", "Bearer "+h.Key)
160
+ req.Header.Set("Content-Type", "application/json")
161
+ res, err := h.HTTP.Do(req)
162
+ if err != nil { return nil, err }
163
+ defer res.Body.Close()
164
+ if res.StatusCode >= 300 { return nil, fmt.Errorf("hive %d", res.StatusCode) }
165
+ return io.ReadAll(res.Body)
166
+ }
167
+ ```
168
+
169
+ ### Rust (`reqwest`)
170
+
171
+ ```rust
172
+ use reqwest::Client;
173
+ use serde_json::{json, Value};
174
+
175
+ pub struct HiveClient {
176
+ key: String,
177
+ http: Client,
178
+ }
179
+
180
+ impl HiveClient {
181
+ pub fn new(key: String) -> Self {
182
+ Self { key, http: Client::new() }
183
+ }
184
+
185
+ pub async fn execute(&self, tool: &str, args: Value) -> reqwest::Result<Value> {
186
+ self.http
187
+ .post("https://mcp.hiveintelligence.xyz/api/v1/execute")
188
+ .header("Authorization", format!("Bearer {}", self.key))
189
+ .json(&json!({ "tool": tool, "args": args }))
190
+ .send().await?
191
+ .error_for_status()?
192
+ .json().await
193
+ }
194
+ }
195
+ ```
196
+
197
+ For typed responses, derive `Deserialize` on a struct and use
198
+ `serde_json::from_value(raw)`.
199
+
200
+ ### Java 11+ (`HttpClient`)
201
+
202
+ ```java
203
+ public class HiveClient {
204
+ private final HttpClient http = HttpClient.newBuilder()
205
+ .connectTimeout(Duration.ofSeconds(5)).build();
206
+ private final ObjectMapper json = new ObjectMapper();
207
+ private final String key = System.getenv("HIVE_API_KEY");
208
+
209
+ public Map<String, Object> execute(String tool, Map<String, Object> args)
210
+ throws Exception {
211
+ var body = json.writeValueAsString(Map.of("tool", tool, "args", args));
212
+ var req = HttpRequest.newBuilder()
213
+ .uri(URI.create("https://mcp.hiveintelligence.xyz/api/v1/execute"))
214
+ .header("Authorization", "Bearer " + key)
215
+ .header("Content-Type", "application/json")
216
+ .POST(HttpRequest.BodyPublishers.ofString(body)).build();
217
+ var res = http.send(req, HttpResponse.BodyHandlers.ofString());
218
+ if (res.statusCode() >= 300) throw new RuntimeException(res.body());
219
+ return json.readValue(res.body(), Map.class);
220
+ }
221
+ }
222
+ ```
223
+
224
+ ## Retry / backoff
225
+
226
+ Hive returns:
227
+
228
+ - **400** — invalid tool name or args. Don't retry — the request is
229
+ malformed.
230
+ - **401** — invalid API key. Don't retry — the credential is wrong.
231
+ - **429** — rate limited. Honor `Retry-After` header (in seconds).
232
+ Use exponential backoff if the header is missing.
233
+ - **500 / 502 / 503** — upstream provider failure. Exponential
234
+ backoff. Retry up to 3 times.
235
+
236
+ Pseudocode:
237
+
238
+ ```text
239
+ for attempt in 0..3 {
240
+ response = http.execute(...)
241
+ if response.status == 429 {
242
+ sleep(retry_after || 2^attempt)
243
+ continue
244
+ }
245
+ if response.status >= 500 {
246
+ sleep(2^attempt)
247
+ continue
248
+ }
249
+ return response
250
+ }
251
+ throw ExhaustedRetries()
252
+ ```
253
+
254
+ ## Tool discovery
255
+
256
+ Don't hardcode tool schemas. In TypeScript, use the adapter:
257
+
258
+ ```ts
259
+ import { searchHiveTools, getHiveEndpointSchema } from "hive-mcp-client";
260
+
261
+ const matches = await searchHiveTools(hive, { query: "wallet risk", limit: 20 });
262
+ const schema = await getHiveEndpointSchema(hive, "get_address_risk");
263
+ ```
264
+
265
+ For REST fallback clients, fetch at runtime:
266
+
267
+ ```http
268
+ GET /api/v1/tools?search=wallet&limit=200
269
+ ```
270
+
271
+ Returns a paginated list with `name`, `description`, `inputSchema`,
272
+ `metadata`. Walk pages via `meta.cursor`. New tools ship continuously
273
+ — `/api/v1/tools` is always authoritative.
274
+
275
+ For a single tool's input schema:
276
+
277
+ ```http
278
+ POST /api/v1/execute
279
+ { "tool": "get_api_endpoint_schema", "args": { "name": "get_price" } }
280
+ ```
281
+
282
+ ## Frameworks
283
+
284
+ - **LangChain** — use `hive-mcp-client/langchain` from a controlled adapter install or
285
+ `langchain-mcp-adapters` to expose Hive tools. Connect to
286
+ `https://mcp.hiveintelligence.xyz/mcp` with the auth header.
287
+ - **CrewAI** — same pattern; CrewAI accepts MCP servers via the
288
+ generic adapter.
289
+ - **Vercel AI SDK** — use `hive-mcp-client/ai-sdk` helpers from a controlled adapter install to
290
+ build the MCP transport config and select only the compact/ranked Hive tools
291
+ the model needs.
292
+ - **Spring Boot** — register the Java `HiveClient` as a `@Bean`,
293
+ inject into services, wrap with Resilience4j for retries.
294
+
295
+ ## Response envelope
296
+
297
+ Every successful response shares the same shape:
298
+
299
+ ```json
300
+ {
301
+ "ok": true,
302
+ "data": { /* tool result */ },
303
+ "meta": {
304
+ "fetched_at": "2026-04-25T07:42:11Z",
305
+ "latency_ms": 94,
306
+ "tool": "get_price",
307
+ "cached": false
308
+ }
309
+ }
310
+ ```
311
+
312
+ Read `meta.fetched_at` when surfacing freshness to the user. Ignore
313
+ the `cached` field unless the user explicitly asks about caching.
314
+
315
+ ## Runtime status handling
316
+
317
+ When building on Hive, preserve runtime status in your own response model:
318
+ `ok`, `missing_key`, `plan_required`, `rate_limited`, `degraded`, and
319
+ `failing`. Do not remove a tool from the application because a provider is
320
+ temporarily gated; surface the state and retry or fall back based on the class.
321
+
322
+ ## Reference
323
+
324
+ - TypeScript MCP client: `packages/mcp-client/README.md`
325
+ - Full API integration guide: https://www.hiveintelligence.xyz/api-integration
326
+ - SDK pages: https://www.hiveintelligence.xyz/sdk
327
+ - Errors: https://www.hiveintelligence.xyz/errors
328
+ - Rate limits: https://www.hiveintelligence.xyz/rate-limits
@@ -0,0 +1,28 @@
1
+ {
2
+ "skill_name": "hive-build",
3
+ "evals": [
4
+ {
5
+ "id": 1,
6
+ "prompt": "Build a TypeScript server helper that calls Hive safely from a Next.js API route.",
7
+ "expected_output": "Uses the source-controlled hive-mcp-client adapter only when the project has controlled source or release-tarball access, keeps HIVE_API_KEY server-side, includes schema/tool discovery helpers, timeout/retry/error handling, provenance-aware metadata handling, and no client-side secret exposure. For public registry installs or non-TypeScript stacks, uses the REST API instead of implying an unpublished npm package exists.",
8
+ "files": [],
9
+ "assertions": [
10
+ "Uses hive-mcp-client only from controlled source or a release tarball.",
11
+ "Keeps HIVE_API_KEY server-side.",
12
+ "Includes retry or error handling guidance.",
13
+ "Preserves provider/freshness/runtime metadata."
14
+ ]
15
+ },
16
+ {
17
+ "id": 2,
18
+ "prompt": "I need a Python cron job that fetches Hive crypto data daily and writes a JSON report.",
19
+ "expected_output": "Uses REST execute endpoint, environment auth, bounded calls, retry/backoff, JSON output, and provenance-aware response handling.",
20
+ "files": [],
21
+ "assertions": [
22
+ "Uses environment variable auth.",
23
+ "Explains 429 and 5xx retry behavior.",
24
+ "Mentions provider/freshness/runtime metadata in output handling."
25
+ ]
26
+ }
27
+ ]
28
+ }
@@ -0,0 +1,137 @@
1
+ ---
2
+ name: hive-build-onboarding
3
+ description: Use this skill when the user needs a Hive API key, cannot find a key, is signing up, or needs browser PKCE versus headless dashboard setup. Guide key creation without exposing secrets in chat, logs, screenshots, or committed files.
4
+ license: MIT
5
+ metadata:
6
+ package: "@hiveintelligence/agent-skills"
7
+ category: "setup"
8
+ requires_network: "true"
9
+ version: 1.0.0
10
+ ---
11
+
12
+ # hive-build-onboarding — Get a Hive API Key
13
+
14
+ Use this skill when the user says any of:
15
+
16
+ - "I don't have a Hive key"
17
+ - "How do I sign up?"
18
+ - "I lost my API key"
19
+ - "Set up Hive for me"
20
+
21
+ Hive uses passwordless magic-link auth — no username/password, no
22
+ credit card to start. Free Demo tier: 10,000 credits/month, 30
23
+ req/min.
24
+
25
+ ## Path 1 — PKCE browser flow (preferred)
26
+
27
+ If the user has a browser available on the same machine as their
28
+ terminal:
29
+
30
+ ```bash
31
+ npx -y -p hive-intelligence@latest hive init --browser
32
+ ```
33
+
34
+ What happens:
35
+
36
+ 1. The CLI generates a PKCE code verifier + challenge locally.
37
+ 2. It starts a localhost listener on a random port.
38
+ 3. It opens the user's browser at
39
+ `https://www.hiveintelligence.xyz/auth/cli?code_challenge=<challenge>&port=<port>`.
40
+ 4. The user signs in with magic-link (one-time email link, no
41
+ password). If they don't have an account, one is created.
42
+ 5. The marketing site exchanges the verified session for a fresh API
43
+ key + the original code challenge.
44
+ 6. The browser POSTs the key back to the localhost listener with the
45
+ matching verifier.
46
+ 7. The CLI stores the key in `~/.hive/credentials.json` with `0600`
47
+ permissions.
48
+ 8. The browser tab shows "You can close this window" and closes
49
+ itself.
50
+
51
+ The key never lives on the clipboard. If a step fails, the CLI
52
+ surfaces the exact error (port collision, browser refused to open,
53
+ verifier mismatch).
54
+
55
+ ## Path 2 — Dashboard copy-paste (fallback for headless)
56
+
57
+ If `init --browser` won't work (CI environment, SSH session, Docker
58
+ container, restricted network):
59
+
60
+ 1. From any machine with a browser, open
61
+ `https://www.hiveintelligence.xyz/dashboard/keys`.
62
+ 2. Click "Sign in" and enter the user's email.
63
+ 3. Open the magic-link email and click through. Account is created
64
+ automatically if it doesn't exist.
65
+ 4. Click "Create key" → name it (e.g., "production-CI") → copy the
66
+ shown secret.
67
+ 5. Set `HIVE_API_KEY=hive_live_…` in the headless environment's env.
68
+
69
+ For CI, store the key in the secret manager (GitHub Secrets, Vault,
70
+ 1Password CLI, etc.) and inject as `HIVE_API_KEY` at runtime.
71
+
72
+ ## Key prefixes
73
+
74
+ The first three characters of the secret tell you the environment:
75
+
76
+ - `hive_live_` — production key
77
+ - `hive_test_` — test mode (no rate limiting against the user's quota,
78
+ capped tools)
79
+ - `hive_dev_` — local development key
80
+
81
+ The user can have multiple keys. Plan-tier limits: Demo = 1 key,
82
+ Analyst = 10, Pro = 25, Enterprise = 100.
83
+
84
+ ## When the user can't find an old key
85
+
86
+ Hive **never reveals a key after the creation dialog closes**. The
87
+ secret is hashed server-side; only a prefix is stored. If the user
88
+ lost a key:
89
+
90
+ 1. Don't try to "recover" it — that's cryptographically impossible.
91
+ 2. Direct them to revoke it (so it can't be used by whoever has it
92
+ now): https://www.hiveintelligence.xyz/dashboard/keys → revoke.
93
+ 3. Create a new key. Update wherever the old one was used.
94
+
95
+ This is the same pattern Stripe / Linear / GitHub use. It's a feature,
96
+ not a UX bug.
97
+
98
+ ## Verifying the new key works
99
+
100
+ After Path 1 or Path 2:
101
+
102
+ ```bash
103
+ hive doctor
104
+ # or
105
+ curl -H "Authorization: Bearer $HIVE_API_KEY" \
106
+ https://mcp.hiveintelligence.xyz/api/v1/tools?limit=1
107
+ ```
108
+
109
+ A successful `doctor` shows `API key: configured` and
110
+ `Connectivity: ok`. A successful curl returns `{"data": [...], ...}`.
111
+ If you see HTTP 401 or JSON-RPC `-32001`, the key is wrong or
112
+ disabled.
113
+
114
+ ## Plan upgrade
115
+
116
+ If the user wants higher limits than the Demo tier:
117
+
118
+ - Analyst — $129/month, 500k credits, 500 req/min, 10 keys
119
+ - Pro — $499/month, 2M credits, 1k req/min, 25 keys
120
+ - Enterprise — custom, unlimited credits, 3k req/min, 100 keys
121
+
122
+ Direct them to https://www.hiveintelligence.xyz/dashboard/plans.
123
+ Today the upgrade flow is mailto-based; in-app Stripe checkout is on
124
+ the roadmap.
125
+
126
+ ## Runtime status handling
127
+
128
+ After onboarding, Hive tools may still report `missing_key`, `plan_required`,
129
+ `rate_limited`, `degraded`, or `failing` for provider-specific runtime states.
130
+ Do not create a new Hive key for provider plan gates; explain the blocked
131
+ provider/tool and the upgrade or retry path.
132
+
133
+ ## Reference
134
+
135
+ - Authentication docs: https://www.hiveintelligence.xyz/authentication
136
+ - Dashboard keys: https://www.hiveintelligence.xyz/dashboard/keys
137
+ - Public agent manifest: https://www.hiveintelligence.xyz/agent-onboarding/SKILL.md
@@ -0,0 +1,27 @@
1
+ {
2
+ "skill_name": "hive-build-onboarding",
3
+ "evals": [
4
+ {
5
+ "id": 1,
6
+ "prompt": "I do not have a Hive API key. Walk me through getting one on my laptop without pasting secrets into chat.",
7
+ "expected_output": "Uses PKCE browser flow first, avoids exposing secrets, and explains fallback dashboard setup for headless environments.",
8
+ "files": [],
9
+ "assertions": [
10
+ "Recommends npx -y -p hive-intelligence@latest hive init --browser.",
11
+ "Warns not to paste or commit API keys.",
12
+ "Provides headless fallback via dashboard and HIVE_API_KEY."
13
+ ]
14
+ },
15
+ {
16
+ "id": 2,
17
+ "prompt": "I'm setting Hive up in CI over SSH. Browser auth will not work. What should I do?",
18
+ "expected_output": "Routes to dashboard copy-paste flow, stores key in CI secret manager, and avoids clipboard/log exposure.",
19
+ "files": [],
20
+ "assertions": [
21
+ "Recognizes browser flow is unsuitable for CI or SSH.",
22
+ "Mentions HIVE_API_KEY and secret manager storage.",
23
+ "Does not request the user paste the secret into the chat."
24
+ ]
25
+ }
26
+ ]
27
+ }
@@ -0,0 +1,141 @@
1
+ ---
2
+ name: hive-cli
3
+ description: Use this skill when the user wants to run Hive from a terminal, script, cron job, jq pipeline, shell briefing, or local diagnostic command. Covers CLI auth, status, tool discovery, JSON output, and safe automation.
4
+ license: MIT
5
+ metadata:
6
+ package: "@hiveintelligence/agent-skills"
7
+ category: "setup"
8
+ requires_network: "true"
9
+ version: 1.0.0
10
+ ---
11
+
12
+ # hive-cli — Hive From the Terminal
13
+
14
+ Use this skill when the user says any of:
15
+
16
+ - "Run a CLI command for…"
17
+ - "Show me from the terminal…"
18
+ - "Pipe this into jq" / "give me a shell script"
19
+ - "Set up a daily briefing"
20
+
21
+ The Hive CLI lives in the `hive-intelligence` npm package; the
22
+ executable name is `hive`. Package and binary names differ on purpose
23
+ — the npm package also ships the stdio MCP server and bundled skills
24
+ installer. One install, multiple agent entrypoints.
25
+
26
+ ## Bootstrap
27
+
28
+ If the user doesn't have the CLI installed:
29
+
30
+ ```bash
31
+ # One-time install + auth
32
+ npx -y -p hive-intelligence@latest hive init --browser
33
+
34
+ # Or, install globally for repeated use
35
+ npm install -g hive-intelligence
36
+ hive auth login
37
+ ```
38
+
39
+ `init --browser` runs the PKCE flow described in `hive-build-onboarding`.
40
+
41
+ ## Common commands
42
+
43
+ ```bash
44
+ hive doctor # connectivity + auth check
45
+ hive status # plan, recent usage, key info
46
+ hive tools list # full live tool catalog
47
+ hive tools search <keyword> # filter the catalog
48
+ hive tools info <tool-name> # input schema for one tool
49
+ hive market price --ids bitcoin --vs usd # price query (domain subcommand)
50
+ hive defi tvl --protocol aave # DeFi TVL query
51
+ hive watch '<command>' --interval 30 # tail a query on an interval
52
+ hive uninstall --all # remove from every client
53
+ ```
54
+
55
+ Domain subcommands map directly to Hive's category namespace. Common
56
+ ones: `hive market`, `hive defi`, `hive wallet`, `hive security`,
57
+ `hive nft`, `hive prediction`. Run `hive --help` for the full list.
58
+
59
+ ## Pipe into jq
60
+
61
+ The CLI returns JSON by default — perfect for `jq`:
62
+
63
+ ```bash
64
+ # Price as a single number
65
+ hive market price --ids bitcoin --vs usd | jq '.bitcoin.usd'
66
+
67
+ # Top DeFi protocol name
68
+ hive defi protocols | jq '.[0].name'
69
+
70
+ # Count tools matching "wallet"
71
+ hive tools search wallet --format json | jq 'length'
72
+ ```
73
+
74
+ ## Daily briefing pattern
75
+
76
+ ```bash
77
+ #!/bin/bash
78
+ set -euo pipefail
79
+
80
+ echo "=== Daily Crypto Briefing ==="
81
+ echo
82
+ echo "--- Watchlist ---"
83
+ hive market price --ids bitcoin,ethereum,solana --vs usd \
84
+ | jq -r 'to_entries[] | "\(.key): $\(.value.usd)"'
85
+ echo
86
+ echo "--- Top Gainers (24h) ---"
87
+ hive market gainers-losers --vs usd --duration 24h | jq '.top_gainers[:5]'
88
+ echo
89
+ echo "--- DeFi TVL Leaders ---"
90
+ hive defi protocols \
91
+ | jq '.[:5] | .[] | "\(.name): $\(.tvl / 1000000 | floor)M"'
92
+ ```
93
+
94
+ Schedule with cron:
95
+
96
+ ```cron
97
+ 0 8 * * * /path/to/briefing.sh >> /var/log/crypto-briefing.log 2>&1
98
+ ```
99
+
100
+ ## Authentication options
101
+
102
+ 1. **`hive auth login`** — interactive PKCE browser flow. Stores key
103
+ in `~/.hive/credentials.json`. Recommended for personal machines.
104
+ 2. **`HIVE_API_KEY=hive_live_…`** — env var. Recommended for CI,
105
+ Docker, scripts. The CLI reads the env var per-command.
106
+ 3. **`hive --api-key <key> ...`** — one-shot override. Useful for
107
+ testing a different account without rotating the saved cred.
108
+
109
+ `hive status` confirms which path the CLI is using.
110
+
111
+ ## Output formats
112
+
113
+ - `--format json` (default) — clean JSON, ready for jq
114
+ - `--format table` — human-friendly columns
115
+ - `--format yaml` — yaml output
116
+ - `--quiet` — suppress headers, useful in shell pipes
117
+
118
+ ## When to use the CLI vs the MCP
119
+
120
+ - **CLI** — terminal workflows, cron jobs, shell scripts, one-off
121
+ exploration during a chat session.
122
+ - **MCP** — let Claude Code / Cursor / Claude Desktop call tools as
123
+ part of its reasoning. The user doesn't see commands; the agent
124
+ calls tools transparently.
125
+
126
+ If the user is in Claude Code and asks "what's BTC?", call the MCP
127
+ tool. If they ask "give me a shell script that fetches BTC daily",
128
+ write a `hive market price …` invocation in the script.
129
+
130
+ ## Runtime status handling
131
+
132
+ CLI and MCP responses should be interpreted with Hive's runtime states:
133
+ `ok`, `missing_key`, `plan_required`, `rate_limited`, `degraded`, and
134
+ `failing`. In scripts, retry `rate_limited` and `degraded` with backoff, but
135
+ surface `missing_key` or `plan_required` to the operator.
136
+
137
+ ## Reference
138
+
139
+ - CLI command reference: https://www.hiveintelligence.xyz/cli
140
+ - CLI tutorial: https://www.hiveintelligence.xyz/tutorials/cli
141
+ - One-command install: https://www.hiveintelligence.xyz/install/claude-skill
@@ -0,0 +1,27 @@
1
+ {
2
+ "skill_name": "hive-cli",
3
+ "evals": [
4
+ {
5
+ "id": 1,
6
+ "prompt": "Give me a terminal command to check Bitcoin and Ethereum prices with Hive and pipe the result into jq.",
7
+ "expected_output": "Uses Hive CLI market command, JSON output, jq extraction, and avoids embedding API keys in the command.",
8
+ "files": [],
9
+ "assertions": [
10
+ "Uses the hive CLI.",
11
+ "Pipes output into jq.",
12
+ "Does not inline a real API key."
13
+ ]
14
+ },
15
+ {
16
+ "id": 2,
17
+ "prompt": "Set up a daily shell briefing with Hive that I can run from cron.",
18
+ "expected_output": "Provides a shell script pattern, cron example, HIVE_API_KEY/env guidance, and JSON-safe output handling.",
19
+ "files": [],
20
+ "assertions": [
21
+ "Includes a cron-compatible command or script.",
22
+ "Mentions HIVE_API_KEY or hive auth status.",
23
+ "Uses bounded CLI queries."
24
+ ]
25
+ }
26
+ ]
27
+ }