Craft UX & Motion (craft-ux-motion)
Turn functional UI into a calm, self-evident, physically coherent product. Grounded in usability heuristics (Norman / Nielsen), direct-manipulation motion principles, and objective static diagnostics.
Can run in full (Usability + Motion), or focused on Usability-only / Motion-only.
1. Scope Tiering & Root-Cause Guardrails
Match the blast radius strictly to user intent — never use a local complaint as an excuse to rewrite unrelated pages:
- Targeted Friction Mode (user reports a specific symptom like
"突然跳一下","看不懂","老弹框","feels janky"):- Inspect root cause first, then fix only the reported flow, its immediate state transitions, and directly parallel sibling controls for consistency.
- Full-Product Polish Mode (user requests a pre-release sweep, full UX audit, or site-wide motion upgrade):
- Run the static pre-scan across the app, consolidate shared motion/interaction tokens first, then upgrade high-traffic flows systematically.
Three Root-Cause Guardrails (never misdiagnose):
- "No response / broken" (
没反应 / 报错): Verify event handlers, state updates, and API responses first. Fix real functional bugs before polishing micro-interactions. - "Feels slow / laggy" (
感觉好卡): Separate UI rendering/layout jank from backend/network latency. Address the actual bottleneck first; never paper over a slow API with only a spinner (use optimistic updates, streaming, or clear progress alongside real fixes). - "Looks outdated / change style" (
换个风格): Brand/visual-direction redesigns require user confirmation first. This skill refines clarity, ergonomics, and motion craft within the project's established visual identity.
2. Objective Static Pre-Scan (Run First)
Before guessing from memory, run the bundled zero-dependency scanner on the target project (or relevant subdirectory for Targeted Mode):
node <this-skill-dir>/scripts/scan-ux-motion.mjs <target-path>
Use its output to pinpoint concrete baseline smells:
transition-alland layout-thrashing CSS transitions (width,height,max-height,top,left,right,bottom,margin,padding)- Missing
prefers-reduced-motion/motion-reduce:/useReducedMotionsupport - Scattered ad-hoc
cubic-bezier(...)curves and magic-number durations that should be unified into shared tokens - Icon-only
<button>elements missing accessible labels (aria-label/title)
(For pure native mobile/desktop codebases without web styles, inspect native animation curves, gesture handlers, and accessibility labels directly using the same criteria below.)
3. Usability Audit — Clarity, Flow & Safety
Evaluate the live product and code across three layers:
A. Clarity (Zero Guesswork)
- Self-evident structure: Rely on visual hierarchy, concrete action verbs, live status indicators, and helpful empty states instead of explanatory paragraphs.
- Contextual relevance: Show controls and metadata only when actionable right now; strip permanent secondary clutter and dead controls.
- Predictable consistency: The same action, shortcut, terminology, and placement behave identically across every screen, viewport, and theme.
B. Flow (Zero Needless Friction)
- System absorbs inferable work: Eliminate redundant settings, repetitive re-selection, and confirmations the system can safely infer or remember via smart defaults, auto-focus, and auto-formatting.
- Non-disruptive feedback: Keep users in flow using inline states, subtle status updates, or non-blocking toasts instead of modal interruptions or unexpected scroll/route jumps.
C. Safety (Immediate & Reversible)
- Instant response, clean undo: Every interaction yields immediate tactile/visual confirmation; toggles, dismissals, and edits are reversible whenever practical.
- Asymmetric ergonomics: Make high-frequency actions effortless with comfortable hit targets; guard destructive/data-loss actions via visual separation, explicit naming, undo buffers, or deliberate confirmation.
4. State-Transition Motion Audit
Scan by State Transitions — Never by Component Lists
Walk every state transition in scope:
- Presence: mount, unmount, expand, collapse, popover, drawer, toast
- Geometry: move, reorder, resize, split-pane drag, layout shift
- Content: tab switch, value/counter change, icon swap, badge/checkmark update
- Interaction & lifecycle: hover, press, focus, loading, success, error
Ask on every transition: Did the interface explain what just happened spatially and causally, or did pixels abruptly teleport?
6 Motion Standards
- Causal, not decorative: Motion clarifies origin, destination, and hierarchy — never animates for novelty.
- One shared motion vocabulary: Define reusable easing curves and duration tokens at a single source of truth; unify existing ad-hoc transitions rather than inventing per-component timings.
- Fast & restrained: Quick, light, unobtrusive. High-frequency actions should be even snappier; when uncertain, animate less.
- Direct & interruptible: Dragging, resizing, and scrolling track input 1:1; triggering a new action mid-flight blends cleanly without snapping or deadlocking state.
- Compositor-first performance: Animate
transformandopacityinstead of layout-triggering properties; confirm smooth frame pacing on long lists and heavy views. - Zero regressions & accessibility: No flicker, clipping, overflow, or layout jump; strictly honor
prefers-reduced-motion(degrade spatial movement to instant or subtle opacity cross-fades).
5. Execution & Verification Loop
- Check second-order effects before editing: verify how each UX/motion change affects adjacent states, keyboard focus, timers/listeners, and long-term complexity.
- Fix at the single source of truth: Consolidate shared motion/interaction tokens first, then update affected views across desktop, mobile/narrow, and light/dark variants.
- Verify live against verification-matrix.md: Exercise every changed flow in a real running app (viewport widths, themes, keyboard navigation, touch targets, mid-animation interruption, and
prefers-reduced-motion: reduce). - Re-run the static scanner to confirm targeted findings actually dropped to zero (or documented justified exceptions).
- Independent review (for multi-file or stateful changes): If your workflow includes an independent code review tool/agent, run a read-only pass for state races, leaked timers/listeners, and interrupt edge cases before closing out.
- Report clearly: Summarize concrete user-visible improvements, before/after scan metrics, and exact runtime environments verified. Respect repository/user commit policies — do not auto-commit or push unless explicitly authorized.