Communitygithub.com

hanimaru1121/animation-implementer

Wires up interaction specifications from `ui-microinteraction-designer` into a running implementation, selecting the best animation library per spec (vanilla CSS, AOS, GSAP, or Framer Motion) while always respecting `prefers-reduced-motion` and restricting to `transform`/`opacity` for 60fps performance.

What is animation-implementer?

This skill is the bridge between interaction intent and actual motion on a landing page. It reads the detailed interaction specifications produced by `ui-microinteraction-designer`—like hover-lift, scroll-reveal, parallax, counters, stagers, and magnetic buttons—and implements each one using the most appropriate animation library for the target platform (HTML or Next.js). For simple hover/focus effects, it uses vanilla CSS or Tailwind utilities to keep dependencies minimal; for in-view reveals, it uses AOS in HTML or Framer Motion's `whileInView` in React; for complex scroll-driven choreography or timelines, it leverages GSAP's ScrollTrigger. Crucially, the skill enforces two non-negotiable rules: every animation must only animate `transform` or `opacity` (the only GPU-compositable properties) to maintain 60fps, and every animation must respect the user's `prefers-reduced-motion: reduce` preference. After implementation, it generates a detailed JSON report (`animation-report.json`) in the workspace, logs every interaction's status, and performs quality checks for regressions, console errors, and accessibility. It is triggered by specific keywords like "アニメーション実装", "implement animations", "GSAP入れて", or automatically when the orchestrator reaches Tier 4 after `lp-coder-*`.

Works with✓Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/hanimaru1121/claude-skills/tree/HEAD/plugins/lp-maker/skills/animation-implementer

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

What does animation-implementer do?

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.json exists
  • Implementation exists at lp-workspace/04-implementation/html/ or nextjs/
  • The orchestrator reaches Tier 4 after lp-coder-*
  • The user says "アニメーション実装して" / "wire up animations" / "GSAP入れて" / "scroll reveal を動かして"

Do NOT use this skill when:

  • interactions.json doesn't exist — route to ui-microinteraction-designer first
  • 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:

  1. lp-workspace/03-design/interactions.json — per-interaction spec. Each item should have id, 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.
  2. lp-workspace/04-implementation/html/ OR nextjs/ — 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 typeHTML target → libraryNext.js target → library
hover-lift, hover-tilt, focus-glow, button-pressVanilla CSS (:hover, :focus-visible)Vanilla CSS via Tailwind utilities
fade-up, fade-in, slide-up on viewport enterAOS (data-aos="fade-up")Framer Motion whileInView
stagger-children on viewport enterGSAP ScrollTriggerFramer Motion variants + stagger
parallax, scrub, pin (scroll-driven choreography)GSAP ScrollTriggerGSAP ScrollTrigger (Client Component)
counter (0 → target number)Vanilla JS IntersectionObserver + rAFVanilla JS or Framer Motion animate()
marquee, infinite-scrollVanilla CSS @keyframes (cheap)Vanilla CSS
magnetic-button, cursor effectsVanilla JS (small)Vanilla JS
page-load entranceVanilla CSS + small JS class toggleFramer Motion at the layout level
Complex timeline (sequential, choreographed)GSAP timelineGSAP 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>:
    <link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/aos.css">
    <script src="https://unpkg.com/[email protected]/dist/aos.js" defer></script>
    
    Initialize at end of scripts/main.js:
    AOS.init({
      duration: 600,
      easing: 'ease-out',
      once: true,
      disable: () => window.matchMedia('(prefers-reduced-motion: reduce)').matches,
    });
    
  • GSAP via CDN:
    <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>
    
    Register and use in scripts/main.js:
    if (!window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
      gsap.registerPlugin(ScrollTrigger);
      // ...timelines
    }
    

