/kill-framer-motion
Most apps ship 46 KB of Framer Motion just to fade cards in and scale buttons on hover. This skill audits every animation file-by-file, solves exact CSS linear() springs to match your physics, leaves complex gesture work alone, and tells you how many KB you deleted.
Install
Copy the skill URL or pick your coding agent below. One file, no npm packages, MIT licensed.
https://hairlineui.com/skills/kill-framer-motion.mdClaude Code
Works in: Claude Code CLI, VS Code & JetBrains extensions, and Claude Desktop Code tab
Run this once inside your project (or use ~/.claude/skills for every project).
Restart or type /kill-framer-motion in Claude Code. It scans the repo, runs the Chromium verifier, and reports every fix.
Zero redesign risk. Leaves your layout, brand colours, typography and component library alone.
Verified, not guessed. Every skill pairs static checks with a standalone verifier that proves the before and after counts.
No lock-in, MIT. Plain markdown plus a standalone script. Works on React, Next.js, Vue, Svelte, Astro or plain HTML.
What it catches
Every rule targets an objective browser defect and pairs a detection check with a root-cause fix.
whileHover & whileTap pulling 46 KB of JS
Mounting motion.button just for a 3% press or hover scale drags the entire animation runtime into first-load hydration.
Replaces with pure CSS transition-[scale,transform] driven by a solved CSS linear() spring token and reduced-motion guards.
AnimatePresence height:"auto" accordions
Measuring DOM height in JS for FAQ rows and collapsible sections adds runtime overhead and layout jitter.
Replaces with pure CSS grid-template-rows: 0fr -> 1fr plus overflow-clip and inert on the closed inner panel.
Mount fades & whileInView scroll reveals
Using motion.div purely for opacity 0 -> 1 and translateY(12px) -> 0 adds JS overhead to static marketing sections.
Replaces with lightweight CSS @keyframes (fill-mode: backwards) and a 15-line IntersectionObserver hook.
Single-row layoutId tab indicators
Sliding a pill between tabs in one bar rarely needs a full layout-projection engine.
Measures active offsetLeft/offsetWidth once in useLayoutEffect and glides a single indicator with transform.
Exact spring physics preserved in CSS linear()
Hand-guessing ease-out ruins the bounce and feel of existing spring transitions.
Runs the bundled closed-form damped oscillator (--spring stiffness,damping,mass) to emit the exact CSS linear() curve and settle time.
Honest KEEP list for real gesture physics
Blindly ripping out complex drag-and-drop constraints or cross-route shared-element FLIP breaks UX.
Leaves files using useDragControls, dragConstraints, or complex scroll timelines untouched and flags them clearly.
Static analyzer & spring solver
Pure Node.js with zero dependencies (runs in under 200ms). Reads package.json and scans every .tsx/.jsx/.ts/.js file to classify imports into REPLACEABLE (whileHover, whileTap, whileInView, initial/animate, simple AnimatePresence) vs KEEP (dragConstraints, useDragControls, multi-track useScroll/useTransform), estimates gzipped KB saved, and includes --spring k,c,m to solve exact CSS linear() curves.
Then just run it
Run it on a single page while building, or across your main routes before shipping.
“Run /kill-framer-motion on this repo — tell me which files are trivially replaceable vs worth keeping, then migrate the simple ones.”
“Use /kill-framer-motion to replace our FAQ accordion and hover cards with CSS linear() springs and remove framer-motion if zero imports remain.”
“Generate CSS linear() spring tokens for stiffness 320 / damping 24 using /kill-framer-motion and migrate our pricing toggle.”
Source
Read every line before installing. Both files are plain text under the MIT licence.
- /skills/kill-framer-motion.md
- The full skill in plain markdown with YAML frontmatter. Drop into .claude/skills, .cursor/rules or .agents/skills.
- /skills/kill-framer-motion-check.mjs
- Standalone Node verifier for /kill-framer-motion. Runs locally with --json and --fail flags.
Templates
Every Hairline template passes these out of the box
65 Next.js landing pages, each designed from scratch. Try any of them live; one is $39, all of them $159, and 8 are free.


