UI Component Architecture

Keep React screens thin and reusable UI in its own package, separate from app screens. Triggers when authoring or restyling a page, route, screen, or component in an app that has a shared UI package — especially when a file is trending toward walls of plain <div className="..."> Tailwind markup. Bias toward reusing existing primitives in that package and graduating new reusable units into it, while avoiding premature over-extraction. Do NOT trigger for non-React code, for single-package apps with no shared UI package, or for editing the internals of one existing component. The package name is per-repo (see ADR-0013); do not require @repo/ui or @native/ui.

darkmatter 15ec271 3 files · 12.9 KB Updated

File contents

darkmatter/skills/tree/main/skills/ui-component-architecture commit 15ec2716c3

Frequently asked questions

npx skillmds@latest add darkmatter/ui-component-architecture