component-colocation
Installation
SKILL.md
Component Colocation & Refactoring
Overview
React Compiler removes many performance-only reasons to split components where
it is enabled, including the canonical example app. Merge related code,
colocate files where they are used, and delete unused files. Split only for
genuine reuse, package boundaries, independent testing, or hook decoupling.
Kitcn Boundary
- Apply this to
example/**,www/**, and package UI modules after checking whether the affected app actually enables React Compiler. - Do not merge across public package exports, runtime entrypoints, generated boundaries, CLI template ownership, or React/Solid framework boundaries.
- Scaffolded fixture output is generated. Improve its source template, then regenerate fixtures; never colocate by editing committed fixture output first.