SuperAPI AI Directory

motionlint

Lint web animations with deterministic checks on the live page (duration, easing, stagger, exits, reduced motion, hover) plus optional vision-LLM UX review.

Open website

About this tool

MotionLint is an open-source tool for reviewing the quality of web animations, positioned as "catching bad animations before they ship." It performs both deterministic motion audits and vision-LLM design reviews, and can be used in the terminal and in Claude Code.

  1. Purpose and Background AI coding agents can read JSX, HTML, and CSS, but they cannot see the animations that users actually see, click, and observe. Rules in prompts can only tell the agent "what should happen," but nothing checks "what actually happened." For example, problems such as a modal that should slide in simply popping up, loading states being missed, and focus rings disappearing cannot be found from the diff in code review before merging. MotionLint closes this loop by measuring the running app and feeding conclusions back. It differs from visual regression tools (which only capture changes and do not judge whether the new pixels are good) and AI design tools (which generate from scratch and do not review what is already running).

  2. Deterministic Audit (No API Key Required) The MotionLint deterministic audit measures from the real page the motion effects actually shipped by the app, including duration, easing curves, stagger intervals, exit timing, and reduced-motion support, and scores them against published animation standards (docs/STANDARDS.md). For example, a dropdown menu using ease-in, a 600ms modal, a card scaling from 0, and a hover animation triggered on touch will all be caught, with measured values and specific fix suggestions. The audit is free, offline, and works on any loadable URL, such as a dev server, a staging deployment, or someone else's website. It requires Node 18+, and the one-time prerequisite command is npx playwright install chromium.

  3. LLM Design Review (Optional) After setting an API key (ANTHROPIC_API_KEY, OPENAI_API_KEY, or GOOGLE_API_KEY, or running Ollama locally for free), more commands are unlocked. The vision-LLM design review takes multi-viewport screenshots and performs 50ms frame-burst capture of real user journeys, which the model judges and feeds back to the coding agent as ranked findings. It can run as an MCP server inside Claude Code and Cursor. Provider auto-detection order is: Ollama (local) → Anthropic → OpenAI → Google, with the firstWins if there is an available key or a running service; can be overridden with --provider and --model. When there is no key and no Ollama, it falls back to a deterministic mock provider so that the full flow (capture → analysis → report) can still run end-to-end for smoke testing.

IV. How motionlint flow works Static screenshots cannot determine whether animations and interactive states during a flow are working correctly; they can only show whether the final frame is correct. motionlint flow targets scripted user journeys: in headless Chromium, via Playwright, it clicks, types, hovers, scrolls, and presses keys like a user; after each interaction it captures 16 frames within 750ms via CDP screencast (50ms intervals); it records a full Playwright video as a replayable artifact; it composites each burst into a labeled contact sheet; it sends them to a vision LLM using a flow-aware rubric covering missing animations, broken/janky animations, missing loading states, perceived performance, accessibility and state changes, orchestration, smoothness, unexpected flashes, navigation continuity, reduced-motion respect, etc.; it generates a Markdown report with per-step traces, ranked findings, and a “Prompt for Claude Code” block at the bottom. It also supports capturing and analyzing multiple concurrent animations in a single recording, such as dashboard reveals (tile stagger + counter climb + chart bar rise), modal stacking (background fade-in + modal slide in/out + inner content stagger), rich form feedback (focus ring + button press + loading spinner + success card), and scroll-driven (scroll progress bar + IntersectionObserver section reveal + parallax hero). Scroll-driven animations can use scroll <px> to animate scrolling within the burst window via requestAnimationFrame, so the LLM sees time-varying changes as the page scrolls.

V. Animation Tuner Most AI coding tools generate animations from scratch; Tuner lets users adjust, in real time, animations already running on the page, and hands them back to the coding agent as a structured prompt. It opens the app in headless Chromium and injects scripts to hook mainstream TS animation libraries (Motion One, GSAP, anime.js, @formkit/auto-animate, lottie-web) as well as all C running on the pageSS transitions and @keyframes; capture every detected animation (element selector, source library, timing parameters, bounding box); generate a self-contained interactive HTML page at .motionlint/tuner/index.html (can be auto-opened with --open), containing a live preview pane for each animation (Shadow DOM, no iframe, no flicker, theme matching the source page), duration/delay/stagger/speed sliders, an easing preset dropdown (Emil Kowalski's strong curves prioritized first, such as ease-out, ease-in-out, iOS drawer, then softer/decorative options), inline standard lint (each card flags where it deviates from motion standards, with severity badges, fixes, suggested values, and a header score), a design rationale comment box for each animation; export a markdown file and a prompt usable by Claude Code, containing a structured changes[] JSON block.

VI. Animation Standards and Audit Commands MotionLint encodes Emil Kowalski's design engineering standards as a deterministic linter, with no vision models, no API keys, and no cost. motionlint audit instruments the page, reads the actual running duration/easing/transform values of each animation, and scores them. Adding --layout also reviews layout based on live DOM measurements (tap targets, text size, contrast, overflow), still deterministic and key-free. Adding --watch [dir] re-runs the audit on file changes and prints scores with deltas. The report pairs each finding with a before → after panel; easing findings render a live cubic-bezier curve comparison. The same standards are also used in the flow review prompts and appear inline in the Animation Tuner.

VII. MCP Server and Deployment MotionLint provides a stdio-based MCP server, letting LLM agents drive it directly in chat. The motionlint mcp subcommand starts it, and the agent client spawns the process when calling tools. In Claude Code, installation is available via the npm release (recommended) and via a local checkout; after registration, confirm with claude mcp list. The MCP server inherits the environment from when it was spawned, and the cleanest approach is to put a .env file in the working directory.

VIII. Applicable Scenarios and Limitations Suitable for animation quality checks on development servers, staging deployments, or other people's websites, and can serve as a hard CI gate. Note: audits are free and offline, while LLM review requires an API key or local Ollama; benchmarks show no difference in recall among current flagship models, and FPR rankings should not be based on a single 24-case run (there is a noise floor); the earlier 83% recall for claude-opus-5 and 0% FPR for multiple models were both caused by a MotionLint bug where Anthropic's default max_tokens of 4096 led to truncation, which was fixed on 2026-07-27. Ollama vision models need to be confirmed as vision-capable, as some silently ignore images; no benchmarking of Ollama was done in this session.