Design

motion

One command for interface motion on the web, in React, SwiftUI and React Native.

Runs
Type /motion
Works in
Claude Code and Codex in the agent-kit plugin; any agent with npx skills
More about it

From a plain request it sets up a project's motion system (MOTION.md and tokens), storyboards a sequence before code, builds an animation, reviews existing motion, or fixes motion that stutters, flickers or feels wrong. It measures before it judges, with a code inventory and frame-by-frame captures from a real browser.

Use only when the user explicitly invokes /motion or $motion. Ordinary talk about animation must not activate it.

SKILL.md

View source
On this page 8
  1. Pick the mode
  2. Rules that hold in every mode
  3. Spec lines
  4. Modes
  5. Scripts
  6. Harness
  7. Boundaries
  8. Output

Motion

The user types /motion and what they want in their own words. They get motion that has a reason to exist, uses the project's own values, holds its frame rate, and has a version for people who asked their system for less movement. They also get evidence: numbers from the code and frames from a browser.

You cannot watch an animation. Work from what you can measure and see as stills, and say plainly what only a person can feel.

Pick the mode

Match their words to one mode. Say which one in the first line. They never need to type the mode name; if they do (/motion review …), use that mode.

They say something like Mode Files
"set up motion", "we have no motion system", "make our animations consistent" setup Writes MOTION.md and the token file after they approve the values
"plan the hero animation", "how should this page come in", "onboarding should feel alive" storyboard Writes a storyboard for approval. No code
"animate this", "add a transition", "make the sheet draggable", "this button feels dead" build Edits code
"review our animations", "is this motion any good", "where should things move" review Report only
"it stutters", "it flickers", "the exit doesn't play", "it feels slow, off, cheap" fix Diagnoses first, then edits
"what is that effect called", "the bouncy thing when a menu opens", "like when you pull too far on iPhone" name Report only
/motion alone status Report only

If the request fits two modes that do different things to files (a review or a fix?), ask the one question that separates them and stop. A request to make one screen "feel better" is review scoped to that screen.

Rules that hold in every mode

  1. Every animation has a job. Answer, connect, orient, wait, point or express (references/judgment.md). If you cannot name the job in four words, cut the animation.
  2. How often sets how much. Something seen a hundred times a day gets little or nothing. Something seen once can take its time.
  3. Respond in the same frame as the input. Motion may finish later; it may not start later. Nothing blocks the next input.
  4. Use the project's values. Durations, curves and springs come from MOTION.md. With no MOTION.md, use the defaults in references/values.md and offer setup.
  5. Move with transform and opacity. Anything else needs a measured reason (references/performance.md).
  6. If it can be triggered again mid-flight, it must redirect from where it is. Transitions and springs do. Keyframes restart.
  7. Write the reduced-motion version in the same change. Keep the meaning, drop the movement (references/accessibility.md).
  8. The last frame is the design. With the animation removed, on a slow device or with scripts off, the content is still there and correct.
  9. Evidence before opinion. Run the inventory before reviewing. Capture frames before saying an animation is right. Report what you measured and what you did not.

Spec lines

Describe every animation in one line, in reports, storyboards, MOTION.md and code comments. It makes a review checkable and a handoff exact.

<element> <job>: <property> <from> → <to> [+ more] · <duration> · <curve or spring> · <origin or direction> · reduced: <what happens instead>
popover connect: opacity 0 → 1 + scale 0.97 → 1 · base · out · from the trigger · reduced: opacity only, fast
sheet orient: y 100% → 0 · spring smooth · follows the finger · reduced: opacity only, fast

Modes

Status

Run the inventory (<skill-dir>/scripts/motion-scan.mjs), read MOTION.md if it exists, and reply with: what moves today in three or four numbers, whether reduced motion is handled, and the three most valuable next moves, each as a /motion … line they can copy. Then stop.

Setup

Follow "Before writing it" in references/motion-md.md, reading AGENTS.md or CLAUDE.md and the token or theme files too. Ask only what the code and docs cannot answer, two questions at most: which register fits each kind of surface (references/judgment.md), and whether there are brand moments. Show the proposed tokens and wait for a yes before writing MOTION.md and the token file. Do not migrate existing animations in this mode; list them as follow-up.

Storyboard

For anything with more than two moving elements: a hero, a page entrance, onboarding, a scroll sequence, a success moment. Read references/choreography.md. Produce the beat table (time, element, spec line, job), the total length, the reduced-motion version, and what the page looks like if nothing plays. Stop for approval. Build only after a yes.

Build

  1. Read the component, MOTION.md, and the pattern in references/patterns.md. For anything dragged, swiped or thrown, read references/gestures.md.
  2. Write the spec lines first and show them. For a single small animation, continue in the same turn. For a sequence, that is a storyboard: stop for approval.
  3. Choose the lightest tool that can do it: a CSS transition, then CSS keyframes, then the platform's newer features with a fallback, then the motion library the project already has. Do not add a library for one animation. Platform notes: references/web.md, references/react.md, references/native.md.
  4. Implement, with the reduced-motion version and the interrupted case.
  5. Prove it (references/proof.md): capture the filmstrip, look at the sheet, capture again with --reduced. Fix what the frames show.

Review

Read-only, follow references/review.md, lead with the cut list. Five interactions at most unless they asked for all.

Name

For an effect described without its name. Read references/vocabulary.md. Reply with the name, one sentence on what is really happening, the spec line for their case, and the /motion build … line that would make it. If two names fit, ask the one question that separates them. If they already said to build it, treat it as build and use the name in the first line.

