animation-implementer 是做什么的?
This skill is the bridge between intent and motion. ui-microinteraction-designer produced a spec for every interaction — hover-lift, scroll-reveal, parallax, counter, stagger, magnetic button, marquee, etc. — with motion params (duration, easing, distance, trigger). lp-coder-html / lp-coder-nextjs shipped a baseline JS implementation, but only the simplest interactions; complex choreography needs a real library. This skill picks the right library per spec, implements each one, and verifies the page still respects prefers-reduced-motion and still animates only transform/opacity (the only two CSS properties that the GPU can composite without recalculating layout — animating width, height, top, left, margin triggers reflow on every frame and tanks fps).
Picking libraries: vanilla CSS for hover/focus and simple transitions (zero dependencies, fastest), AOS for simple "fade up when section enters viewport" (~3KB, trivial install), GSAP for complex scroll choreography or timeline orchestration (most powerful, ~30KB but worth it when needed), Framer Motion for React Client Components in the Next.js path (declarative, integrates with React state, ~50KB but mandatory for React animation that respects component lifecycle).
When to use this skill
Run this skill when:
lp-workspace/03-design/interactions.jsonexists- Implementation exists at
lp-workspace/04-implementation/html/ornextjs/ - The orchestrator reaches Tier 4 after
lp-coder-* - The user says "アニメーション実装して" / "wire up animations" / "GSAP入れて" / "scroll reveal を動かして"
Do NOT use this skill when:
interactions.jsondoesn't exist — route toui-microinteraction-designerfirst- Implementation doesn't exist — route to
lp-coder-*first - The user wants to design new interactions (that's
ui-microinteraction-designer) - The user wants accessibility audit only (route to
a11y-auditor)
Inputs
Required:
lp-workspace/03-design/interactions.json— per-interaction spec. Each item should haveid,target(selector or section ID),type(e.g. "fade-up", "parallax", "hover-lift", "counter", "stagger"),library(recommended), and motion params (duration,easing,distance,delay,trigger). WHY: this skill implements; it does not redesign motion.lp-workspace/04-implementation/html/ORnextjs/— files to edit.
Optional:
3. lp-workspace/03-design/design-tokens.json — for any motion tokens (easing curves, duration scale).
4. lp-workspace/02-strategy/ia.json — section IDs to resolve targets.
If either required input is missing, halt:
アニメーション実装には以下が必要です:
- lp-workspace/03-design/interactions.json [✓ or 不足 → ui-microinteraction-designer]
- lp-workspace/04-implementation/html/ or nextjs/ [✓ or 不足 → lp-coder-html or lp-coder-nextjs]
Process
Step 1. Validate upstream and detect target
Read interactions.json. Detect whether implementation is HTML (04-implementation/html/index.html exists) or Next.js (04-implementation/nextjs/app/page.tsx exists). Pick the matching code path.
Step 2. Decide library per interaction
For each interaction in interactions.json, pick a library according to:
| Interaction type | HTML target → library | Next.js target → library |
|---|---|---|
hover-lift, hover-tilt, focus-glow, button-press | Vanilla CSS (:hover, :focus-visible) | Vanilla CSS via Tailwind utilities |
fade-up, fade-in, slide-up on viewport enter | AOS (data-aos="fade-up") | Framer Motion whileInView |
stagger-children on viewport enter | GSAP ScrollTrigger | Framer Motion variants + stagger |
parallax, scrub, pin (scroll-driven choreography) | GSAP ScrollTrigger | GSAP ScrollTrigger (Client Component) |
counter (0 → target number) | Vanilla JS IntersectionObserver + rAF | Vanilla JS or Framer Motion animate() |
marquee, infinite-scroll | Vanilla CSS @keyframes (cheap) | Vanilla CSS |
magnetic-button, cursor effects | Vanilla JS (small) | Vanilla JS |
page-load entrance | Vanilla CSS + small JS class toggle | Framer Motion at the layout level |
| Complex timeline (sequential, choreographed) | GSAP timeline | GSAP timeline (Client Component) |
If the spec already states a library, use it unless it conflicts with the platform (e.g. AOS in React — swap to Framer Motion equivalent and note in the report).
WHY differentiate: every library adds bytes and a learning surface. Hover effects don't need a library at all. Reveals can be done with one tiny library. Only complex choreography justifies GSAP.
Step 3. Install or wire the library
HTML path:
- AOS via CDN in
<head>:Initialize at end of<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/aos.css"> <script src="https://unpkg.com/[email protected]/dist/aos.js" defer></script>scripts/main.js:AOS.init({ duration: 600, easing: 'ease-out', once: true, disable: () => window.matchMedia('(prefers-reduced-motion: reduce)').matches, }); - GSAP via CDN:
Register and use in<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js" defer></script> <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/ScrollTrigger.min.js" defer></script>scripts/main.js:if (!window.matchMedia('(prefers-reduced-motion: reduce)').matches) { gsap.registerPlugin(ScrollTrigger); // ...timelines }
Next.js path:
- Framer Motion: already in
package.jsonperlp-coder-nextjs. Wrap interaction primitives incomponents/interactions/. - GSAP: add to
package.json(gsap), use within Client Components ('use client'), register ScrollTrigger insideuseEffectso it only runs client-side. - AOS: avoid in Next.js — use Framer Motion
whileInViewinstead.
Step 4. Implement each spec
For each interaction, edit the appropriate file. Examples:
Hover-lift on cards (HTML, Vanilla CSS):
<!-- BEFORE -->
<article class="bg-white rounded-lg shadow-md p-6">
<!-- AFTER -->
<article class="bg-white rounded-lg shadow-md p-6 transition-transform transition-shadow duration-200 ease-out hover:-translate-y-1 hover:shadow-lg motion-reduce:hover:transform-none motion-reduce:hover:shadow-md">
WHY motion-reduce: variants: Tailwind ships these out of the box; they neutralize the motion when the user prefers reduced motion. Cleaner than a media query around bespoke CSS.
Fade-up on viewport enter (HTML, AOS):
<section id="benefits" data-aos="fade-up" data-aos-delay="0">
<div data-aos="fade-up" data-aos-delay="100">...</div>
<div data-aos="fade-up" data-aos-delay="200">...</div>
</section>
Stagger reveal (HTML, GSAP):
if (!window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
gsap.from('#benefits .benefit-card', {
scrollTrigger: { trigger: '#benefits', start: 'top 80%' },
opacity: 0,
y: 24,
duration: 0.6,
stagger: 0.08,
ease: 'power2.out',
});
}
Parallax on hero image (HTML, GSAP):
if (!window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
gsap.to('#hero img', {
scrollTrigger: {
trigger: '#hero',
start: 'top top',
end: 'bottom top',
scrub: true,
},
yPercent: 30,
ease: 'none',
});
}
Counter (HTML, vanilla):
function animateCounter(el, target, duration = 1200) {
if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
el.textContent = String(target);
return;
}
const start = performance.now();
function tick(now) {
const t = Math.min(1, (now - start) / duration);
el.textContent = Math.round(target * (1 - Math.pow(1 - t, 3))).toString();
if (t < 1) requestAnimationFrame(tick);
}
requestAnimationFrame(tick);
}
const io = new IntersectionObserver((entries) => {
for (const e of entries) {
if (e.isIntersecting) {
animateCounter(e.target, parseInt(e.target.dataset.counter || '0'));
io.unobserve(e.target);
}
}
});
document.querySelectorAll('[data-counter]').forEach((el) => io.observe(el));
Reveal wrapper (Next.js, Framer Motion):
'use client';
import { motion, useReducedMotion } from 'framer-motion';
import { ReactNode } from 'react';
export function Reveal({ children, delay = 0 }: { children: ReactNode; delay?: number }) {
const reduced = useReducedMotion();
if (reduced) return <>{children}</>;
return (
<motion.div
initial={{ opacity: 0, y: 24 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true, margin: '-10%' }}
transition={{ duration: 0.5, delay, ease: [0.2, 0.8, 0.2, 1] }}
>
{children}
</motion.div>
);
}
Step 5. Enforce 60fps discipline
For every animation, verify:
- The animated CSS properties are ONLY
transform(translate, scale, rotate, skew) oropacity. NEVERwidth,height,top,left,right,bottom,margin,padding,font-size,border-radius. WHY: onlytransformandopacitycan be composited by the GPU without re-running layout or paint; everything else triggers reflow on every frame. will-change: transform, opacityis added ONLY where heavy animation runs and removed after (don't carpet-bomb the page —will-changeallocates a layer per element).- No
scrollevent listener for scroll-driven animation — use IntersectionObserver or GSAP ScrollTrigger. - No
setIntervalfor frame animation — userequestAnimationFrame.
If a spec asks for something that requires animating a non-compositable property (e.g. animating height for an accordion expand), substitute with transform: scaleY() + transform-origin: top and adjust outer layout — or accept the cost and flag it.
Step 6. Respect prefers-reduced-motion everywhere
This is non-negotiable:
- WCAG 2.3.3: a user's motion preference must be respected.
- Tailwind
motion-reduce:variants for CSS-driven animation. window.matchMedia('(prefers-reduced-motion: reduce)')guard around JS animations.- AOS
disablecallback set to the media query. - Framer Motion
useReducedMotion()hook. - GSAP: wrap timelines in the media query guard.
WHY zero-tolerance: users with vestibular disorders can be physically nauseated by parallax and aggressive movement. This isn't a polish item — it's harm reduction.
Step 7. Verify no regressions
After every edit:
- Confirm no
console.erroris introduced (e.g. GSAP plugin not registered). - Confirm the page still functions without JS for content (the static HTML reaches the same paint).
- Confirm focus, FAQ, form, navigation still work.
- Confirm critical CSS path didn't grow significantly.
Step 8. Write the animation report
Write lp-workspace/05-optimization/animation-report.json:
{
"implementedAt": "2026-05-29T..",
"platform": "html",
"interactionsImplemented": 12,
"librariesUsed": {
"vanilla-css": 5,
"aos": 4,
"gsap": 3,
"framer-motion": 0
},
"items": [
{
"id": "hero-headline-fade",
"type": "fade-up",
"target": "#hero h1",
"library": "aos",
"params": { "duration": 600, "easing": "ease-out", "delay": 0 },
"status": "implemented",
"compositableOnly": true,
"reducedMotionRespected": true
}
// ...one entry per interaction
],
"warnings": [
{
"id": "accordion-expand",
"issue": "spec requested height animation; substituted scaleY for 60fps",
"decision": "auto-substituted"
}
]
}
Ensure lp-workspace/05-optimization/ exists. Back up prior report to .backup.
Step 9. Report back
アニメーション実装が完了しました:
実装件数: [N] 件
使用ライブラリ:
- Vanilla CSS: [N] 件 (hover, focus)
- AOS: [N] 件 (in-view fade)
- GSAP ScrollTrigger: [N] 件 (parallax, stagger choreography)
- (Next.jsの場合) Framer Motion: [N] 件
prefers-reduced-motion: 全件で尊重
60fpsチェック: transform/opacity のみで構成
修正ファイル: lp-workspace/04-implementation/{html or nextjs}/
レポート: lp-workspace/05-optimization/animation-report.json
次のステップ: performance-optimizer / a11y-auditor / cross-browser-tester
Output
Files modified: lp-workspace/04-implementation/html/* or lp-workspace/04-implementation/nextjs/**/* (direct edits to wire animations).
File written: lp-workspace/05-optimization/animation-report.json — per-spec implementation log.
Quality checks
Before declaring done:
- Every interaction in
interactions.jsonis either implemented or flagged with reason - Every animation targets ONLY
transformand/oropacity(nowidth,height,top,left, etc.) -
prefers-reduced-motion: reduceis respected in every JS animation, AOS init, GSAP timeline, and Framer Motion component (or via Tailwindmotion-reduce:variants) - No
scrollevent listeners (use IntersectionObserver or ScrollTrigger) - No
setIntervalfor animation (userequestAnimationFrame) -
will-changeis set sparingly (only on actively animating elements, removed when done) - No new console errors introduced
- FAQ, forms, navigation, focus rings still function
- Library scripts are deferred (
deferattribute on HTML;'use client'in React) - Report JSON is valid and one entry per spec
If any check fails, do NOT report success — fix it.
References
${CLAUDE_PLUGIN_ROOT}/skills/lp-maker/references/workspace-schema.mdskills/ui-microinteraction-designer/SKILL.md— upstream; the spec sourceskills/lp-coder-html/SKILL.md,skills/lp-coder-nextjs/SKILL.md— upstream; the code being modifiedskills/responsive-optimizer/SKILL.md— siblingskills/a11y-auditor/SKILL.md— sibling; verifies reduced-motion respectskills/performance-optimizer/SKILL.md— downstream; measures Core Web Vitals impact