What problem does it solve?
This Skill helps teams maintain consistent file structures and conventions when adding new React components, hooks, contexts, and Next.js pages in the Squareone monorepo, avoiding manual file setup and drift.
Core Features & Use Cases
- Guaranteed structure: Generates components, hooks, contexts, and pages with standardized directories and barrel exports.
- Consistency and conventions: Ensures CSS Modules by default and proper naming, tests, and stories where configured.
- Guided post-creation steps: Provides instructions for any manual steps like updating root barrel files after generation.
Quick Start
From the monorepo root, run:
pnpm file-factory <type> <name> --package <package-name>
Example workflow:
- Create a new component: pnpm file-factory component Button --package squareone
- Create a new hook: pnpm file-factory hook useDebounce --package squareone
- Create a new page: pnpm file-factory page dashboard --package squareone
Then follow any on-screen post-creation messages to wire exports.