/dev-flow:transitionsfrom dev-flow
Gives a Next.js 16 App Router app a tokenized motion system with durations, easings, springs, and micro-interactions. Scaffolds lib/motion/, audits hardcoded motion, and refines animations.
Ships in dev-flow. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
This skill governs how a web app moves. Like state-discipline for state and forms for forms, it routes every animation through one shared, token-driven system so the product has a single, consistent motion feel — instead of scattered duration-[237ms] magic numbers and hand-tuned cubic-beziers that drift page to page.
Inspired by transitions.dev (Jakub Antalík) — a curated library that teaches agents about product motion. This is our own take: token-driven, wired to the DESIGN.md contract and our Next.js 16 + Motion +
tw-animate-cssstack. Not a fork, not an install of their package — we credit the idea and build our own.
transition: / animate={{…}} / @keyframes / a Tailwind duration-[Xms] arbitrary value.If the effect genuinely needs JS physics (spring, layout/shared-element, drag/gesture, scroll choreography) and the Motion runtime isn't wired, this skill routes to module-add motion first, then applies the tokenized pattern on top.
Follows the dev-flow contract — see references/contracts.md. Key facts:
meta.json#stack.framework, stack.nextjs_version, stack.motion. For monorepo, reads stack.monorepo.web.* and operates in apps/web/.stack.framework ∉ {"next", "monorepo"} or stack.nextjs_version != "16". Principles transfer to other React setups but the View-Transitions/RSC rungs don't — refuse rather than mis-apply.meta.json#stack.motion (see block below) + appends history per run.phase. Horizontal capability — invoke any time.module-add motion — installs the Motion runtime (motion/react, components/motion/*, lib/motion-config.ts). This skill sits above it: it owns the token layer + the curated library + the discipline; it never re-installs the runtime, it routes there when Tier 3 is needed.tw-animate-css — already shipped by shadcn; it's this skill's Tier 0 engine (fade/slide/scale, zero JS; it ships no shimmer — references/tw-animate-css.md). Reuse it, don't reinvent.design-md-to-app — owns DESIGN.md and the visual tokens. This skill reads the motion block of DESIGN.md for the values; if absent, it scaffolds sane defaults and writes them back (DESIGN.md stays the source of truth for values).design-md-to-app/references/anti-slop-fallbacks.md) — the "animate only transform/opacity", hardware-acceleration, content-shaped-skeleton, CSS-stagger rules live there. This skill enforces them; it doesn't duplicate them.rn-animations-gestures — the mobile counterpart (Reanimated + Gesture Handler). This skill is web-only.The ladder's lowest rung is Tier 0, but the cheapest answer is no animation, and the question has a table: 100+ times/day — a keyboard shortcut, the command palette, core navigation — gets no animation, ever. Tens of times a day gets near-imperceptible or nothing. Occasional (modals, drawers, toasts) is where the ladder applies. Rare and first-time moments are where the delight budget lives. Then name the purpose — feedback, spatial consistency, state indication, preventing a jarring change, explanation, or delight at the rare tier — or don't build it.
The full gate, the exact curves and durations, the physicality and gesture rules, and the checks to
name when feel cannot be judged from code are in references/animation-standards.md. Read it
before writing a transition, and before approving one.
Reach for the lowest tier that achieves the effect. Higher tiers cost bundle size, force "use client", or add JS the interaction doesn't need.
| Tier | Engine | Use for | Cost |
|---|---|---|---|
| 0 | Tailwind + tw-animate-css | enter/exit fade·slide·scale, hover lift, CSS stagger (animationDelay), skeleton pulse (Tailwind's animate-pulse, opacity only — never a moving gradient sweep) | zero JS, RSC-safe |
| 1 | Hand-written CSS transition / @keyframes (tokened) | bespoke feedback (success check draw, error shake, number pop), state-swap crossfades | zero JS, RSC-safe |
| 2 | View Transitions API | route/page transitions (Next 16 App Router), same-document DOM swaps (list reorder, tab underline) | tiny JS, mostly RSC-safe |
| 3 | Motion (motion/react) | spring physics, layout / shared-element, drag & gesture, scroll-driven choreography (useScroll/useTransform) | ~40kb, forces "use client" → routes to module-add motion |
| 4 | WebGPU shaders (vgpu) | raymarching, fluid, volumetric light, real-time generative texture — when the effect is the artefact | a GPU device, a compile step, a render loop and a battery — see vgpu-shaders |
On the Tier-2/Tier-3 seam sit Motion's two view-transition APIs — imperative animateView(update) and,
since [email protected], the <AnimateView> component (motion/react-animate-view). Both choreograph the
browser's View Transitions instead of replacing them, so they stay cheaper than Tier 3 layout animation.
⚠️ <AnimateView> renders React's ViewTransition and throws at runtime — "AnimateView requires
React 19.3 or later." — while motion's peer range still accepts React 18/19, so npm installs it on a
19.2 project and it breaks in the browser. Check react's version first; ours are on 19.2.4. Details,
props and the reduced-motion duty (the docs never mention it): references/motion-library.md.
Borrowing motion instead of inventing it — React Bits. 202 animated components as a
shadcn registry (@react-bits, MIT + Commons Clause: usable in a product, never republished as components).
Its /c/micro set (30 micro-interactions) is Motion-based and calls useReducedMotion() itself. Read it as a
cookbook: most of those items animate a pattern shadcn already ships (Spring Check → Checkbox, Squish Switch
→ Switch, Swipe Toast → Sonner, four buttons → Button), so golden rule 3 says port the timings and gestures
onto our primitive through lib/motion/tokens.ts — not install a second one. For the few with no primitive
behind them, install through registry-intake (never a bare shadcn add), take the TS-TW variant, and expect
two findings: the items declare motion@^12 against our 14, and their long arbitrary-value class lists raise the
design-lint cap. Details, the full micro list and the primitive map: references/react-bits.md. Other catalogues worth looking at under the same two rules — a MIT page of ~24 named loaders, Watermelon UI's MIT watermelon registry (1,178 items, and always the -base twin, which is the same component written in theme tokens instead of hex and text-[15px]), and unlumen UI's paid @unlumen-ui registry: references/motion-catalogues.md.
Never jump to Tier 3 for a fade. A <Suspense> fallback, a hover lift, a dropdown open — all Tier 0/1. Reserve Motion for interactions that genuinely need physics or layout animation.
And Tier 4 is not the next step up from Tier 3 — it is a different order of cost. A shader is right
when the visual is the product (a hero that exists to be looked at); it is wrong as decoration on a
screen someone keeps open all day. ⚠️ vgpu's own docs never mention prefers-reduced-motion, so rule 2
below is entirely yours to honour there — freeze the clock (advance(0)) and hold the first frame
rather than hiding the canvas. Route to vgpu-shaders before writing any WGSL. Once a project is
already on both Motion and vgpu, motion/vgpu's vgpuEffect (Motion 13.2.0+) drives shader uniforms
and scene params with Motion's spring/gesture engine instead of a hand-rolled render loop — see
vgpu-shaders §Animating once you're here. That is an implementation detail inside Tier 4, not a
reason to reach for it sooner.
lib/motion/tokens.ts. No inline duration-[237ms], no ad-hoc cubic-bezier(...) in components.prefers-reduced-motion always. Every transition ships a reduced-motion fallback (opacity-only or instant). Tier 0/1 use the motion-reduce: Tailwind variant or a media query; Tier 3 uses useReducedMotion(). A transition without a reduced-motion path is incomplete. This rule is machine-checkable: shadscan's animations-respect-reduced-motion verifies it against the built app — run that gate before shipping instead of trusting a grep.:hover and leaves it stuck until the user taps elsewhere — a button that scales on hover stays scaled after a tap. Tailwind v4's hover: variant already compiles to @media (hover: hover), so utility classes are covered; hand-written :hover CSS is not and needs @media (hover: hover) and (pointer: fine). Touch gets its feedback from :active, which needs no gating.transform and opacity (+ filter sparingly) — inside an 8 ms frame budget on a 120 Hz screen. Never animate width/height/top/left (layout: everything around moves) or box-shadow/border-radius (a repaint every frame — fade a layer that carries the shadow instead; a primitive's own focus ring is excepted — rule 7). Use transform: scale/translate and, for layout, Tier 2/3; motion that plays during navigation or loading goes in CSS/WAAPI, not a JS frame loop. The full budget, the traps and the diagnosis order: references/animation-standards.md §Frame budget."use client" for motion that doesn't need it. Prefer Tiers 0–2 to keep Server Components server-rendered.Dialog, Sheet, Popover, Tooltip, Accordion, Sonner already animate open/close with their state. Before writing a transition, search components/ui/ for the primitive that owns the pattern and use it; tune its motion through tokens and cva/class variants, never by re-implementing the component or forking its behaviour to hang an animation on it.lib/motion/tokens.ts — the token layerSetup mode scaffolds this from the DESIGN.md motion block (or defaults). Illustrative shape:
// Durations (ms) — the only durations the app uses.
export const duration = { instant: 0, fast: 120, base: 200, slow: 320, slower: 480 } as const;
// Easings — named curves; components reference these, never raw beziers.
export const ease = {
standard: "cubic-bezier(0.2, 0, 0, 1)", // enter AND exit — both are ease-out
emphasized: "cubic-bezier(0.3, 0, 0, 1)", // hero, page
inOut: "cubic-bezier(0.77, 0, 0.175, 1)", // movement *on* screen: a morph, A→B
} as const;
// There is deliberately no `exit` curve. It used to be `cubic-bezier(0.4, 0, 1, 1)`,
// an ease-in, and an exit on the critical path (a dialog the user closed to reach
// what is behind it) is latency — an accelerate curve holds it at near-full opacity
// through the half of the duration that matters. See references/animation-standards.md.
// Distances (px) — how far things slide in.
export const distance = { sm: 4, md: 8, lg: 16 } as const;
// Spring presets (Tier 3 only) — mirrors module-add motion's lib/motion-config.ts if present.
export const spring = {
soft: { type: "spring", stiffness: 300, damping: 30 },
snappy: { type: "spring", stiffness: 500, damping: 32 },
} as const;
CSS consumers get the same values as custom properties (--motion-duration-base, --motion-ease-standard, …) so Tailwind arbitrary values reference var(--motion-*) instead of literals. The full token→CSS-var bridge and the reduced-motion wiring are in references/motion-library.md.
Read state, then pick a mode:
meta.json#stack. Refuse if not Next 16 (web). Check whether lib/motion/tokens.ts exists.package.json has no motion/framer-motion), route to module-add motion, then continue.Scaffold lib/motion/ : tokens.ts (from DESIGN.md motion block or defaults), the CSS-var bridge in the global stylesheet, and transitions.ts (the tokenized variant/classname library — the curated set from references/motion-library.md). Idempotent: detect existing files, offer to extend, never double-write. Record stack.motion.
Pick the best-fit transition from the library for the component/context, at the lowest viable tier, propose it in one line with the rationale (which tier + why), then wire it using the tokens. Always include the reduced-motion fallback. Never introduce a new magic number — if the library lacks a fit, add a tokenized entry to transitions.ts rather than inlining.
Run python scripts/scan_motion.py <root> for a first-pass signal, then verify each hit in code. The audit also
names missed opportunities — where the interface would read better if something moved, and what must stay still —
through the four-question gate in references/animation-opportunities.md (at most 5–7, rejected candidates listed). The scan reads
source; to prove non-negotiable ② on the running page, run app-verification's render probe
(node <skills>/app-verification/scripts/render_probe.mjs <url>): its reduced-hidden finding lists text that is
visible normally and stays invisible with reduced motion — an entrance with no reduced-motion path. Report un-tokenized durations/easings, duration-[Xms]/ease-[…] Tailwind arbitraries, inline cubic-bezier, @keyframes animating layout props, transitions with no prefers-reduced-motion path, toplayer-exit-missing (a native <dialog>/[popover] whose exit cannot run — the fix is in references/animation-standards.md §the native top layer, and it is a correctness bug, not a polish item), and Tier-3 usage where Tier 0/1 would do. See references/audit-recipe.md. The scan is a signal, not a verdict.
In a given file, replace hardcoded durations/easings with the nearest token (round to the token scale) and add any missing reduced-motion fallback. Every change is a reviewable diff.
meta.json#stack.motion block"motion": {
"runtime": "tw-animate-css" | "motion" | "both", // Tier 0 only, or Motion also wired
"library": "motion" | "framer-motion" | null, // the Tier-3 package, when one is wired
"tokens": true, // lib/motion/tokens.ts scaffolded
"view_transitions": true | false, // route transitions enabled
"last_audit_at": "<ISO>" | null
}
⚠️ This key is shared with module-add motion, and the two used to write
different shapes into it — that skill wrote the bare string "motion", this
one writes the object above, so whichever ran second silently destroyed what the
first recorded. Settled in favour of the object, because it can carry everything
the string said: module-add motion now writes stack.motion.library and
runtime, leaving tokens / view_transitions to this skill. If you find a
meta.json with "motion": "motion", it predates the fix — replace it with
{ "runtime": "motion", "library": "motion", "tokens": false, "view_transitions": false, "last_audit_at": null }.
lib/motion/tokens.ts + CSS-var bridge + transitions.ts exist; stack.motion.tokens = true; values trace to the DESIGN.md motion block.prefers-reduced-motion fallback.cd transitions/scripts && python3 -m unittest test_scan_motion.module-add motion (this skill routes there for Tier 3).design-md-to-app own visual tokens; this owns motion tokens.rn-animations-gestures.phase.references/motion-catalogues.md — where to look for motion and what looking may turn into: the loader vocabulary at loading.daniasyrofi.com (MIT, and why a skeleton still beats a spinner for content), and unlumen UI (@unlumen-ui shadcn registry, Free/Pro, $119 one-time or $69/year — with its second component namespace and the routing to vgpu-shaders / animated-icons).
references/react-bits.md — React Bits as a motion source: licence, the TS-TW rule, the micro→primitive map golden rule 3 imposes, the Motion-12 and arbitrary-value traps, and where its other categories land on the ladder.
references/motion-library.md — the curated, tokenized transition library: each entry → tier, tokens used, code snippet, and its prefers-reduced-motion fallback. Grouped enter/exit · toggle · hover · feedback · layout · route.
references/tw-animate-css.md — the Tier-0 engine how-to (doc-grounded): the animate-in/animate-out class set and modifiers, data-[state] composition, the CSS variables to point at lib/motion/tokens.ts, and the motion-reduce: pattern. Read it before writing Tier-0 classes — don't guess class names.
references/audit-recipe.md — "audit my codebase for ad-hoc motion" recipe (patterns, verify steps, refine order).
references/contracts.md — the .workflow/ dev-flow contract (vendored).
references/animation-opportunities.md (opens in a new tab)references/animation-standards.md (opens in a new tab)references/audit-recipe.md (opens in a new tab)references/contracts.md (opens in a new tab)references/motion-catalogues.md (opens in a new tab)references/motion-library.md (opens in a new tab)references/react-bits.md (opens in a new tab)references/tw-animate-css.md (opens in a new tab)scripts/scan_motion.py (opens in a new tab)scripts/test_scan_motion.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub lukedj78/dev-flow --plugin dev-flow57 skills in this plugin
/animated-iconsAdd a Motion-animated icon to a Next.js app from a shadcn registry instead of hand-animating an SVG. Two registries, picked from the project's icon set: **heroicons-animated** (316 icons, `shadcn add @heroicons-animated/<name>`) and **hugeicons-animated** (165 icons, `shadcn add @hugeicons-animated/<name>`, which also installs a shared `lib/use-icon-animation.ts`). Both MIT, both on the `motion` runtime, both copied into your repo as source. This skill owns the install plus the two things the raw components lack: a `prefers-reduced-motion` guard and timing aligned to the project motion tokens (`lib/motion/`). Use when the user says "animated icon", "animate this icon", "make the bell/heart/menu icon animate on hover", "aggiungi un'icona animata", or wants an icon micro-interaction. Refuses outside Next.js web — for React Native use `rn-animations-gestures`. Not for: static icons, a whole motion system (`transitions`), or installing the runtime itself (`module-add motion`)./app-securityCheck whether an app's own code can be attacked before it ships — vulnerable dependencies, secrets in the code and in git history, Next.js authorization gaps (Server Actions and route handlers without a session check, queries by id with no owner filter — IDOR), data over-exposure, secrets in public env vars, raw SQL — then read the flagged code against an OWASP checklist, with an opt-in dynamic level (Strix) that proves exploits against the app running locally. The fifth pre-deploy gate, beside compliance-audit, vercel-doctor, shadscan and launch-audit; reports and routes, never blocks. Triggers: "security review", "è sicura l'app?", "controllo di sicurezza prima del deploy", "IDOR", "secrets in the repo", "pentest". Not for: GDPR and legal (compliance-audit), UI quality (shadscan), cost (vercel-doctor), launch readiness (launch-audit), a review of one branch diff (Claude Code's /security-review), third-party registry code (registry-intake)./app-verificationGive a project a manual for proving its features on the real app, written once and kept true: `.claude/skills/verify-<app>/` with how to launch it until it is usable, a read-only doctor check, how to drive it with the repo's real selectors, what counts as proof and where it goes, how to stop only what it started — plus one feature file per PRD story, seeded from the wireframe screen inventory, and a headless-Chrome render probe (overflow, wrapped headings, text hidden under reduced motion). Two modes: create (scaffold, fill from the code, prove it live once, record `meta.json#verification`) and maintain (re-read every feature from source, drive them all live, fix the manual, report real regressions). Web, Expo and eve. Triggers: "verify the app", "prova che funziona", "verification skill", "come si avvia l'app per provarla", "maintain the verify skill", "il manuale di verifica è aggiornato?". Not for: writing tests (write-tests), UI audits (shadscan), security (app-security), deploying (vercel-deploy)./compliance-auditRun a GDPR + EU AI Act compliance audit on an existing dev-flow project (web / mobile / eve agent) and remediate what it finds. Two modes: Audit (scan the codebase and `meta.json#stack` against a 11-point risk register — DSAR, consent/cookies, EU data residency, retention and PII-scrubbing, AI-transparency Art.50, high-risk Annex III, sub-processors — into a report with severity, evidence and article mapping) and Remediate (apply the safe mechanical mitigations, flag the ones needing a legal decision, never deciding legal basis or high-risk for the user). A pre-deploy gate; run it any time. Triggers: "audit GDPR", "compliance check", "AI Act", "siamo conformi?", "DSAR / cancellazione account / cookie consent / data residency". Not for: the other pre-deploy gates (vercel-doctor, shadscan, launch-audit, app-security), legal advice or DPIA sign-off (a DPO confirms), building features, or writing the PRD (use prd-from-idea)./composition-patterns-guideUse when refactoring React or React Native components that suffer from boolean prop proliferation, missing compound structure, prop drilling, or unclear ownership of state. Codifies the 7 Vercel composition-patterns rules for our web + RN stack — composition or explicit variants over boolean props, compound components with shared context, state lifted into providers, children over render props, React 19 (no forwardRef) — plus our colocation rules (Rule of Three, L0/L1/L2, `_components/`). Triggers on: "refactor this component", "questo componente ha troppi prop booleani", "rendi questo componente più componibile", "compound component", "context provider per X", "design del componente". Not for: scaffolding new components (use design-md-to-app, screenshot-to-page, rn-add-screen), or moving components up the hierarchy (use promote-component)./coss-uiSet up or extend a Next.js web app with Coss/UI — the official Cal.com design system, built on Base UI + Tailwind CSS v4 and installed through the shadcn CLI via the namespaced `@coss/*` registry. Two modes: Init (`shadcn init @coss/style` on a new project) and Add (pull `@coss/ui` primitives, single `@coss/<name>` components, or particles into an existing one). Sets `meta.json#stack.ui = "coss"`. Triggers: "usa Coss/UI", "coss.com/ui", "Cal.com design system", "aggiungi un componente Coss", "init @coss/style", "scaffold con Coss UI", or dev-flow routing when `stack.ui = "coss"`. Requires Tailwind CSS v4 and carries a mixed MIT/AGPLv3 license. Not for: writing the DESIGN.md (use figma-to-design-md / image-to-design-md), the generic Next.js scaffold (design-md-to-app owns it), backend modules (module-add), or React Native (RN uses NativeWind, not Coss).