create-from-template
Create a new app or package from an existing template in the monorepo. Use when adding new apps or packages to the repository.
When & Why to Use This Skill
This Claude skill automates the scaffolding process within a monorepo by creating new applications or packages from predefined templates. It streamlines developer workflows by handling directory cloning, intelligent path adjustments for configuration files (such as tsconfig and stylelint), and initial metadata updates, ensuring architectural consistency across the repository.
Use Cases
- Rapidly bootstrapping a new React application or micro-frontend within a complex monorepo while maintaining standardized configurations.
- Creating shared utility packages with pre-configured build tools, linting, and testing environments to promote code reuse.
- Automating the tedious manual adjustment of relative paths in configuration files (e.g., .stylelintrc, tsconfig.json) when nesting new modules deep within a directory structure.
- Ensuring all new repository components follow organizational best practices by enforcing the use of approved internal templates.
| name | create-from-template |
|---|---|
| description | Create a new app or package from an existing template in the monorepo. Use when adding new apps or packages to the repository. |
Create a New App or Package From a Template
Overview
Create a new app or package in the monorepo using an existing template.
Workflow
- Identify the template to use from
dev/templatesand the target location in the monorepo (dev/appsordev/packages). - Copy the template directory to the target location and rename it appropriately. Skip copying
coverage,dist,node_modules, and.react-routerdirectories. - Update any necessary configuration files (e.g.,
package.json) to reflect the new app or package name. - The template apps and packages are located one level deeper in the directory structure (e.g.,
dev/templates/apps/reactvs.dev/apps/some-app).- Some configuration files referring to shared paths will need to be adjusted. For example, in
.stylelintrc.jsonthe path../../../config/stylelint/.stylelintrc.json=>../../config/stylelint/.stylelintrc.json - Same is true for
tsconfig.json,tsconfig.build.json, andpostcss.config.cjsamong others.
- Some configuration files referring to shared paths will need to be adjusted. For example, in
- Update the
README.mdfile to reflect what you know about the new app or package. - Install dependencies and verify the new app or package builds and runs correctly.