ui-composition

Classifies UI screens into six architectural component roles and emits a structured composition spec.

4|Updated Jul 30, 2026
One-click install
npx skills add https://github.com/gabriellst/codm --skill ui-composition-gabriellst
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ui-composition
Source: https://github.com/gabriellst/codm/tree/main/.claude/skills/ui-composition
Command: npx skills add https://github.com/gabriellst/codm --skill ui-composition-gabriellst

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Turning a screenshot, wireframe, or HTML mockup into an implementable React component architecture is error-prone: teams mislabel containers, duplicate components across routes, and lose track of which dialogs and forms to build. This Skill converts a visual artifact into a rigorous ## UI Composition spec section that downstream build skills can execute directly. ## Core Features & Use Cases - Citizen Classification: Maps every visible boundary to exactly one of six roles (Route Shell, Section, Component, Leaf, Dialog, Form) using an explicit taxonomy and visual cue catalog. - Structured Output: Produces seven fixed sub-sections — URL contract, ASCII layout map, component tree, per-component anatomy with ASCII mockups, data cards, reuse decisions, and an ordered hand-off table. - Reuse Governance: Searches primitive, shared, and route-local tiers to decide reuse vs. promote-to-shared vs. create-new, citing existing file paths. - Use Case: Given a screenshot of a patients list page, produce the full composition plan — StatsSection with StatCard leaves, PatientListSection owning the list query, and a hand-off table ordering /route, /component, and /form invocations. ## Quick Start Analyze this screen mockup and generate the UI Composition section for the spec, classifying each region and listing the components to build.

Frequently Asked Questions about ui-composition

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I turn a UI screenshot into a React component architecture plan?

Provide the screenshot (and optionally the HTML) as input; the skill walks the artifact, marks each visible boundary, and classifies it into Route Shell, Section, Component, Leaf, Dialog, or Form. It then emits a seven-part UI Composition section with an ASCII layout map, component tree, data cards, and a build hand-off table.

What is the difference between a Section and a Component in this taxonomy?

A boundary is a Section only if it orchestrates at least three distinct sub-components or is the sole data-fetching root of a screen region. Standalone search inputs, pagination controls, tab strips, and single stat cards are Components, not Sections.

When should a dialog be shared versus route-local?

A dialog used by one route stays in that route's -components folder; a dialog opened from two or more routes moves to the shared @/components/Dialogs/ directory with a barrel export. All dialogs open via useDialogStore.show() and never receive open/onOpenChange props.

Should filter and pagination state live in useState or URL search params?

Filters, pagination, tabs, and selected IDs must live in URL search params so they are bookmarkable and survive refresh. useState is reserved for ephemeral local state, and Zustand stores hold shared ephemeral state like typing indicators or presence.

When should I not use this UI composition skill?

Skip it for pure backend work, for creating a single primitive component in isolation, and for implementing components that are already classified — use the downstream route, component, form, or store skills instead. It is also not for generating mockups from user stories, which is the inverse direction.