home / skills / commontoolsinc / labs / pattern-ui
This skill enhances UI polish by applying layout and styling patterns to pattern-ui components, ensuring responsive structure and two-way data bindings.
npx playbooks add skill commontoolsinc/labs --skill pattern-uiReview the files below or copy the command above to add this skill to your agents.
---
name: pattern-ui
description: Add UI polish with layout and styling
user-invocable: false
---
# UI Polish Phase
Only do this AFTER all logic is verified and tests pass.
## Read First
- `docs/common/components/COMPONENTS.md` - Full component reference
- `docs/common/patterns/style.md` - Styling patterns
- `docs/common/patterns/two-way-binding.md` - $value, $checked bindings
## Available Components
Layout: `ct-screen`, `ct-vstack`, `ct-hstack`, `ct-box`
Input: `ct-input`, `ct-textarea`, `ct-checkbox`, `ct-select`
Action: `ct-button`
Display: `ct-text`, `ct-status-pill`
## Key Patterns
**Two-way binding:**
```tsx
<ct-input $value={field} />
<ct-checkbox $checked={done} />
```
**Layout structure:**
```tsx
<ct-screen title="My Pattern">
<ct-vstack gap="md">
<ct-hstack gap="sm">
{/* horizontal items */}
</ct-hstack>
</ct-vstack>
</ct-screen>
```
## Reference Existing Patterns
Search `packages/patterns/` for UI layout examples ONLY (not data/action patterns).
## Done When
- UI renders correctly
- Bindings work (typing updates state)
- No regression in data behavior
This skill adds UI polish to TypeScript patterns by applying layout, spacing, and styling using the project's component primitives. It focuses strictly on presenting work — not changing logic — and is intended to be run only after logic and tests are complete. The result is consistent, accessible, and maintainable UI that matches project patterns.
I use the provided layout and input components (ct-screen, ct-vstack, ct-hstack, ct-box, ct-input, ct-textarea, ct-checkbox, ct-select, ct-button, ct-text, ct-status-pill) to structure and style screens. I implement two-way bindings for form controls via $value and $checked and follow the documented styling patterns and component reference. I verify rendering, interactions, and that visual changes introduce no data or behavior regressions.
Do I change business logic during this phase?
No. Only visual structure, styling, and bindings should change; business logic and tests must remain untouched.
How do I wire inputs to state?
Use the two-way binding props: <ct-input $value={field} /> and <ct-checkbox $checked={done} /> so typing updates state automatically.