hanzoai/dev / .agents/skills/ui
Design, build, or port user interfaces on the Hanzo stack (@hanzo/ui, @hanzo/gui, @hanzo/design tokens) while achieving measured visual parity across mobile, duo, laptop, and desktop viewports. Use when creating or refactoring UI screens, porting a reference implementation, or fixing layout and responsive regressions.
UI (@hanzo/ui + Visual Parity by Measurement)
Treat the reference UI or specification as an executable visual contract, not inspiration. Preserve working business logic, data model, semantics, and accessibility while making every visible state converge across mobile, duo, laptop, and desktop viewports.
1. Substrate Rules (@hanzo/ui + @hanzo/gui + @hanzo/design)
- Import layout and controls from
@hanzo/uiand@hanzo/gui(YStack,XStack,Box,View,Text,Button,Input,Textarea,Card,Separator). - Use semantic design tokens (
$ink,$soft,$faint,$edge,$sunken,$hover,$1–$8) so light and dark themes resolve automatically without hardcoded hex overrides. - Typography uses the canonical
ZenandZen Monovariable font families ($sans,$mono,$heading).
2. Convergence Order
Never begin by polishing individual components. Converge in dependency order:
- capture conditions
- shell geometry
- typography metrics
- spacing and control primitives
- screen topology / information architecture
- compound components
- state families and data-dependent regions (
loading · empty · failure · populated-minimal · populated-realistic) - responsive layouts (
mobile · duo · laptop · desktop) - pixel-level cleanup
A lower-level mismatch invalidates measurements below it. If the shell shifts every child, fix the shell and remeasure. If typography changes wrapping, fix type before vertical spacing.
3. Hard Verification Rules
- Never validate only the state that happened to render: A data-driven screen is scored once per state (
loading,empty,failure,populated), each entered deliberately by a deterministic fixture or live API seed. - Never equate DOM presence with visual presence: Verify rendered text rects and computed visibility (
hasRenderedTextRect && intersectsScope && intersectsAllClippingAncestors && !hiddenByAncestor). - Never let a screen converge by hiding: Material the reference shows must never be suppressed behind
opacity: 0, offscreen transforms, zero-height clips, or closed disclosures to pass a census.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |