Guide for bootstrapping new TypeScript libraries from the ts-builds-template. Use when creating a new npm package from this template, customizing the template for a new project, or understanding the template's project structure and dev workflow.
Ships in ts-builds-template. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This skill helps you bootstrap new TypeScript libraries from the ts-builds-template. It covers cloning, customizing, developing, and publishing a new library.
For detailed tooling configuration (tsdown, Vitest, ESLint, Prettier, TypeScript), migration guides, and standardization of existing projects, see the ts-builds skill.
# Clone the template
git clone https://github.com/jordanburke/ts-builds-template.git my-library
cd my-library
# Remove template's git history
rm -rf .git
git init
# Install dependencies
pnpm install
# Validate everything works
pnpm validate
See references/template-setup.md for the full customization checklist.
my-library/
├── src/
│ └── index.ts # Main entry point — export public API here
├── test/
│ └── *.spec.ts # Vitest tests
├── dist/ # Production builds (gitignored)
│ ├── index.js # ES module
│ └── index.d.ts # TypeScript declarations
├── tsdown.config.ts # Build config (imports from ts-builds)
├── tsconfig.json # TypeScript config (extends ts-builds)
├── package.json # Scripts, exports, dependencies
├── CLAUDE.md # Claude Code project guidance
└── README.md
After cloning, update these files for your new library:
package.json — name, description, version, repository URL, keywords, author, licenseREADME.md — describe your library, installation, usage examples, update npm badge to your package namets-builds-template in the badge URLs to your package name:
[](https://www.npmjs.com/package/YOUR-PACKAGE-NAME)
CLAUDE.md — project overview, architecture notes, custom workflowsLICENSE — update if not using MITsrc/index.ts — replace template code with your library's public APItest/*.spec.ts — replace template testspnpm dev # Watch mode — rebuilds on file changes
pnpm test:watch # Run tests in watch mode
pnpm validate # Format + Lint + Test + Build (run before commits)
All commands delegate to ts-builds for consistency across projects.
pnpm validate # Main pre-commit command
pnpm format # Format with Prettier
pnpm format:check # Check formatting only
pnpm lint # Fix ESLint issues
pnpm lint:check # Check only
pnpm test # Run tests once
pnpm test:watch # Watch mode
pnpm test:coverage # With coverage report
pnpm build # Production build (dist/)
pnpm dev # Development watch (lib/)
pnpm typecheck # TypeScript type check
# Verify package name is available
npm view my-library-name
# First publish
npm version 1.0.0
npm publish --access public
# Subsequent releases
npm version patch|minor|major
npm publish
The prepublishOnly hook runs pnpm validate automatically, ensuring code is formatted, linted, tested, and built before every publish.
The template is "type": "module" and outputs ES modules with TypeScript declarations:
{
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"default": "./dist/index.js"
}
}
}
rm -rf node_modules pnpm-lock.yaml
pnpm install
pnpm validate
rm -rf dist lib
pnpm build
Ensure test files are in test/ and named *.spec.ts or *.test.ts.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
/ts-builds-template:ts-builds-templatefrom ts-builds-template
npx claudepluginhub sapientsai/patents-mcp-server --plugin ts-builds-template