← ClaudeAtlas

sdk-designlisted

Design Stripe-grade typed SDK clients for a developer-tool API — constructor config, resource-oriented methods, typed errors, auto-pagination, idempotency, built-in retries, and a README that converts. Use when the user wants to build, generate, or review an API client library, wrapper, or SDK. Also use when they mention "npm package for our API", "Python client", Stainless/Fern/Speakeasy, or complain that integration takes too many steps, even if they never say "SDK".
alexpate/devtool-skills · ★ 0 · Web & Frontend · score 67
Install: claude install-skill alexpate/devtool-skills
# SDK Design The SDK is where a developer's first fifteen minutes with the product actually happen; nobody's first call is raw `curl` for long. The bar is Stripe and Resend: a client you can install, configure with one object, and get a typed, retried, paginated call from without reading past the README. This skill gets a client to that bar and, just as important, keeps it from bloating past it. ## Before you start Check for `.agents/devtool-context.md` and read it if present (developer persona decides languages; API surface shape decides resource naming; stage decides generated vs. handwritten). If absent, ask: 1. Who integrates this: backend engineers, frontend/full-stack, data teams? What languages do they live in? 2. What does the API surface look like: how many resources, is there an OpenAPI spec, is it still churning? 3. Is there an SDK already, or is this greenfield? ## The design, in order of consequence Positions below are defaults. Deviate only with a reason. ### 1. Constructor: one options object, nothing positional ```typescript const acme = new Acme({ apiKey: process.env.ACME_API_KEY, // also the default if omitted baseUrl: "https://api.acme.dev", // optional, for proxies/testing timeout: 30_000, // optional maxRetries: 2, // optional }); ``` - A single object, no positional args. Positional constructors (`new Acme(key, url, timeout)`) can never grow a parameter without breaking callers; an options ob