creating-modules
Installation
SKILL.md
Creating Modules
Steps
-
Create module directory:
packages/<pkg>/src/<module-name>/ -
Create implementation files:
<module-name>.tsor split across multiple files -
Create barrel file
__.ts(if needed):export * from './implementation.js' export * from './other-file.js'CRITICAL: Prefer
export * fromin 99% of cases. Named re-exports (export { Foo } from) add maintenance burden and can drift. Only use named exports when you need to:- Rename on export (
export { Foo as Bar }) - Exclude specific exports (use
export *then shadow with explicit export)
- Rename on export (