Scaffold Module Structure
Establish the colocated module pattern under src/modules/ so domain code has a consistent home. Each domain (e.g. auth, trade, transactions) owns its own components/, sheets/, contexts/, hooks/, and utils/ subfolders, created on demand. This skill writes only src/modules/ plus two markdown files, no code, so future agents follow the same convention when adding features.
When to Use
- User asks to set up a module structure or scaffold
src/modules - User wants a colocated feature/domain folder convention for a new app
- User asks to add the module pattern to an existing app that lacks one
- Triggers: "scaffold module structure", "set up src/modules", "module pattern", "colocated modules", "domain folder structure"
Rules / Steps
Follow the full procedure in references/modules.md. Do not skip steps and do not paraphrase the file contents, copy them exactly as written.
High-level outline:
- Create the
src/modules/directory. - Write
src/modules/AGENTS.mddocumenting the per-domaincomponents//sheets//contexts//hooks//utils/convention. - Write
src/modules/CLAUDE.mdpointing atAGENTS.md. - Do not create subfolders up front, do not add
.gitkeepfiles, and do not scaffold an example module. Subfolders are added on demand the first time a module needs them.