Next.js path:

  • Framer Motion: already in package.json per lp-coder-nextjs. Wrap interaction primitives in components/interactions/.
  • GSAP: add to package.json (gsap), use within Client Components ('use client'), register ScrollTrigger inside useEffect so it only runs client-side.
  • AOS: avoid in Next.js — use Framer Motion whileInView instead.

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) or opacity. NEVER width, height, top, left, right, bottom, margin, padding, font-size, border-radius. WHY: only transform and opacity can be composited by the GPU without re-running layout or paint; everything else triggers reflow on every frame.
  • will-change: transform, opacity is added ONLY where heavy animation runs and removed after (don't carpet-bomb the page — will-change allocates a layer per element).
  • No scroll event listener for scroll-driven animation — use IntersectionObserver or GSAP ScrollTrigger.
  • No setInterval for frame animation — use requestAnimationFrame.

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 disable callback 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.error is 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.json is either implemented or flagged with reason
  • Every animation targets ONLY transform and/or opacity (no width, height, top, left, etc.)
  • prefers-reduced-motion: reduce is respected in every JS animation, AOS init, GSAP timeline, and Framer Motion component (or via Tailwind motion-reduce: variants)
  • No scroll event listeners (use IntersectionObserver or ScrollTrigger)
  • No setInterval for animation (use requestAnimationFrame)
  • will-change is 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 (defer attribute 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.md
  • skills/ui-microinteraction-designer/SKILL.md — upstream; the spec source
  • skills/lp-coder-html/SKILL.md, skills/lp-coder-nextjs/SKILL.md — upstream; the code being modified
  • skills/responsive-optimizer/SKILL.md — sibling
  • skills/a11y-auditor/SKILL.md — sibling; verifies reduced-motion respect
  • skills/performance-optimizer/SKILL.md — downstream; measures Core Web Vitals impact

Individual skills in this repo

This repo contains 3 individual skills — each has its own dedicated page.

hanimaru1121/image-asset-generator

This skill should be used when the user wants the actual image files for the landing page generated and placed in the implementation folder — based on the specs from `image-asset-planner`. If the user has an image generation MCP (DALL-E, Imagen, Stable Diffusion, Midjourney bridge) it calls that; otherwise produces a usable placeholder (labeled SVG with correct dimensions, or a CSS gradient with text). Triggers include "画像生成して", "画像を作って", "ヒーロー画像", "OG画像作成", "generate images", "create hero image", "make placeholder images", "image assets", "画像アセット", or when the orchestrator (`lp-maker`) reaches Tier 4. Note that founder/customer/real-person portraits MUST NOT be AI-generated and are flagged for the user to provide real photos. Make sure to use this skill whenever the LP has image slots that need files, so `lp-coder-*` can reference real paths.

hanimaru1121/image-asset-planner

This skill should be used when the user wants a complete spec list of every image, illustration, and icon the LP needs — file names, exact dimensions (1x/2x/3x), formats, purposes, alt text, and ready-to-paste generative-AI prompts for Midjourney/DALL·E/Imagen/Adobe Firefly. Triggers include "画像仕様", "image plan", "画像リスト", "画像プロンプト", "AI画像", "Midjourneyプロンプト", "image spec", "what images do we need", "ヒーロー画像どうする", "アイコン仕様", or when the orchestrator (`lp-maker`) reaches Tier 3 Step 4. It reads `02-strategy/ia.json`, `02-strategy/copy.json`, and `03-design/design-tokens.json`, and writes `03-design/image-spec.json`. Make sure to use this skill BEFORE `image-asset-generator` in Tier 4 — without specs, generation is random and brand-inconsistent. Every needed image is enumerated so generation can be batched.

hanimaru1121/visual-mockup-designer

This skill should be used when the user wants a high-fidelity, openable HTML+Tailwind mockup of the entire landing page — colors applied from design tokens, real copy from `copy.json`, placeholder images sized correctly, and all sections from IA visible end-to-end. Triggers include "モックアップ", "mockup", "モックアップ作って", "プレビュー", "preview", "high-fidelity comp", "デザインカンプ", "デザイン案", "ビジュアル案見せて", or when the orchestrator (`lp-maker`) reaches Tier 3 Step 3. It reads `03-design/design-tokens.json`, `03-design/wireframe.svg`, `02-strategy/copy.json`, and `02-strategy/ia.json`, and writes a single-file `03-design/mockup.html` (CDN Tailwind, no build step) the user can open in any browser. This is NOT the final shippable code — it's a designed comp. Animations and interactions are marked with HTML comments for `ui-microinteraction-designer` and `animation-implementer` downstream. Make sure to use this skill whenever the user wants to "see what the LP would look like" BEFORE committing to production

Related Skills