Clade for Codex
This workflow runs directly in Codex. Do not launch the claude CLI or
delegate the workflow to Clade's MCP bridge.
Codex compatibility rules:
- Plugin skills are namespaced. Invoke this workflow explicitly as
$clade:frontend-design; a bare $name does not select the installed Clade plugin.
- Read the nearest
AGENTS.md files for repository instructions. If a project
has only CLAUDE.md, treat it as legacy project guidance and read it too.
- Store new Clade working state under
.clade/ (or ~/.clade/ for personal
state). Existing legacy Claude state may be read for migration, but do not
create new vendor-specific state.
- A
/skill-name reference means the corresponding Codex
$clade:skill-name plugin skill, or the same workflow invoked naturally when
explicit skill invocation is not available.
- Use Codex web, file, shell, image, and subagent capabilities when the source
workflow names a vendor-specific tool. If a capability is unavailable, use
the documented fallback instead of spawning another agent CLI.
- Paths such as
<plugin-root>/... are relative to the installed Clade plugin
containing this SKILL.md; resolve that root before invoking a helper.
Canonical Clade workflow
Interface Design Pipeline
Create, prototype, redesign, audit, or optimize production-grade interfaces
across web, mobile, desktop, and native application surfaces. Preserve the
historical frontend-design entry point, but do not treat every interface as a
website.
Use evidence to decide what is best for this product. Awards reveal expressive
possibilities; platform guidance defines learned behavior; task tests and
production outcomes decide whether the result is actually better.
Operating contract
Before making visual choices:
- Read
references/ui-ux-benchmark.md completely.
- Classify the platform from the request and repository. If unclear, run
python3 <skill-root>/scripts/detect_interface_platform.py <project-root>.
Treat its result as evidence, not authority; user intent and shipped targets
win. Ask only when the unresolved platform would materially change the work.
- Read the matching platform reference completely:
- browser, responsive web, or PWA:
references/platform-web.md
- iOS, iPadOS, macOS, UIKit, SwiftUI, or AppKit:
references/platform-apple.md
- Windows, WinUI, WPF, or Windows App SDK:
references/platform-windows.md
- Android, Material, Views, or Jetpack Compose:
references/platform-android.md
- Electron, Tauri, Flutter, React Native, or another shared-code shell:
references/platform-cross-platform.md, plus every actual target platform
reference that affects the requested work
- slides, decks, or other projected/presented surfaces:
references/platform-presentation.md
- Detect the design system before choosing colors, type, spacing, components,
or motion.
- Read
references/design-direction-profiles.md for Standard and Full work,
whenever the user asks for a theme, preset, style, or alternate version, and
whenever the visual direction is materially undecided. A Micro change under
an established system may reuse the existing direction and mark this N/A.
- Read
references/design-rules.md — the checkable floor: the spacing grid,
the type-scale caps, the motion duration table, the state list, the review
widths, and the copy ban. Every rule there is phrased so design-lint, a
screenshot, or a grep can check it; "premium, modern, polished" is not a
brief, and that file is what the brief decomposes into. A Micro change
applies the sections the touched component reaches.
- Read
references/signature-motion.md when the ask names a hero animation,
a scroll-driven or "Apple-style" product story, a 3D showcase, kinetic
typography or a motion identity (眼前一亮 / 主视觉动效 / 滚动驱动动画), or
whenever the profile sets motion to 4–5 or names a signature. It carries
the vocabulary, the two archetypes with their timing budgets, the four
implementation routes and when each fits, the semantic-motion rule, and the
storyboard that must exist before any code.
For a mixed-platform product, share product logic, content, and brand tokens,
then translate platform contracts separately. Do not average incompatible
platform conventions into one lowest-common-denominator UI.
Scope lane
Run every phase below for every UI task, but scale the evidence and artifacts to
the decision risk:
- Micro — a local, reversible component or style correction. Reuse existing
product evidence; compare the platform rule and one relevant in-product or
external pattern. Do not manufacture a research project.
- Standard — a component family, page, screen, or user flow. Use the official
platform source, two direct-product flows where available, one mature design
system, and one known failure/counterexample.
- Full — a new product, major redesign, unfamiliar interaction, or
cross-platform system. Use the complete benchmark set: official platform,
two direct competitors, an awarded reference, a mature design system, and a
counterexample. Capture complete flows rather than hero screenshots.
State the lane and rationale. A skipped phase is not invisible: mark it N/A
with a concrete reason.
Review-only requests
When the ask is to review, audit, or 挑毛病 an existing surface rather than to
build one, run phase 1 (baseline captures) and phase 6 (the review in
references/design-review.md) and skip the rest with N/A. Deliver findings
by P0–P3 severity, each with the rule it breaks and the fix; then apply the
fixes unless the user asked for a report only. No adjectives — "modern, clean,
professional" is not a finding.
Seven-phase pipeline
1. Lock the problem
Identify the target users, target platform(s), and three most important tasks.
Classify the request as greenfield design, optimization, or implementation of an
approved spec. Record technical constraints, input modes, accessibility needs,
locales, performance budget, and the desired outcome.
Draft the one-line Design Read and a clade.design-direction/v1 profile from
references/design-direction-profiles.md. Treat both as hypotheses until the
benchmark confirms them. For redesigns, choose preserve, evolve, or
reframe explicitly; never smuggle a reframe into a request for polish.
For greenfield and reframe work, also write the Style DNA — six lines,
each concrete enough to grep or screenshot against:
Personality: three adjectives — precise, trustworthy, calm (not cold)
Must not read as: the AI SaaS template; purple gradients; glassmorphism;
floating orbs; every block in a rounded card
Signature marks: 3–5 repeated features — large condensed headlines; mono for
data and status; hairline borders on a visible grid; one
green for action and success; panels slide 8 px on open
Density: marketing surfaces loose, working surfaces compact
Radius: container 8 / button 6 / tag 999 — not every element a pill
Shadow: only on what floats; cards separate by border, ground, space
"Premium, modern, techy" is not a DNA. "Techy" has to say which typeface,
radius, border, colour, motion and density. Reference products are allowed only
as split borrowings — A's density, B's type register, C's motion speed — never
one product's page structure. Style comes from repeated choices, not from
personality on all five axes (type, colour, geometry, imagery, motion) at
once: pick one or two as the identity and keep the rest quiet.
For optimization, establish the baseline before editing: capture the current
rendered surface and important flows, list observed failures, and tie each
proposed change to task success, error recovery, comprehension, accessibility,
or a product metric. Do not translate personal taste into an unqualified
"improvement."
2. Build the benchmark
Use the evidence ladder and reference-set rules in
references/ui-ux-benchmark.md. Inspect complete states and flows: loading,
empty, error, permission, offline, undo, keyboard, touch, and destructive paths
where relevant. Separate observations from hypotheses.
Produce a compact benchmark brief containing:
- the reusable pattern and why it fits this task;
- the platform behavior that must remain native;
- the product behavior worth inventing;
- the brand expression worth making distinctive;
- rejected patterns and why they fail here.
Confirm or revise the Design Read and profile after reviewing the evidence.
3. Define behavior before decoration
Specify information hierarchy, navigation, content, and the shortest coherent
task path. For each interactive component, consider:
- rest, hover where available, keyboard focus, pressed, selected, disabled, and
loading;
- success, empty, error, permission, offline, undo, and recovery states at the
flow level;
- mouse/trackpad, keyboard, touch, stylus, assistive technology, and remote/game
controller inputs only where the target platform supports them;
- localization expansion, dynamic type/font scaling, dark/high-contrast modes,
and reduced motion.
Hover must never carry required information. Cursor changes must follow
platform and component semantics, not fashion. Motion must perform at least one
job: confirm feedback, explain spatial relationship, preserve continuity, guide
attention, or express progress. If removing an animation does not make the
change harder to understand, omit it.
4. Choose the visual checkpoint
Brand surfaces first: if this is a brand's own site or landing page, if
sibling products must not look related, or if "make it distinctive" is part of
the ask, load references/brand-differentiation.md and follow it before
choosing anything visual. It carries the standing constraints — the visual-school
pool, the four-dimension palette method, the banned default palettes and
typefaces, the signature-interaction rules, and the anti-laziness checklist.
Those constraints were being hand-typed into prompts for five months while this
skill did not contain them; the one thing not to do is design from taste and
then check the file afterwards.
Decide whether a preview reduces meaningful rework:
| Situation |
Default checkpoint |
| Existing runnable web/app surface |
Build in its real component preview, dev route, story, or sandbox |
| New browser UI or a purely visual concept |
Create a small standalone HTML/CSS/JS prototype with realistic content |
| Native app with uncertain hierarchy, density, color, or type |
HTML is allowed as a clearly labelled visual hypothesis only |
| Native interaction, window, menu, focus, touch, pointer, haptic, or accessibility behavior |
Use SwiftUI/Compose/WinUI/XAML or the platform's real preview/simulator |
| Small reversible change under an established system |
Implement directly and inspect the rendered result |
| Signature motion — hero intro, scroll-driven product story, 3D showcase |
The storyboard table from references/signature-motion.md §6 first, then a rendered checkpoint of the signature moment alone before the full build |
Three materially different directions before one is chosen — Full-lane
greenfield or reframe only. Each direction is a Style DNA card with a different
school, type strategy, geometry, density and motion character, plus why it fits
this product and what could go wrong with it. Three recolours of one layout are
not three directions. Pick one, or ask the owner to, then proceed. Under an
established design system, or for Micro and Standard work, mark this N/A.
Component lab before business pages. Before the first real screen, build a
/design-lab — a Storybook story, a dev route, or one standalone HTML page —
that shows the type scale, the palette, buttons, inputs, select, card, table,
modal, tooltip, tabs, toast, status tags, a chart, the empty and loading states,
and one motion example, in every state references/design-rules.md §7 lists.
Skip it and the first-page button, the dashboard button and the settings-page
input drift apart; the lab is where the token scale is proven once.
Signature motion is storyboarded before it is coded. For a hero intro or a
scroll-driven product story, fill the segment table in
references/signature-motion.md §6 — range, product, camera, light, copy, page
state per segment — choose the implementation route by the shot (frame
sequence + canvas + ScrollTrigger by default; real-time 3D only when the user
must control the product), and state the budgets: intro length and its four
beats, idle cadence, pointer response, pinned chapter length, frame counts per
device, the reduced-motion static state. The motion must show the product's
capability with the copy removed; "add some cool animation" is not a brief and
is answered with the storyboard, not with fade-ins.
Once a direction is chosen, prefer one recommended checkpoint. Produce a second
variant only when a real tradeoff remains unresolved by evidence; do not
generate decorative option sprawl.
When composition or motion is 4 or 5, require a rendered checkpoint before
committing to the direction. When comparing versions, hold content, tasks, and
platform behavior constant and state the exact profile delta.
If the user asked to see the direction before implementation, make the preview
viewable, provide the local/live URL or rendered image, and stop at that
checkpoint for confirmation. Otherwise use the checkpoint as an internal
review step and continue. Never present an HTML mockup as proof of native
behavior.
5. Implement in the real surface
Use the existing framework, components, and repository conventions. Do not
replace a working stack merely to express an aesthetic. Match implementation
complexity to the value of the interaction.
Apply this precedence order when rules conflict:
- safety, accessibility, and user data integrity;
- platform input, semantic, window, and navigation contracts;
- the project's explicit design system and shipped component library;
- the product's task model and content;
- brand expression and visual novelty;
- general aesthetic guidance.
This is not a choice between native and custom. Keep the platform skeleton,
invent the product brain, and express the brand without breaking either.
One representative page first. Polish one representative screen to the
Definition of Done in references/design-review.md, then extend that language
to the rest. Never build ten pages in one pass: the rules drift a little per
page and the drift compounds until the pages no longer read as one product.
Tokens only — no colour, size, spacing, radius or shadow outside the scale
without a written reason at the site; design-lint source names each one.
6. Verify the implementation
Use three evidence tiers:
- Source/static — types, lint, hard-rule grep, semantics, token usage,
and
design-lint source <dir> for the spacing grid, type-scale caps, motion
table, token discipline and copy.
- Rendered/interactive — real viewports or native previews, screenshots,
focus order, keyboard/touch/pointer behavior, state transitions, contrast,
text scaling, reduced motion, overflow, and realistic data.
- Outcome — representative users performing target tasks, then production
success, completion time, errors, abandonment, support tickets, retention,
conversion, and performance percentiles where applicable.
Run the repository's tests and the platform checks named in the selected
reference. For HTML/web output, run design-lint html <artifact> and inspect the
live result at every declared viewport. A clean static check does not prove a
rendered rule. For decks, run design-lint deck and, once rendered,
design-lint render.
Then run the review in references/design-review.md: capture the page at
390 / 768 / 1280 / 1440 (or the declared breakpoints), list findings by P0–P3
with no adjectives, fix them in code, re-capture, and repeat until no P0 or P1
remains. Run design-lint source before the loop and again after; its WARN
lines are questions the review answers with a fix or a written reason, never
noise. The first generated version is a structural draft — report the counts
at the start and at the end of the loop, not "looks good now".
Do not claim user testing, assistive-technology coverage, device coverage, or
production improvement unless it actually occurred. Report an unrun tier as a
named follow-up gate, not as a pass.
7. Compare and record
For optimization, compare before and after against the same tasks and
constraints. Record decisions, rejected experiments, remaining uncertainty,
and the next measurable signal. For a substantial or long-lived design, append
the decision to the project's design-system Decisions Log when one exists.
Design system integration
Use the first design-system source found:
test -f .design-system.md && echo "FOUND: .design-system.md"
test -f design-system/SKILL.md && echo "FOUND: design-system/SKILL.md"
test -f DESIGN.md && echo "FOUND: DESIGN.md"
When one exists:
- Read it fully before visual implementation.
- Use its defined color, typography, spacing, motion, and component tokens.
Treat
[placeholder] as undefined and exercise freedom only there.
- Import its shipped components and brand assets; never redraw a supplied logo
or rebuild a component primitive without a documented reason.
- Enforce grep-able hard rules against every task-owned file. Use a rendered
validator for rules about contrast, size, coverage, hierarchy, or motion.
- Verify every declared viewport and appearance mode.
- Record significant choices and rejected experiments in its Decisions Log.
When no design system exists, define a small constrained token scale before
composing. Do not create a permanent design system unless the user asks for one
or the implementation clearly requires reusable governance.
If asked to author a design system, ship:
SKILL.md no longer than 100 lines with grep-able hard rules, token summary,
component pointers, and a review checklist;
DESIGN.md with rationale, component/state specifications, principle-to-
application statements, open tensions, and a Decisions Log;
- paste-ready tokens, components, and brand assets;
- a validator for every hard rule that targets rendered output.
Component and aesthetic rules
- Prefer the project's component library. Use shadcn, MUI, Ant Design, Radix,
SwiftUI/UIKit/AppKit, WinUI, Compose/Material, Flutter, or other declared
primitives rather than rebuilding their contracts from scratch.
- Define the shared control set once, before the first screen: button
(every variant and size), text input and its field states, card/surface, and
navigation. Each gets its spacing, radius, border, type and state values
written into the design-system file, and every screen reuses that definition.
A second button style, a card whose radius differs from the one two sections
up, or a nav that changes between pages is an inconsistency defect, not a
per-page decision. Where the chosen school makes a component shape non-default
(
references/brand-differentiation.md Step 6), state that shape once for the
whole set rather than per screen.
- Prove hierarchy in grayscale through size, weight, order, and space before
relying on color.
- Use constrained type, spacing, radius, elevation, color, and motion scales.
- Choose a clear aesthetic direction appropriate to the product. Distinction
should come from coherent hierarchy, content, composition, data expression,
and a few signature moments, not effects on every control.
- A platform/system font is often the correct native choice. On expressive web
and brand surfaces, choose typography deliberately; never reject a system
font merely because it is common.
- Avoid generic AI styling: context-free purple gradients, interchangeable card
grids, arbitrary glass, excessive pills, decorative dashboards, fake native
chrome, and motion without a job.
- Do not add custom cursors, scroll hijacking, parallax, blur, grain, or texture
unless they support the concept and survive platform, contrast, performance,
and reduced-motion checks.
Accessibility and legibility floors
These are floors, not aesthetic targets. A design system may raise but never
lower them.
- On web, meet WCAG 2.2 AA: body text at least 4.5:1; large text and meaningful
non-text UI at least 3:1 against the real backdrop.
- Keep focus visible. Never remove an outline without an equally visible
replacement, and ensure focused content is not obscured.
- Meet the target platform's minimum hit size; for web, never go below the WCAG
24x24 CSS px minimum/spacing exception and aim near 44px for primary touch
actions.
- Guard or neutralize animation under reduced-motion settings.
- On web, use real headings, links, buttons, labels, and image alternatives
before ARIA. On native platforms, use real accessibility roles, names,
values, actions, and focus order.
- Test text enlargement, localization expansion, high contrast, keyboard or
switch access, and screen readers when relevant. Mark human/device-only checks
truthfully.
Presentation surfaces
For slides and decks, also follow references/platform-presentation.md and
invert browser assumptions:
- Give each slide one dominant thesis with roughly 60/30/10 visual hierarchy.
- Keep audience-facing body copy at least 18pt where possible, with about 13pt
as a metadata-only floor; keep the main slide near 70 words or fewer.
- Use heavy full-bleed surfaces as focal beats, not ambient decoration.
- Review at presentation distance and validate the rendered artifact, not only
the source.
Public-web SEO only
Apply SEO metadata only to public, crawlable web pages. Do not add it to native
apps, internal tools, isolated components, or visual prototypes unless they are
also public pages. For an applicable page include a unique title, description,
canonical URL, Open Graph title/description/image/URL, and appropriate WebSite
or Organization structured data. Use the framework's native metadata API.
Required handoff
Start the implementation handoff with:
## Design Decisions
- **Scope lane**: [Micro / Standard / Full — rationale]
- **Platform**: [detected target(s), inputs, and platform reference loaded]
- **Design system**: [source and tokens/components used, or none]
- **Design direction**: [Design Read; `clade.design-direction/v1` preset,
variant, mode, family, composition/motion/density, source, and overrides; or
`N/A` for a Micro change that reuses an established direction]
- **Style DNA** (greenfield / reframe): [personality; must-not-read-as;
signature marks; density; radius; shadow]
- **Directions considered** (Full greenfield / reframe): [three, one line each,
and why the chosen one]
- **Benchmark**: [reference set, reusable pattern, counterexample, rejected choice]
- **Brand differentiation** (brand surfaces only): [visual school and why; the
four palette decisions; typeface and why, with its line heights and its weight
set; signature interaction, **the technology chosen to build it and why that
one over the alternatives**, and how it belongs to both school and subject;
and the final test — beside a typical Linear or Vercel site, are these visibly
two different companies?]
- **Core components**: [button per variant, text input, card, navigation —
radius, border, padding, elevation, and hover/focus/pressed treatment, stated
once. Every screen consumes these; a screen needing a new component adds it
here first.]
- **Screens in scope**: [the enumerated screens or routes this spec governs, so
"implemented consistently across all of them" is checkable rather than felt.]
- **Native vs custom**: [platform skeleton / product brain / brand expression]
- **Visual checkpoint**: [real surface / HTML study / native preview / direct implementation — why]
- **State and motion**: [states covered; each motion's job or no-motion decision]
- **Signature motion** (only when one exists): [archetype — scroll story or
hero intro; route and why; the storyboard table or its location; intro /
idle / pointer budgets; frame counts per device; reduced-motion state; the
§7 acceptance items not yet met]
- **Verification**: [source, rendered/interactive, and outcome evidence; explicit unrun gates]
- **Review loop**: [widths captured; P0/P1 count at start → at end; P2/P3
left and their owner; `design-lint source` FAIL/WARN counts before and after]
- **Measured worst contrast**: [ratio and tool/lane, or truthful reason it was not measurable]
Before reporting completion:
- confirm every pipeline phase is represented or marked
N/A with a reason;
- run project tests, design-system checks, and selected platform verification;
- inspect the real rendered/native result rather than trusting source alone;
- confirm every screen named in Screens in scope was implemented against the
design note, and name any screen deliberately left on the old system;
- confirm no implemented screen introduces a colour, font, radius, or motion
duration that is absent from the design note — cross-screen consistency is the
deliverable, not a side effect;
- walk the Definition of Done in
references/design-review.md item by item for
every screen in scope, and name the items that are not met rather than
rounding them up;
- preserve task-owned work through the repository delivery workflow;
- use
DONE_WITH_CONCERNS when human/device/production evidence needed for the
user's stated outcome remains unavailable.
Use DONE, DONE_WITH_CONCERNS, BLOCKED, or NEEDS_CONTEXT truthfully. After
three failures of the same approach, stop repeating it and report the blocking
condition.
Additional skill reference
Interface Design Pipeline
Guides interface work from evidence and platform choice through preview,
implementation, and verification. The historical frontend-design name stays
for compatibility; the workflow covers web, mobile, desktop, and native apps.
Usage
/frontend-design # Run the platform-aware interface pipeline
/frontend-design profile=soft-premium motion=1
/frontend-design review <path-or-url> # P0–P3 review of an existing surface, fixes applied
"Design sense" is carried as checkable rules, not adjectives: the spacing
grid, type-scale caps, motion duration table, state list and review widths in
references/design-rules.md; the screenshot review loop, severity ladder and
Definition of Done in references/design-review.md; and `design-lint source
Every invocation classifies the target platform and task size, reads the shared
benchmark contract plus the relevant platform adapter, then runs all seven
pipeline phases at proportional depth. It respects the project's design system,
keeps platform contracts native, and makes product workflow and brand choices
deliberately.
For a theme, style, or alternate version, select a named design-direction
profile or infer a custom one, then tune composition, motion, and density. A
profile is a reusable hypothesis; repository and platform evidence still win.
When visual direction is materially uncertain, it creates a viewable checkpoint
before expensive implementation. HTML is preferred for browser UI and may be
used as a clearly labelled visual study for native apps; native behavior must be
validated in the real platform preview, simulator, or running app.
Delivery completion
If this workflow changes files or external state:
- Inspect the real final state before responding, including
git status for a
repository task.
- Never report
DONE while task-owned changes are uncommitted. Use or continue
$clade:delivery and create a repository-compliant checkpoint or preserve
the work when committing is unavailable.
- When the user request or trusted repository policy makes publication,
deployment, or live verification part of the task, do not silently downgrade
the result to local-only work.
- If a required delivery transition lacks authority, credentials, a destination,
or reachable external state, report
BLOCKED or NEEDS_CONTEXT rather than
appending a "not committed/pushed/deployed" caveat after DONE.
1---2name: frontend-design-33description: Create, prototype, redesign, audit, or optimize production-grade interfaces across websites, responsive/mobile web, iOS/iPadOS/macOS, Android, Windows, Electron/Tauri, Flutter/React Native, and other local/native apps — UI/UX, visual polish, named or tunable themes and design variants, components, interaction and motion, design systems, and decks, including requests such as 设计页面、优化网页/界面/UI、设计主题/视觉风格/界面版本. Runs a platform-aware benchmark, design-direction profiles, an optional preview checkpoint, implementation, accessibility checks, and rendered/live verification.4---56# Clade for Codex78This workflow runs **directly in Codex**. Do not launch the `claude` CLI or9delegate the workflow to Clade's MCP bridge.1011Codex compatibility rules:1213- Plugin skills are namespaced. Invoke this workflow explicitly as14 `$clade:frontend-design`; a bare `$name` does not select the installed Clade plugin.15- Read the nearest `AGENTS.md` files for repository instructions. If a project16 has only `CLAUDE.md`, treat it as legacy project guidance and read it too.17- Store new Clade working state under `.clade/` (or `~/.clade/` for personal18 state). Existing legacy Claude state may be read for migration, but do not19 create new vendor-specific state.20- A `/skill-name` reference means the corresponding Codex21 `$clade:skill-name` plugin skill, or the same workflow invoked naturally when22 explicit skill invocation is not available.23- Use Codex web, file, shell, image, and subagent capabilities when the source24 workflow names a vendor-specific tool. If a capability is unavailable, use25 the documented fallback instead of spawning another agent CLI.26- Paths such as `<plugin-root>/...` are relative to the installed Clade plugin27 containing this `SKILL.md`; resolve that root before invoking a helper.2829## Canonical Clade workflow3031# Interface Design Pipeline3233Create, prototype, redesign, audit, or optimize production-grade interfaces34across web, mobile, desktop, and native application surfaces. Preserve the35historical `frontend-design` entry point, but do not treat every interface as a36website.3738Use evidence to decide what is best for this product. Awards reveal expressive39possibilities; platform guidance defines learned behavior; task tests and40production outcomes decide whether the result is actually better.4142## Operating contract4344Before making visual choices:45461. Read `references/ui-ux-benchmark.md` completely.472. Classify the platform from the request and repository. If unclear, run48 `python3 <skill-root>/scripts/detect_interface_platform.py <project-root>`.49 Treat its result as evidence, not authority; user intent and shipped targets50 win. Ask only when the unresolved platform would materially change the work.513. Read the matching platform reference completely:52 - browser, responsive web, or PWA: `references/platform-web.md`53 - iOS, iPadOS, macOS, UIKit, SwiftUI, or AppKit:54 `references/platform-apple.md`55 - Windows, WinUI, WPF, or Windows App SDK:56 `references/platform-windows.md`57 - Android, Material, Views, or Jetpack Compose:58 `references/platform-android.md`59 - Electron, Tauri, Flutter, React Native, or another shared-code shell:60 `references/platform-cross-platform.md`, plus every actual target platform61 reference that affects the requested work62 - slides, decks, or other projected/presented surfaces:63 `references/platform-presentation.md`644. Detect the design system before choosing colors, type, spacing, components,65 or motion.665. Read `references/design-direction-profiles.md` for Standard and Full work,67 whenever the user asks for a theme, preset, style, or alternate version, and68 whenever the visual direction is materially undecided. A Micro change under69 an established system may reuse the existing direction and mark this `N/A`.706. Read `references/design-rules.md` — the checkable floor: the spacing grid,71 the type-scale caps, the motion duration table, the state list, the review72 widths, and the copy ban. Every rule there is phrased so `design-lint`, a73 screenshot, or a grep can check it; "premium, modern, polished" is not a74 brief, and that file is what the brief decomposes into. A Micro change75 applies the sections the touched component reaches.767. Read `references/signature-motion.md` when the ask names a hero animation,77 a scroll-driven or "Apple-style" product story, a 3D showcase, kinetic78 typography or a motion identity (眼前一亮 / 主视觉动效 / 滚动驱动动画), or79 whenever the profile sets `motion` to 4–5 or names a `signature`. It carries80 the vocabulary, the two archetypes with their timing budgets, the four81 implementation routes and when each fits, the semantic-motion rule, and the82 storyboard that must exist before any code.8384For a mixed-platform product, share product logic, content, and brand tokens,85then translate platform contracts separately. Do not average incompatible86platform conventions into one lowest-common-denominator UI.8788## Scope lane8990Run every phase below for every UI task, but scale the evidence and artifacts to91the decision risk:9293- **Micro** — a local, reversible component or style correction. Reuse existing94 product evidence; compare the platform rule and one relevant in-product or95 external pattern. Do not manufacture a research project.96- **Standard** — a component family, page, screen, or user flow. Use the official97 platform source, two direct-product flows where available, one mature design98 system, and one known failure/counterexample.99- **Full** — a new product, major redesign, unfamiliar interaction, or100 cross-platform system. Use the complete benchmark set: official platform,101 two direct competitors, an awarded reference, a mature design system, and a102 counterexample. Capture complete flows rather than hero screenshots.103104State the lane and rationale. A skipped phase is not invisible: mark it `N/A`105with a concrete reason.106107## Review-only requests108109When the ask is to review, audit, or 挑毛病 an existing surface rather than to110build one, run phase 1 (baseline captures) and phase 6 (the review in111`references/design-review.md`) and skip the rest with `N/A`. Deliver findings112by P0–P3 severity, each with the rule it breaks and the fix; then apply the113fixes unless the user asked for a report only. No adjectives — "modern, clean,114professional" is not a finding.115116## Seven-phase pipeline117118### 1. Lock the problem119120Identify the target users, target platform(s), and three most important tasks.121Classify the request as greenfield design, optimization, or implementation of an122approved spec. Record technical constraints, input modes, accessibility needs,123locales, performance budget, and the desired outcome.124125Draft the one-line `Design Read` and a `clade.design-direction/v1` profile from126`references/design-direction-profiles.md`. Treat both as hypotheses until the127benchmark confirms them. For redesigns, choose `preserve`, `evolve`, or128`reframe` explicitly; never smuggle a reframe into a request for polish.129130For greenfield and reframe work, also write the **Style DNA** — six lines,131each concrete enough to grep or screenshot against:132133```text134Personality: three adjectives — precise, trustworthy, calm (not cold)135Must not read as: the AI SaaS template; purple gradients; glassmorphism;136 floating orbs; every block in a rounded card137Signature marks: 3–5 repeated features — large condensed headlines; mono for138 data and status; hairline borders on a visible grid; one139 green for action and success; panels slide 8 px on open140Density: marketing surfaces loose, working surfaces compact141Radius: container 8 / button 6 / tag 999 — not every element a pill142Shadow: only on what floats; cards separate by border, ground, space143```144145"Premium, modern, techy" is not a DNA. "Techy" has to say which typeface,146radius, border, colour, motion and density. Reference products are allowed only147as split borrowings — A's density, B's type register, C's motion speed — never148one product's page structure. Style comes from repeated choices, not from149personality on all five axes (type, colour, geometry, imagery, motion) at150once: pick one or two as the identity and keep the rest quiet.151152For optimization, establish the baseline before editing: capture the current153rendered surface and important flows, list observed failures, and tie each154proposed change to task success, error recovery, comprehension, accessibility,155or a product metric. Do not translate personal taste into an unqualified156"improvement."157158### 2. Build the benchmark159160Use the evidence ladder and reference-set rules in161`references/ui-ux-benchmark.md`. Inspect complete states and flows: loading,162empty, error, permission, offline, undo, keyboard, touch, and destructive paths163where relevant. Separate observations from hypotheses.164165Produce a compact benchmark brief containing:166167- the reusable pattern and why it fits this task;168- the platform behavior that must remain native;169- the product behavior worth inventing;170- the brand expression worth making distinctive;171- rejected patterns and why they fail here.172173Confirm or revise the Design Read and profile after reviewing the evidence.174175### 3. Define behavior before decoration176177Specify information hierarchy, navigation, content, and the shortest coherent178task path. For each interactive component, consider:179180- rest, hover where available, keyboard focus, pressed, selected, disabled, and181 loading;182- success, empty, error, permission, offline, undo, and recovery states at the183 flow level;184- mouse/trackpad, keyboard, touch, stylus, assistive technology, and remote/game185 controller inputs only where the target platform supports them;186- localization expansion, dynamic type/font scaling, dark/high-contrast modes,187 and reduced motion.188189Hover must never carry required information. Cursor changes must follow190platform and component semantics, not fashion. Motion must perform at least one191job: confirm feedback, explain spatial relationship, preserve continuity, guide192attention, or express progress. If removing an animation does not make the193change harder to understand, omit it.194195### 4. Choose the visual checkpoint196197**Brand surfaces first**: if this is a brand's own site or landing page, if198sibling products must not look related, or if "make it distinctive" is part of199the ask, load `references/brand-differentiation.md` and follow it before200choosing anything visual. It carries the standing constraints — the visual-school201pool, the four-dimension palette method, the banned default palettes and202typefaces, the signature-interaction rules, and the anti-laziness checklist.203Those constraints were being hand-typed into prompts for five months while this204skill did not contain them; the one thing not to do is design from taste and205then check the file afterwards.206207Decide whether a preview reduces meaningful rework:208209| Situation | Default checkpoint |210|---|---|211| Existing runnable web/app surface | Build in its real component preview, dev route, story, or sandbox |212| New browser UI or a purely visual concept | Create a small standalone HTML/CSS/JS prototype with realistic content |213| Native app with uncertain hierarchy, density, color, or type | HTML is allowed as a clearly labelled **visual hypothesis only** |214| Native interaction, window, menu, focus, touch, pointer, haptic, or accessibility behavior | Use SwiftUI/Compose/WinUI/XAML or the platform's real preview/simulator |215| Small reversible change under an established system | Implement directly and inspect the rendered result |216| Signature motion — hero intro, scroll-driven product story, 3D showcase | The storyboard table from `references/signature-motion.md` §6 first, then a rendered checkpoint of the signature moment alone before the full build |217218**Three materially different directions before one is chosen** — Full-lane219greenfield or reframe only. Each direction is a Style DNA card with a different220school, type strategy, geometry, density and motion character, plus why it fits221this product and what could go wrong with it. Three recolours of one layout are222not three directions. Pick one, or ask the owner to, then proceed. Under an223established design system, or for Micro and Standard work, mark this `N/A`.224225**Component lab before business pages.** Before the first real screen, build a226`/design-lab` — a Storybook story, a dev route, or one standalone HTML page —227that shows the type scale, the palette, buttons, inputs, select, card, table,228modal, tooltip, tabs, toast, status tags, a chart, the empty and loading states,229and one motion example, in every state `references/design-rules.md` §7 lists.230Skip it and the first-page button, the dashboard button and the settings-page231input drift apart; the lab is where the token scale is proven once.232233**Signature motion is storyboarded before it is coded.** For a hero intro or a234scroll-driven product story, fill the segment table in235`references/signature-motion.md` §6 — range, product, camera, light, copy, page236state per segment — choose the implementation route by the shot (frame237sequence + canvas + ScrollTrigger by default; real-time 3D only when the user238must control the product), and state the budgets: intro length and its four239beats, idle cadence, pointer response, pinned chapter length, frame counts per240device, the reduced-motion static state. The motion must show the product's241capability with the copy removed; "add some cool animation" is not a brief and242is answered with the storyboard, not with fade-ins.243244Once a direction is chosen, prefer one recommended checkpoint. Produce a second245variant only when a real tradeoff remains unresolved by evidence; do not246generate decorative option sprawl.247248When `composition` or `motion` is 4 or 5, require a rendered checkpoint before249committing to the direction. When comparing versions, hold content, tasks, and250platform behavior constant and state the exact profile delta.251252If the user asked to see the direction before implementation, make the preview253viewable, provide the local/live URL or rendered image, and stop at that254checkpoint for confirmation. Otherwise use the checkpoint as an internal255review step and continue. Never present an HTML mockup as proof of native256behavior.257258### 5. Implement in the real surface259260Use the existing framework, components, and repository conventions. Do not261replace a working stack merely to express an aesthetic. Match implementation262complexity to the value of the interaction.263264Apply this precedence order when rules conflict:2652661. safety, accessibility, and user data integrity;2672. platform input, semantic, window, and navigation contracts;2683. the project's explicit design system and shipped component library;2694. the product's task model and content;2705. brand expression and visual novelty;2716. general aesthetic guidance.272273This is not a choice between native and custom. Keep the platform skeleton,274invent the product brain, and express the brand without breaking either.275276**One representative page first.** Polish one representative screen to the277Definition of Done in `references/design-review.md`, then extend that language278to the rest. Never build ten pages in one pass: the rules drift a little per279page and the drift compounds until the pages no longer read as one product.280Tokens only — no colour, size, spacing, radius or shadow outside the scale281without a written reason at the site; `design-lint source` names each one.282283### 6. Verify the implementation284285Use three evidence tiers:2862871. **Source/static** — types, lint, hard-rule grep, semantics, token usage,288 and `design-lint source <dir>` for the spacing grid, type-scale caps, motion289 table, token discipline and copy.2902. **Rendered/interactive** — real viewports or native previews, screenshots,291 focus order, keyboard/touch/pointer behavior, state transitions, contrast,292 text scaling, reduced motion, overflow, and realistic data.2933. **Outcome** — representative users performing target tasks, then production294 success, completion time, errors, abandonment, support tickets, retention,295 conversion, and performance percentiles where applicable.296297Run the repository's tests and the platform checks named in the selected298reference. For HTML/web output, run `design-lint html <artifact>` and inspect the299live result at every declared viewport. A clean static check does not prove a300rendered rule. For decks, run `design-lint deck` and, once rendered,301`design-lint render`.302303Then run the review in `references/design-review.md`: capture the page at304390 / 768 / 1280 / 1440 (or the declared breakpoints), list findings by P0–P3305with no adjectives, fix them in code, re-capture, and repeat until no P0 or P1306remains. Run `design-lint source` before the loop and again after; its WARN307lines are questions the review answers with a fix or a written reason, never308noise. The first generated version is a structural draft — report the counts309at the start and at the end of the loop, not "looks good now".310311Do not claim user testing, assistive-technology coverage, device coverage, or312production improvement unless it actually occurred. Report an unrun tier as a313named follow-up gate, not as a pass.314315### 7. Compare and record316317For optimization, compare before and after against the same tasks and318constraints. Record decisions, rejected experiments, remaining uncertainty,319and the next measurable signal. For a substantial or long-lived design, append320the decision to the project's design-system Decisions Log when one exists.321322## Design system integration323324Use the first design-system source found:325326```bash327test -f .design-system.md && echo "FOUND: .design-system.md"328test -f design-system/SKILL.md && echo "FOUND: design-system/SKILL.md"329test -f DESIGN.md && echo "FOUND: DESIGN.md"330```331332When one exists:333334- Read it fully before visual implementation.335- Use its defined color, typography, spacing, motion, and component tokens.336 Treat `[placeholder]` as undefined and exercise freedom only there.337- Import its shipped components and brand assets; never redraw a supplied logo338 or rebuild a component primitive without a documented reason.339- Enforce grep-able hard rules against every task-owned file. Use a rendered340 validator for rules about contrast, size, coverage, hierarchy, or motion.341- Verify every declared viewport and appearance mode.342- Record significant choices and rejected experiments in its Decisions Log.343344When no design system exists, define a small constrained token scale before345composing. Do not create a permanent design system unless the user asks for one346or the implementation clearly requires reusable governance.347348If asked to author a design system, ship:349350- `SKILL.md` no longer than 100 lines with grep-able hard rules, token summary,351 component pointers, and a review checklist;352- `DESIGN.md` with rationale, component/state specifications, principle-to-353 application statements, open tensions, and a Decisions Log;354- paste-ready tokens, components, and brand assets;355- a validator for every hard rule that targets rendered output.356357## Component and aesthetic rules358359- Prefer the project's component library. Use shadcn, MUI, Ant Design, Radix,360 SwiftUI/UIKit/AppKit, WinUI, Compose/Material, Flutter, or other declared361 primitives rather than rebuilding their contracts from scratch.362- **Define the shared control set once, before the first screen**: button363 (every variant and size), text input and its field states, card/surface, and364 navigation. Each gets its spacing, radius, border, type and state values365 written into the design-system file, and every screen reuses that definition.366 A second button style, a card whose radius differs from the one two sections367 up, or a nav that changes between pages is an inconsistency defect, not a368 per-page decision. Where the chosen school makes a component shape non-default369 (`references/brand-differentiation.md` Step 6), state that shape once for the370 whole set rather than per screen.371- Prove hierarchy in grayscale through size, weight, order, and space before372 relying on color.373- Use constrained type, spacing, radius, elevation, color, and motion scales.374- Choose a clear aesthetic direction appropriate to the product. Distinction375 should come from coherent hierarchy, content, composition, data expression,376 and a few signature moments, not effects on every control.377- A platform/system font is often the correct native choice. On expressive web378 and brand surfaces, choose typography deliberately; never reject a system379 font merely because it is common.380- Avoid generic AI styling: context-free purple gradients, interchangeable card381 grids, arbitrary glass, excessive pills, decorative dashboards, fake native382 chrome, and motion without a job.383- Do not add custom cursors, scroll hijacking, parallax, blur, grain, or texture384 unless they support the concept and survive platform, contrast, performance,385 and reduced-motion checks.386387## Accessibility and legibility floors388389These are floors, not aesthetic targets. A design system may raise but never390lower them.391392- On web, meet WCAG 2.2 AA: body text at least 4.5:1; large text and meaningful393 non-text UI at least 3:1 against the real backdrop.394- Keep focus visible. Never remove an outline without an equally visible395 replacement, and ensure focused content is not obscured.396- Meet the target platform's minimum hit size; for web, never go below the WCAG397 24x24 CSS px minimum/spacing exception and aim near 44px for primary touch398 actions.399- Guard or neutralize animation under reduced-motion settings.400- On web, use real headings, links, buttons, labels, and image alternatives401 before ARIA. On native platforms, use real accessibility roles, names,402 values, actions, and focus order.403- Test text enlargement, localization expansion, high contrast, keyboard or404 switch access, and screen readers when relevant. Mark human/device-only checks405 truthfully.406407## Presentation surfaces408409For slides and decks, also follow `references/platform-presentation.md` and410invert browser assumptions:411412- Give each slide one dominant thesis with roughly 60/30/10 visual hierarchy.413- Keep audience-facing body copy at least 18pt where possible, with about 13pt414 as a metadata-only floor; keep the main slide near 70 words or fewer.415- Use heavy full-bleed surfaces as focal beats, not ambient decoration.416- Review at presentation distance and validate the rendered artifact, not only417 the source.418419## Public-web SEO only420421Apply SEO metadata only to public, crawlable web pages. Do not add it to native422apps, internal tools, isolated components, or visual prototypes unless they are423also public pages. For an applicable page include a unique title, description,424canonical URL, Open Graph title/description/image/URL, and appropriate WebSite425or Organization structured data. Use the framework's native metadata API.426427## Required handoff428429Start the implementation handoff with:430431```markdown432## Design Decisions433434- **Scope lane**: [Micro / Standard / Full — rationale]435- **Platform**: [detected target(s), inputs, and platform reference loaded]436- **Design system**: [source and tokens/components used, or none]437- **Design direction**: [Design Read; `clade.design-direction/v1` preset,438 variant, mode, family, composition/motion/density, source, and overrides; or439 `N/A` for a Micro change that reuses an established direction]440- **Style DNA** (greenfield / reframe): [personality; must-not-read-as;441 signature marks; density; radius; shadow]442- **Directions considered** (Full greenfield / reframe): [three, one line each,443 and why the chosen one]444- **Benchmark**: [reference set, reusable pattern, counterexample, rejected choice]445- **Brand differentiation** (brand surfaces only): [visual school and why; the446 four palette decisions; typeface and why, with its line heights and its weight447 set; signature interaction, **the technology chosen to build it and why that448 one over the alternatives**, and how it belongs to both school and subject;449 and the final test — beside a typical Linear or Vercel site, are these visibly450 two different companies?]451- **Core components**: [button per variant, text input, card, navigation —452 radius, border, padding, elevation, and hover/focus/pressed treatment, stated453 once. Every screen consumes these; a screen needing a new component adds it454 here first.]455- **Screens in scope**: [the enumerated screens or routes this spec governs, so456 "implemented consistently across all of them" is checkable rather than felt.]457- **Native vs custom**: [platform skeleton / product brain / brand expression]458- **Visual checkpoint**: [real surface / HTML study / native preview / direct implementation — why]459- **State and motion**: [states covered; each motion's job or no-motion decision]460- **Signature motion** (only when one exists): [archetype — scroll story or461 hero intro; route and why; the storyboard table or its location; intro /462 idle / pointer budgets; frame counts per device; reduced-motion state; the463 §7 acceptance items not yet met]464- **Verification**: [source, rendered/interactive, and outcome evidence; explicit unrun gates]465- **Review loop**: [widths captured; P0/P1 count at start → at end; P2/P3466 left and their owner; `design-lint source` FAIL/WARN counts before and after]467- **Measured worst contrast**: [ratio and tool/lane, or truthful reason it was not measurable]468```469470Before reporting completion:471472- confirm every pipeline phase is represented or marked `N/A` with a reason;473- run project tests, design-system checks, and selected platform verification;474- inspect the real rendered/native result rather than trusting source alone;475- confirm every screen named in **Screens in scope** was implemented against the476 design note, and name any screen deliberately left on the old system;477- confirm no implemented screen introduces a colour, font, radius, or motion478 duration that is absent from the design note — cross-screen consistency is the479 deliverable, not a side effect;480- walk the Definition of Done in `references/design-review.md` item by item for481 every screen in scope, and name the items that are not met rather than482 rounding them up;483- preserve task-owned work through the repository delivery workflow;484- use `DONE_WITH_CONCERNS` when human/device/production evidence needed for the485 user's stated outcome remains unavailable.486487Use `DONE`, `DONE_WITH_CONCERNS`, `BLOCKED`, or `NEEDS_CONTEXT` truthfully. After488three failures of the same approach, stop repeating it and report the blocking489condition.490491## Additional skill reference492493# Interface Design Pipeline494495Guides interface work from evidence and platform choice through preview,496implementation, and verification. The historical `frontend-design` name stays497for compatibility; the workflow covers web, mobile, desktop, and native apps.498499## Usage500501```502/frontend-design # Run the platform-aware interface pipeline503/frontend-design profile=soft-premium motion=1504/frontend-design review <path-or-url> # P0–P3 review of an existing surface, fixes applied505```506507"Design sense" is carried as checkable rules, not adjectives: the spacing508grid, type-scale caps, motion duration table, state list and review widths in509`references/design-rules.md`; the screenshot review loop, severity ladder and510Definition of Done in `references/design-review.md`; and `design-lint source511<dir>` for the half of those rules a static check can see. A hero intro or a512scroll-driven product story — the one place allowed past the motion table —513has its own archetypes, route choice, budgets and storyboard-first handoff in514`references/signature-motion.md`.515516Every invocation classifies the target platform and task size, reads the shared517benchmark contract plus the relevant platform adapter, then runs all seven518pipeline phases at proportional depth. It respects the project's design system,519keeps platform contracts native, and makes product workflow and brand choices520deliberately.521522For a theme, style, or alternate version, select a named design-direction523profile or infer a custom one, then tune composition, motion, and density. A524profile is a reusable hypothesis; repository and platform evidence still win.525526When visual direction is materially uncertain, it creates a viewable checkpoint527before expensive implementation. HTML is preferred for browser UI and may be528used as a clearly labelled visual study for native apps; native behavior must be529validated in the real platform preview, simulator, or running app.530531## Delivery completion532533If this workflow changes files or external state:534535- Inspect the real final state before responding, including `git status` for a536 repository task.537- Never report `DONE` while task-owned changes are uncommitted. Use or continue538 `$clade:delivery` and create a repository-compliant checkpoint or preserve539 the work when committing is unavailable.540- When the user request or trusted repository policy makes publication,541 deployment, or live verification part of the task, do not silently downgrade542 the result to local-only work.543- If a required delivery transition lacks authority, credentials, a destination,544 or reachable external state, report `BLOCKED` or `NEEDS_CONTEXT` rather than545 appending a "not committed/pushed/deployed" caveat after `DONE`.