Skip to main content
skill CX Codex

gsap · athevon — Claude Code skill: what it does, how to install

This skill helps an agent write GSAP animations with timelines, staggered effects, and ScrollTrigger. Use it for complex motion and scroll-linked scenes.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add AThevon/genjutsu --skill gsap -a claude-code
Open on GitHub

What gsap does

The skill covers GSAP timelines, fromTo, distributed stagger, pinned sections, and scroll-linked animation with ScrollTrigger. It also points to SplitText, Flip, MorphSVG, DrawSVG, MotionPath, and Observer for text, SVG, layout, and interaction work.

For React, it recommends useGSAP() from @gsap/react instead of useEffect with manual cleanup. Plugins should be registered at the top level with gsap.registerPlugin(). The reference also covers containerAnimation, timeline child tweens, setState inside onUpdate, immediateRender, and layout-triggering properties.

Using setState at scroll frequency can cause repeated React renders, so that is a concrete point to check in an existing component. The examples use gsap; React examples additionally use @gsap/react.

What it helps with

  • build a sequence with timeline
  • link element motion to page scrolling
  • distribute a stagger across a grid
  • animate text, SVG, and layout transitions
  • avoid ScrollTrigger and React rendering mistakes

Example prompts for the agent

  • Create a card entrance animation with gsap.fromTo and a distributed stagger.
  • Build horizontal scrolling with ScrollTrigger and containerAnimation.
  • Review this React component and replace manual cleanup with useGSAP().

How to install gsap

1Skills CLI (Vercel)

npx skills add AThevon/genjutsu --skill gsap -a claude-code

2Manually: put the files in place

~/.claude/skills/gsap/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/gsap/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about gsap

How do I install gsap in Claude Code?

Run npx skills add AThevon/genjutsu --skill gsap -a claude-code, run npx skills add AThevon/genjutsu --skill gsap -a claude-code again, then check ~/.claude/skills/gsap/SKILL.md.

What does the gsap skill do?

It helps an agent build GSAP timelines, distribute staggered motion, connect animations to scrolling, and use text and SVG plugins.

What does gsap need for React work?

React examples use useGSAP() from @gsap/react. GSAP plugins also need to be registered with gsap.registerPlugin().

Source text

SKILL.md · MIT
---
name: gsap
description: "GSAP animation engine sub-skill - core, timeline, ScrollTrigger, plugins."
metadata:
  internal: true
---

> **Version-sensitive.** Every API name, SDK gate and browser-support claim below was
> verified on **2026-09-08** against primary sources. What against, and when, is in
> `_jutsu/VERSIONS.md`. If that date is old, re-verify before acting on a version number.

# GSAP - Animation Engine

> GSAP 3.15 (released 13 Apr 2026). Since 3.13 the entire library - including every former Club plugin (SplitText, MorphSVG, DrawSVG, ScrollSmoother, InertiaPlugin, MotionPathHelper, CustomEase…) - ships in the public `gsap` npm package and is free, commercial use included, under the GreenSock Standard "no charge" license. There is no Club paywall.
> GreenSock also publish official agent skills (MIT, 8 skills: core, timeline, scrolltrigger, plugins, utils, react, performance, frameworks): https://github.com/greensock/gsap-skills - worth installing alongside this sub-skill.

## When to use GSAP

| Criteria              | CSS Transitions | Framer Motion | GSAP              |
| --------------------- | --------------- | ------------- | ----------------- |
| Hover / simple toggle | Yes             | Yes           | Overkill          |
| Sequenced timeline    | No              | Limited       | **Yes**           |
| Scroll-driven         | scroll-timeline | Limited       | **ScrollTrigger** |
| Complex stagger       | No              | Basic         | **Distribution**  |
| Mobile perf (60fps)   | Good            | Average       | **Excellent**     |
| Text splitting        | No              | No            | **SplitText**     |
| SVG morph / draw      | No              | No            | **MorphSVG**      |
| Bundle size concern   | 0kb             | ~30kb         | ~25kb + plugins   |

**Rule**: if the animation needs timeline, scroll-link, or distributed stagger, use GSAP. Otherwise CSS first.

## Setup

