screen-compose
Build screens and views by composing existing components and blueprints. Use when you need to turn a multi-component layout into a screen with routing.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Build screens and views by composing existing components and blueprints. Use when you need to turn a multi-component layout into a screen with routing.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Infer a design system's tokens + voice from a brand reference (screenshots or a URL) — vision-assisted. Use for /mds:system:create --mode extract, feeding the design-system-author skill.
Reason about color on-system — pick/adjust accent, surfaces, and status colors within a design system's palette, check contrast/accessibility, and propose token changes (not raw hex). Adapted from open-design's color-expert. Use for color decisions during build, review, or system edits.
Build a reusable, on-system React+Tailwind component from an intent. Use when creating or editing a component in emdesign. Composes design-system primitives from "@ds", references token roles only, emits a CSF story, and feeds the verify loop.
Author or maintain a design system's DESIGN.md + tokens.css (the contract). Use when fixing the SYSTEM rather than a component — adding tokens, tightening anti-patterns, or capturing visual rules. Adapted from open-design's design-md (Google Labs / Stitch).
Designer-who-codes visual audit + fix. Use to tighten a component before shipping — run the four-source critique, then make atomic, on-system fixes with before/after screenshots. Adapted from open-design's design-review (gstack) to emdesign's code-first loop.
Create or update a design system to the emdesign quality bar — author the 9-section DESIGN.md + tokens.css + base primitives. Use for the System flow (/mds:system:create | :update). Knows the four sources: brief, blank, import, extract.
| name | screen-compose |
| description | Build screens and views by composing existing components and blueprints. Use when you need to turn a multi-component layout into a screen with routing. |
| when | After building the individual components for a page. Before creating the route and screen. |
| workflow | compose |
| commands | ["compose","screen create","screen list","blueprint apply","blueprint list","scaffold --blocks"] |
Assemble components into screens, screens into navigation structures. The CLI supports progressive composition: primitives → blueprints → views → screens, each level adding structure and routing.
Primitives (Button, Card, Input, Table) ← from design system code/
↓
Blueprints (stat-card, data-table, form-section) ← pre-composed patterns
↓
Views (Dashboard, Reports, Settings) ← composed via `compose` command
↓
Screens (DashboardPage, ReportsPage) ← created via `screen create`
↓
Routes (/dashboard, /reports) ← registered in screen metadata
emdesign ds blueprint list
emdesign ds blueprint list --category data,form,navigation
Blueprints are pre-designed composition patterns. Each lists the primitives it composes, its props, and its category.
emdesign ds blueprint apply <blueprint-id> <target-name>
Generates a component file that imports and composes the blueprint's primitives. For example:
emdesign ds blueprint apply stat-card RevenueCard
emdesign ds blueprint apply data-table TransactionsTable
Produces src/generated/RevenueCard.tsx, src/generated/TransactionsTable.tsx.
emdesign compose <view-name> --components "RevenueCard,TransactionsTable" --layout grid
Generates a view component that arranges the given components in a layout:
| Layout | Behavior |
|---|---|
stack | Vertical stack with space-y-4 |
grid | 2-column CSS grid with gap-4 |
sidebar | Fixed-width aside + flex-grow main area |
emdesign screen create <name> --route <path> [--layout <layout>]
This is the highest level of composition. It creates:
src/screens/<name>/<name>.tsx — screen componentsrc/screens/<name>/<name>.stories.tsx — story for the screensrc/screens/<name>/page.json — routing metadata (route, layout, creation timestamp)Example:
emdesign screen create Dashboard --route /dashboard
emdesign screen list
Shows all screens with their routes and layouts.
Before composing, ensure the design system has the needed primitives:
# List available building blocks
emdesign ds block list
# Scaffold specific blocks into the DS
emdesign ds scaffold <ds-id> --blocks Button,Card,Input,Select,Table,Tabs,Modal,Toast
# Filter by tags
emdesign ds block list --tags form,data,navigation
| Command | Purpose |
|---|---|
ds blueprint list | List all composition patterns |
ds blueprint apply <id> <name> | Generate component from blueprint |
ds block list | List building blocks |
ds scaffold <id> --blocks <list> | Add specific primitives to DS |
compose <name> --components <list> | Compose components into view |
screen create <name> --route <path> | Create screen with routing |
screen list | List all screens |
screen create without --layout produces a minimal wrapper. For real apps, always specify a layout.