| name | ui-registry |
| description | Use when tracking which UI components exist and their exact classes, so the agent reuses components instead of rebuilding divergent ones. The living index maintained alongside the imprint skill. |
ui-registry
Overview
A living index of every component that exists and the exact classes/tokens it uses. The agent checks here first and reuses — instead of building a fifth slightly-different button. Starts empty; grows as you build. Maintained by the imprint skill.
Lives at context/ui-registry.md.
When to use
- Continuously, as components get built (capture via
imprint).
- Before building any component — check for an existing match first.
What goes in it
Per component:
- Name + purpose — what it is, when to use it.
- Exact classes/tokens — the precise styling so it can be reproduced verbatim.
- Variants — sizes/states if any.
The match-before-invent rule
When building UI: search the registry for a similar component. If it exists, reuse its classes exactly. If not, build from ui-tokens + ui-rules, then add the new component here.
How to maintain
Run imprint after building UI: it captures new components and flags drift against the registry. Never let a component exist in code but not here.
Common mistakes
- Building before checking → divergent duplicates. Match first.
- Letting the registry lag the code → it stops being trustworthy. Capture as you build.