```js
// Always register plugins at the top level
import gsap from "gsap";
import { ScrollTrigger } from "gsap/ScrollTrigger";
import { SplitText } from "gsap/SplitText";

gsap.registerPlugin(ScrollTrigger, SplitText);
```

React: use `useGSAP()` from the `@gsap/react` package instead of `useEffect` + manual cleanup.

```jsx
import { useGSAP } from "@gsap/react";

useGSAP(() => {
  gsap.to(".box", { x: 200 });
}, { scope: containerRef }); // auto-cleanup, auto-revert
```

## Core Patterns

### defaults{} to avoid repetition

```js
const tl = gsap.timeline({
  defaults: { duration: 0.8, ease: "power2.out" },
});
tl.to(".a", { y: -20 })
  .to(".b", { y: -20 }, "<0.1")
  .to(".c", { y: -20 }, "<0.1");
```

### fromTo for full control

```js
gsap.fromTo(".card", { y: 40, opacity: 0 }, { y: 0, opacity: 1, stagger: 0.15 });
```

### Stagger with distribution

```js
gsap.to(".grid-item", {
  scale: 0,
  stagger: {
    each: 0.05,
    from: "center",   // "start" | "end" | "center" | "edges" | "random" | index
    grid: "auto",      // auto-detects the grid
    axis: "x",         // "x" | "y" | null (both)
  },
});
```

## ScrollTrigger Patterns

### Basic Pin + Scrub

```js
gsap.to(".panel", {
  x: "-300%",
  ease: "none",
  scrollTrigger: {
    trigger: ".container",
    pin: true,
    scrub: 1,
    end: () => "+=" + document.querySelector(".container").scrollWidth,
  },
});
```

### Batch for mass reveal

```js
ScrollTrigger.batch(".card", {
  onEnter: (elements) => gsap.to(elements, { opacity: 1, y: 0, stagger: 0.1 }),
  start: "top 85%",
});
```

### Horizontal scroll with containerAnimation

```js
const scrollTween = gsap.to(".panels", {
  x: () => -(document.querySelector(".panels").scrollWidth - window.innerWidth),
  ease: "none",
  scrollTrigger: { trigger: ".wrapper", pin: true, scrub: 1 },
});

// Animate elements INSIDE the horizontal scroll
gsap.to(".panel-content", {
  scale: 1.2,
  scrollTrigger: {
    trigger: ".panel-content",
    containerAnimation: scrollTween, // linked to horizontal scroll
    start: "left center",
    end: "right center",
    scrub: true,
  },
});
```

## DO NOT - Critical mistakes

### 1. Ease on containerAnimation

```js
// BAD - ease breaks the scroll mapping
scrollTrigger: { containerAnimation: scrollTween, scrub: 1, ease: "power2.out" }

// GOOD - always ease: "none" on the parent tween
const scrollTween = gsap.to(".panels", { x: ..., ease: "none", scrollTrigger: { scrub: 1 } });
```

### 2. ScrollTrigger on a child tween in a timeline

```js
// BAD - ScrollTrigger ignores child tweens of a timeline that has its own ScrollTrigger
const tl = gsap.timeline({ scrollTrigger: { trigger: ".section" } });
tl.to(".box", { x: 100, scrollTrigger: { trigger: ".box" } }); // IGNORE

// GOOD - one ScrollTrigger per timeline OR standalone tweens
gsap.to(".box", { x: 100, scrollTrigger: { trigger: ".box" } }); // tween standalone
```

### 3. setState in onUpdate

```js
// BAD - setState 60x/s = re-render hell
scrollTrigger: { onUpdate: (self) => setProgress(self.progress) }

// GOOD - mutate a ref or DOM element directly
const progressRef = useRef(0);
scrollTrigger: { onUpdate: (self) => { progressRef.current = self.progress; } }
// Or better: gsap.quickSetter to mutate the DOM without React
```

### 4. immediateRender on from() in a timeline

```js
// BAD - from() has immediateRender: true by default, breaks sequencing
tl.to(".box", { x: 100 });
tl.from(".box", { y: 50 }); // visually jumps to the start

// GOOD - disable immediateRender when from() follows another tween
tl.to(".box", { x: 100 });
tl.from(".box", { y: 50, immediateRender: false });
```

### 5. Animating non-transform properties

