sdk-development

v2026.09.25

Use when building TypeScript SDKs, extracting shared code into packages, creating developer tooling libraries, designing clean API surfaces, or publishing to npm (public or private). Covers typed clients, error handling, multi-target bundling (ESM/CJS/browser).

GitHub
安装命令
npx skhub add srstomp/sdk-development
Markdown
SKILL.md

SDK Development

Create professional TypeScript SDKs from scratch or by extraction.

Key Principles

  • Clean public API — Export only what consumers need, hide internals
  • Type everything — Full type coverage for config, methods, responses, and errors
  • Meaningful errors — Typed error classes with codes and context
  • Sensible defaults — Works out of the box with minimal config
  • Framework agnostic — Core SDK has no framework dependencies; add bindings separately

Quick Start Checklist

  1. Analyze scope: new SDK or extraction from existing app
  2. Design public API surface (exports, types, config)
  3. Implement client with typed methods and error handling
  4. Configure build for ESM/CJS/types (tsup recommended)
  5. Write tests (unit + integration) and examples
  6. Publish to npm with proper package.json exports field

When NOT to Use

  • For consuming external APIs — see api-integration skill
  • For publishing to npm only — this skill covers full SDK lifecycle

References

ReferenceDescription
extraction-scope-and-boundaries.mdScope identification, dependency analysis, boundary definition
extraction-usages-and-planning.mdFinding usages, test coverage, phased extraction plan
package-structure-and-clients.mdSDK layout, client design patterns (single, modular, factory)
configuration-and-api-design.mdConfig interfaces, defaults, barrel exports, method signatures
internal-architecture-and-best-practices.mdHTTP client, state management, tree-shaking, environment agnostic
type-design.mdStrict types, branded types, generics, discriminated unions
error-handling-and-async.mdError class hierarchy, retry logic, request queues, token management
events-storage-and-logging.mdEvent emitter, storage abstraction, logger interface
build-tools-and-output.mdtsup config, output formats, package.json exports, TypeScript config
bundle-optimization-and-distribution.mdBundle size, multi-platform builds, dual packages, monorepo
publishing-and-registries.mdnpm publishing, private registries, versioning, changelogs
ci-cd-and-documentation.mdGitHub Actions, documentation, pre-publish checklist, deprecation
发现
标签

此技能尚未发布标签。

版本
最新版本元数据

版本

v2026.09.25

发布时间

2026年9月25日

分类

未分类

许可证

MIT

源路径

plugins/pokayokay/skills/sdk-development

默认分支

master

最新提交

ef6a34d

Tree SHA

7e3eba3