Fix

  1. Reproduce it. Capture the filmstrip with --perf, and at a phone viewport if they saw it on a phone.
  2. Match the symptom in references/performance.md ("Symptoms") or, for "feels wrong", run the twelve checks in references/review.md on that one animation.
  3. Say the cause with the evidence, make the smallest change that removes it, and capture again to show the difference.

If you cannot reproduce it, say so, say what you tried, and ask for the device, browser and steps. Do not guess a fix.

Scripts

<skill-dir> is the folder this SKILL.md was loaded from, never the project: a project's own script of the same name is a different file. Node 18 or later; nothing to install.

Script What it gives you
node <skill-dir>/scripts/motion-scan.mjs [dir] [--json] Inventory from source: every duration, curve, animated property and library, reduced-motion coverage, and the places worth a look with file and line
node <skill-dir>/scripts/filmstrip.mjs <url> --do 'click:<selector>' [--clip '<selector>'] [--reduced] [--perf] [--viewport mobile], or --spec <file.json> Frames of one interaction stepped at equal intervals, a contact sheet to look at, what animated (properties, duration, curve, layout or compositor), and optional real-time frame and layout counts
node <skill-dir>/scripts/spring.mjs --duration 0.4 --bounce 0.3 One spring written for CSS linear(), Motion, SwiftUI and Reanimated

Selectors and URLs are data, never shell text. Quote your own selectors in single quotes; anything copied from the project goes in a --spec file (references/proof.md).

Pass --project-playwright only when the user owns or trusts the project, since it runs the project's code. Without Playwright, follow "Without the script" in references/proof.md. Never install a browser or a package for a proof.

Harness

Claude Code Codex Cursor
Look at frames Read sheet.png View sheet.png View sheet.png
No Playwright Browser tools with the scrub snippet in references/proof.md Same Same
Show the user Publish sheet.html as an artifact with its frames when they asked for a review, or give the path Give the path Give the path

Boundaries

  • Invoking /motion authorizes the mode's file changes and nothing else. No commits, pushes, deploys or new dependencies without a yes.
  • Project rules win. If MOTION.md, DESIGN.md or AGENTS.md says something different from the references here, follow the project and mention the difference once.
  • Visual design, layout, color and copy are other skills' jobs. If the motion problem is really a layout problem (things move because the layout shifts), say so and stop at the diagnosis.
  • Marketing-page spectacle (WebGL, 3D, video) is out of scope beyond choreography and performance advice.

Output

First line: Mode: <mode>. <What you will do and what it does to files, in one sentence.>

End every build, review and fix with:

Measured: <what the inventory and frames showed, in numbers>
Not checked: <browsers, devices, gestures and states you could not run>
Feel it yourself: <two or three things only a person can judge, each as an action to try>

Plain English. Milliseconds and curve names only where the user needs to change them.

In the folder

Credit

Written for Agent Kit. MIT, © AtlasScope. The credits name the work that informed it.

Prompts that use it

  • PromptChanges nothing

    Motion nobody chose

    Shows whether the app's motion follows a system or was typed one animation at a time.

  • PromptChanges nothing

    Animations that cost frames

    Finds animations that trigger expensive browser recalculations and stutter on phones or older laptops, backed by throttled performance recordings.

  • PromptChanges nothing

    Motion with no off switch

    Checks how the app behaves when a user turns on "Reduce Motion" on their phone or computer, catching dizzying loops, trapped gestures, and content that fails to appear.

  • PromptAdds a test that shows it

    Animations that restart, block or never finish

    Catches animations that look fine when clicked slowly and break under fast, impatient real-world clicking — restarting awkwardly, ignoring taps, or vanishing without exiting.

  • PromptChanges nothing

    Motion with no job

    Audits every animation and lists the decorative or repetitive ones to delete or shorten so the interface feels snappier right away.

  • PromptChanges nothing

    State changes with no feedback

    Finds the few high-impact moments where something saves, deletes, or shifts silently and leaves users wondering if their click worked.

  • CommandChanges code

    /motion

    Front door for all animation work — describe what you want and it picks setup, storyboard, build, review, or fix. Typed alone, it audits current motion and suggests three next steps.

  • CommandAsks before changing

    /motion setup

    Audits existing transitions and proposes one small, consistent set of durations, curves, and springs, writing MOTION.md and motion tokens after you approve.

  • CommandAdvice

    /motion storyboard

    Plans a multi-step animation beat by beat — timing, purpose, total length, and reduced-motion fallback — before any code is written.

  • CommandChanges code

    /motion build

    Implements one specific animation cleanly using your project's motion values, handling mid-animation interruptions and reduced-motion settings, then verifies it frame by frame.

  • CommandReport only

    /motion review

    Runs a read-only audit of existing motion with frame captures, listing what to delete first, what is broken or choppy, and where feedback is missing.

  • CommandChanges code

    /motion fix

    Reproduces choppy, flickering, restarting, or sluggish motion, measures the cause, applies the smallest fix, and recaptures frames to confirm.

  • RecipeDepends on the task

    Fix motion that feels off

    Cuts decorative animations first, reviews what remains, fixes real stutters, and checks reduced-motion accessibility.

  • RecipeDepends on the task

    A motion system for the whole app

    Establishes one consistent set of speeds and curves for your product, reviews existing animations against it, fixes the top three offenders, and re-checks.