$npx -y skills add ShurikenTrade/shuriken-skills --skill api-integrationUse when a user wants to integrate with or develop against the Shuriken API or SDK — covers proficiency assessment, path routing (quickstart / raw API / SDK), and tells you which deepening reference tool to reach for (OpenAPI for HTTP endpoints, the stream catalog for WebSockets,
| 1 | # Integrating and building with Shuriken |
| 2 | |
| 3 | This skill covers the full "I want to call Shuriken programmatically" surface. It is intentionally thin up front — use the deepening tools below rather than pasting long code into the session. |
| 4 | |
| 5 | ## Phase 1 — orient before writing anything |
| 6 | |
| 7 | Before pointing the user at code, establish two things: |
| 8 | |
| 9 | ### 1. Technical proficiency |
| 10 | |
| 11 | - **Absolute beginner.** New to programming, or scripting at the level of "I can run a CLI if someone tells me exactly what to type." Needs hand-holding, copy-pasteable examples, environment setup spelled out. |
| 12 | - **Intermediate / power user.** Comfortable with a terminal, editing configs, running scripts. Will follow a README but gets stuck on non-obvious toolchain setup. |
| 13 | - **Software engineer.** Fluent in at least one language, reads types and API surfaces, skims READMEs and dives into code. Wants reference material, not prose. |
| 14 | |
| 15 | Calibrate vocabulary and level of detail to this. If ambiguous, ask one clarifying question before firing off a long answer. |
| 16 | |
| 17 | ### 2. Integration path |
| 18 | |
| 19 | Three ways to call Shuriken. Help the user pick. |
| 20 | |
| 21 | - **Quickstart template** — pre-wired project scaffold with runnable examples. Supply an agent key via env var and things work out of the box. Best for beginners, intermediates, demos, and first-time evaluations. |
| 22 | - TypeScript: https://github.com/ShurikenTrade/shuriken-quickstart-ts |
| 23 | - Rust: https://github.com/ShurikenTrade/shuriken-quickstart-rs |
| 24 | - **Direct SDK integration** — add the SDK as a dependency to an existing project and wire it yourself. Best for software engineers comfortable with the surface, existing codebases, and library authors. |
| 25 | - TypeScript SDK: https://github.com/ShurikenTrade/shuriken-sdk-ts |
| 26 | - Rust SDK: https://github.com/ShurikenTrade/shuriken-sdk-rs |
| 27 | - **Raw HTTP / WebSocket** — call the API directly without an SDK. Best when the user's language isn't covered by an SDK, or when they have strong reasons to avoid pulling in a dependency. |
| 28 | |
| 29 | Rough default: quickstart for beginners/intermediates, SDK for software engineers, raw HTTP only when they've said why. |
| 30 | |
| 31 | ### 3. Agent key |
| 32 | |
| 33 | Every integration needs an agent key. See `shuriken:agent-keys` for lifecycle and `shuriken:scoping` for least-privilege scope selection. Point the user at [app.shuriken.trade/agents](https://app.shuriken.trade/agents) to create one. |
| 34 | |
| 35 | ## Phase 2 — deepen only when the question demands it |
| 36 | |
| 37 | Do **not** preload the entire API reference into the conversation. Pull deeper references only when the user's next question needs them: |
| 38 | |
| 39 | - **HTTP endpoint questions** ("what fields does /v1/foo return", "is there an endpoint for X", schema/signature questions) → call `fetch_shuriken_openapi`. This returns the live OpenAPI spec — the source of truth for HTTP endpoints. |
| 40 | - **WebSocket / streaming questions** ("what streams exist", "how do I subscribe to X", "what filters does this channel take") → call `fetch_shuriken_streams`. This returns the live v1 stream catalog with channel names, required filters, and payload formats. |
| 41 | - **Anything not answered by the two above** (guides, conceptual overviews of how a feature works, SDK-specific how-tos) → fall back to `fetch_shuriken_docs` and read the relevant page under `llms.txt`. |
| 42 | |
| 43 | Never guess an endpoint or stream name from memory — the API evolves. |
| 44 | |
| 45 | ## Best practices |
| 46 | |
| 47 | - **Use agent keys, not raw session tokens.** See `shuriken:agent-keys`. |
| 48 | - **Request only the scopes you need.** See `shuriken:scoping`. |
| 49 | - **Honour rate limits.** Back off on 429; the response headers tell you the retry window. |
| 50 | - **Don't poll when you can subscribe.** For live data, use the streams over repeated REST polls. Consult the stream catalog first. |
| 51 | - **Branch on structured error codes**, not message text. The API returns machine-readable error codes — see the OpenAPI spec for the taxonomy. |
| 52 | |
| 53 | ## When to ask clarifying questions |
| 54 | |
| 55 | Before writing code, confirm: |
| 56 | |
| 57 | - Technical proficiency level (see above). |
| 58 | - Which chain(s) the user is integrating against (Solana, EVM L1s, Base, BSC, Monad — support matrix varies). |
| 59 | - Deployment shape (one-off script, long-running service, serverless function). |
| 60 | - Integration path (quickstart / SDK / raw). |
| 61 | |
| 62 | ## Pointers |
| 63 | |
| 64 | - TypeScript SDK: https://github.com/ShurikenTrade/shuriken-sdk-ts |
| 65 | - Rust SDK: https://github.com/ShurikenTrade/shuriken-sdk-rs |
| 66 | - TypeScript quickstart: https://github.com/ShurikenTrade/shuriken-quickstart-ts |
| 67 | - Rust quickstart: https://github.com/ShurikenTrade/shuriken-quickstart-rs |
| 68 | - Related skills: `shuriken:agent-keys`, `shuriken:scoping`, `shuriken:learn-about-shuriken` |