Provides best practices and tooling configurations for building and publishing TypeScript libraries.
Install
mkdir -p .claude/skills/ts-library && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/1311" && unzip -o skill.zip -d .claude/skills/ts-library && rm skill.zipInstalls to .claude/skills/ts-library
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Use when authoring TypeScript libraries or npm packages - covers project setup, package.json exports, build tooling (tsdown/unbuild), API design patterns, type inference tricks, testing, and publishing to npm. Use when bundling, configuring dual CJS/ESM output, or setting up release workflows.Key capabilities
- →Configure dual CJS/ESM package exports
- →Setup library-specific build tools (tsdown)
- →Design type-safe API patterns
- →Configure Vitest for library testing
How it works
Uses templates and patterns derived from high-quality ecosystem tools (unbuild/tsdown) for package architecture.
Inputs & outputs
When to use ts-library
- →Configuring dual CJS/ESM package exports
- →Setting up build tooling like unbuild or tsdown
- →Designing type-safe API patterns for packages
About ts-library
Provides architectural guidance and configuration templates for npm package development. Covers modern tooling, type-safe API patterns, and cross-platform build configurations.
Use when authoring TypeScript libraries - covers project setup, package exports, build tooling (tsdown/unbuild), API design patterns, type inference tricks, testing, and release workflows. Patterns extracted from 20+ high-quality ecosystem libraries.
When not to use it
- →Creating standard application code
- →Projects not intended for npm distribution
Prerequisites
Limitations
- →Specific to library authoring, not app implementation
- →Requires knowledge of build-time bundling
How it compares
Focuses on library-specific concerns like build tooling and export patterns rather than standard React/Node application development.
Compared to similar skills
ts-library side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| ts-library (this skill) | 3 | 7mo | No flags | Intermediate |
| vitest | 41 | 8mo | No flags | Intermediate |
| zod-4 | 12 | 8mo | No flags | Intermediate |
| write-unit-tests | 5 | 5mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by onmax
View all by onmax →You might also like
vitest
antfu
Vitest fast unit testing framework powered by Vite with Jest-compatible API. Use when writing tests, mocking, configuring coverage, or working with test filtering and fixtures.
zod-4
prowler-cloud
Zod 4 schema validation patterns. Trigger: When creating or updating Zod v4 schemas for validation/parsing (forms, request payloads, adapters), including v3 -> v4 migration patterns.
write-unit-tests
tldraw
Writing unit and integration tests for the tldraw SDK. Use when creating new tests, adding test coverage, or fixing failing tests in packages/editor or packages/tldraw. Covers Vitest patterns, TestEditor usage, and test file organization.
develop-ai-functions-example
vercel
Develop examples for AI SDK functions. Use when creating, running, or modifying examples under examples/ai-functions/src to validate provider support, demonstrate features, or create test fixtures.
javascript-testing-patterns
wshobson
Implement comprehensive testing strategies using Jest, Vitest, and Testing Library for unit tests, integration tests, and end-to-end testing with mocking, fixtures, and test-driven development. Use when writing JavaScript/TypeScript tests, setting up test infrastructure, or implementing TDD/BDD workflows.
testing-patterns
davila7
Jest testing patterns, factory functions, mocking strategies, and TDD workflow. Use when writing unit tests, creating test factories, or following TDD red-green-refactor cycle.