ts-create-project
Scaffold a TypeScript/Node.js project (library, CLI, app) with strict tsconfig, Vitest, ESM and CI. Use when asked to create a new TypeScript or Node.js project.
SKILL.md.claude/skills/ts-create-project/SKILL.md
GitHubScaffold a TypeScript/Node.js project with a production-ready baseline. Paths to scripts/ and templates/ are relative to this skill's directory.
Stack
- TypeScript — NodeNext modules, strict mode,
tscfor builds tsx— run TypeScript directly during development- Vitest — unit tests with globals, v8 coverage
- Node.js 26 LTS; package manager npm or pnpm
Steps
Ask first: project name; project type app / library / cli; package manager npm or pnpm
Run the scaffold script:
pwsh scripts/New-NodeProject.ps1 -ProjectName <Name> -ProjectType <app|library|cli> [-PackageManager npm]It creates the directory, copies the templates, patches
package.json, installs dependencies and initializes git.CI: copy
templates/.github/workflows/ci.ymlinto the project. It calls theGravionLabs/cireusable Node workflow, which runs thebuildandtestscripts (run-lint: falseuntil alintscript exists); if the project publishes, confirm theNPM_TOKENsecret is configured.Verify:
npm run build # tsc — no errors npm test # vitest run — all tests passNext steps: set up linting and formatting with
setup-biome-husky; migrate to pnpm withts-pnpm-workflow
Parameters: -ProjectName (required), -ProjectType (app/library/cli), -PackageManager (npm/pnpm), -OutputDirectory
Templates
| File | Purpose |
|---|---|
package.json |
ESM baseline: build, dev (tsx watch), start, test, test:ci (coverage) scripts |
tsconfig.json |
NodeNext module resolution, strict mode, sourceMap, declaration |
src/index.ts |
Minimal entry point placeholder |
vitest.config.ts |
Vitest with globals: true, v8 coverage with text + cobertura reporters |
.github/workflows/ci.yml |
GitHub Actions CI via GravionLabs/ci/.github/workflows/node-package.yml |
.gitignore |
Node.js standard ignores (dist/, node_modules/, .env) |
Constraints
"type": "module"(ESM) — no CJSrequire()- Library projects:
exports,types,filesfields inpackage.json - CLI projects:
binfield and#!/usr/bin/env nodeshebang - CI:
package.jsonmust definetestandbuildscripts; do not hardcode the Node version if the project uses.nvmrc - Build and tests must pass before the task is complete
- Workflows reference
GravionLabs/ciat the major tag@v<major>(today@v1), never@mainor a commit SHA; third-party actions stay SHA-pinned where the repository requires it
Report: summary, files created, verify commands.