```js
// BAD - width/height/top/left trigger layout reflow
gsap.to(".box", { width: 200, height: 200 });

// GOOD - use transforms (GPU-accelerated, composited)
gsap.to(".box", { scaleX: 1.5, scaleY: 1.5 });
// If actual size needed: use Flip plugin for layout transition
```

## Refs

- `references/core.md` - Complete gsap.to/from/fromTo/set API, options
- `references/timeline.md` - Timeline, position parameter, nesting
- `references/scrolltrigger.md` - Full ScrollTrigger reference
- `references/plugins.md` - SplitText, Flip, MorphSVG, DrawSVG, MotionPath, Observer

© AThevon · MIT · AThevon/genjutsu

Similar skills

Everything for Frontend and UI →

gsap by other authors comes first.

gsap MengTo A skill that helps your coding agent write and debug GSAP web animations: timelines, ScrollTrigger, stagger, transforms. CX Codex +1 1,800installs gsap martinholovsky A skill that teaches the agent GSAP animations: HUD panel entrances, status indicator transitions, scroll effects. Useful when the UI is built on Vue. CX Codex +1 1,300installs gsap Mindrally Tells your agent how to write GSAP animations: transforms over left/top, stagger, timelines, ScrollTrigger. Useful when the UI stutters on weaker hardware. CX Codex +1 769installs gsap official HeyGen A GSAP cheat sheet for your agent: tweens, timelines, easing, performance. Useful when writing animation inside HyperFrames compositions. CX Codex GP ChatGPT 3installs gsap-scrolltrigger greensock Teaches AI agents to build scroll-driven animations with GreenSock ScrollTrigger, including pinned sections and scrub timelines. CX Codex +1 72,200installs gsap-plugins greensock A skill that walks your agent through GSAP plugin registration and usage: ScrollTo, Flip, Draggable, SplitText and more. Handy when your animations already run on GSAP. CX Codex +1 67,200installs gsap-scrolltrigger-storytelling MengTo A skill for scroll-driven product storytelling: pinned scenes, progressive UI reveals and transitions between sections, built on GSAP ScrollTrigger. CX Codex +1 1,800installs gsap-web iart-ai Helps AI coding assistants write GSAP animations, from sequenced timelines and ScrollTrigger effects to SplitText, Flip, and Lenis smooth scroll. CX Codex +1 2,500installs cinematic-gsap-lenis-motion-system MengTo Builds cinematic web animation systems using GSAP, ScrollTrigger, and Lenis. Ideal for luxury editorial layouts, creative portfolios, and smooth reveals. CX Codex +1 2,400installs awwwards-animations DevMartinese A React animation skill for Awwwards and FWA-grade work: scroll effects, custom cursors, page transitions, generative art. Useful when you need smooth 60fps motion. CX Codex +1 2,900installs

From the same set17

motion-principles A foundational motion design skill establishing timing budgets, easing curves, reduced-motion compliance, and jank prevention for Web, SwiftUI, and Compose. CX Codex +1 1,100installs design-audit Scans frontend codebases for accessibility flaws, motion bugs, and AI design tells. Runs static checks and stacks checklists before shipping. CX Codex +1 1,000installs threejs-r3f A skill covering Three.js and React Three Fiber: scene setup, hooks, postprocessing and performance rules. Useful when your agent writes 3D in React. CX Codex +1 1,000installs css-native A skill that tells your coding agent when plain CSS is enough for animations and visual effects, and when to reach for a library. CX Codex +1 1,100installs canvas-generative A skill for algorithmic graphics on Canvas 2D: particles, flow fields, noise, fractals and L-systems. Useful when you need a browser animation or a generative still. CX Codex +1 995installs framer-motion Guides coding agents on Framer Motion and Motion patterns in React: layout transitions, gestures, and DOM-direct motion values. CX Codex +1 990installs desktop-principles A skill with desktop UX rules: hover states, pointer precision, keyboard shortcuts, multi-window patterns. Useful when the interface targets macOS, Windows or Linux. CX Codex +1 982installs mobile-principles A rule set for mobile interfaces: tap target sizes, no-hover doctrine, thumb zones, safe areas and gestures. Loads when the agent detects a mobile platform. CX Codex +1 974installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor