Communitygithub.com

craft-ux-motion

Diagnose and elevate product usability, interaction flow, and tactile state-driven motion for web, desktop, and mobile interfaces. Triggers on explicit polish requests (UX audit, interaction review, motion polish, micro-interactions, pre-release UI QA) OR everyday user-perspective friction complaints without technical jargon — e.g., confusing/cluttered UI ("反直觉", "看不懂", "不会用", "找不到", "太乱/太挤", "confusing", "cluttered"), tedious or disruptive flows ("太麻烦", "老弹框", "总要重选", "用着别扭/不顺手", "annoying"), missing feedback or accident anxiety ("没反应", "不知道成没成", "容易误触", "撤回不了"), and abrupt/janky/inconsistent motion ("突然跳一下", "闪一下", "太生硬", "感觉卡顿/不跟手", "不够丝滑", "janky", "abrupt", "snappy"). Runs a zero-dependency static pre-scan first and scales automatically from a targeted local fix to a full-product polish pass.

Qu'est-ce que craft-ux-motion ?

craft-ux-motion is a Claude Code agent skill that diagnose and elevate product usability, interaction flow, and tactile state-driven motion for web, desktop, and mobile interfaces. Triggers on explicit polish requests (UX audit, interaction review, motion polish, micro-interactions, pre-release UI QA) OR everyday user-perspective friction complaints without technical jargon — e.g., confusing/cluttered UI ("反直觉", "看不懂", "不会用", "找不到", "太乱/太挤", "confusing", "cluttered"), tedious or disruptive flows ("太麻烦", "老弹框", "总要重选", "用着别扭/不顺手", "annoying"), missing feedback or accident anxiety ("没反应", "不知道成没成", "容易误触", "撤回不了"), and abrupt/janky/inconsistent motion ("突然跳一下", "闪一下", "太生硬", "感觉卡顿/不跟手", "不够丝滑", "janky", "abrupt", "snappy"). Runs a zero-dependency static pre-scan first and scales automatically from a targeted local fix to a full-product polish pass.

Compatible avec~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/jevonhou/coding-to-craft/tree/HEAD/skills/craft-ux-motion

Demander à votre IA préférée

Ouvre une nouvelle conversation avec cette compétence d'agent déjà préchargée.

Documentation

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):

  1. "No response / broken" (没反应 / 报错): Verify event handlers, state updates, and API responses first. Fix real functional bugs before polishing micro-interactions.
  2. "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).
  3. "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-all and layout-thrashing CSS transitions (width, height, max-height, top, left, right, bottom, margin, padding)
  • Missing prefers-reduced-motion / motion-reduce: / useReducedMotion support
  • 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)

  1. Self-evident structure: Rely on visual hierarchy, concrete action verbs, live status indicators, and helpful empty states instead of explanatory paragraphs.
  2. Contextual relevance: Show controls and metadata only when actionable right now; strip permanent secondary clutter and dead controls.
  3. Predictable consistency: The same action, shortcut, terminology, and placement behave identically across every screen, viewport, and theme.

B. Flow (Zero Needless Friction)

  1. 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.
  2. 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)

  1. Instant response, clean undo: Every interaction yields immediate tactile/visual confirmation; toggles, dismissals, and edits are reversible whenever practical.
  2. 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

  1. Causal, not decorative: Motion clarifies origin, destination, and hierarchy — never animates for novelty.
  2. 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.
  3. Fast & restrained: Quick, light, unobtrusive. High-frequency actions should be even snappier; when uncertain, animate less.
  4. Direct & interruptible: Dragging, resizing, and scrolling track input 1:1; triggering a new action mid-flight blends cleanly without snapping or deadlocking state.
  5. Compositor-first performance: Animate transform and opacity instead of layout-triggering properties; confirm smooth frame pacing on long lists and heavy views.
  6. 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

  1. Check second-order effects before editing: verify how each UX/motion change affects adjacent states, keyboard focus, timers/listeners, and long-term complexity.
  2. 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.
  3. 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).
  4. Re-run the static scanner to confirm targeted findings actually dropped to zero (or documented justified exceptions).
  5. 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.
  6. 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.

Skills associés