creating-packages
Creates new packages in the @kouka monorepo with proper structure, configuration, and workspace integration. Handles package.json, tsconfigs, source files, and runs necessary sync scripts.
When & Why to Use This Skill
This Claude skill automates the scaffolding of new packages within a TypeScript monorepo. It streamlines the development workflow by generating standardized directory structures, configuring package.json and tsconfig files, and handling workspace integration, ensuring consistency and reducing manual setup time for developers.
Use Cases
- Scenario 1: Rapidly initializing a new internal library or utility module within a pnpm or npm workspace with pre-configured build scripts.
- Scenario 2: Standardizing package configurations across a large-scale monorepo to ensure all modules follow the same TypeScript and architectural patterns.
- Scenario 3: Automating the boilerplate creation process for new features, including the generation of source files and barrel exports to maintain a clean project structure.
| name | creating-packages |
|---|---|
| description | Creates new packages in the @kitz monorepo with proper structure, configuration, and workspace integration. Handles package.json, tsconfigs, source files, and runs necessary sync scripts. |
Creating Packages
Create new packages in the monorepo with full scaffolding.
Steps
- Run the script at
.claude/skills/creating-packages/scripts/create-package.tswith the package name as argument - Run
pnpm installto link the new package in the workspace - Verify the package was created in
packages/<name>/
Reference
The script creates:
packages/<name>/
├── src/
│ ├── _.ts # Namespace file
│ ├── __.ts # Barrel file
│ └── <name>.ts # Main implementation
├── package.json # @kitz/<name> with workspace deps
├── tsconfig.json # Development config
└── tsconfig.build.json # Build config
Package naming:
- Input:
foo-bar→ Package:@kitz/foo-bar - Input:
core→ Package:@kitz/core
Notes
- The
kitzaggregator package is separate and exports from all other packages - After creating, you may want to add the new package to
kitz/src/exports - Run
syncing-package-scriptsskill if the new package needs updated scripts