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.
npx skills add AThevon/genjutsu --skill gsap -a claude-codeWhat 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
ScrollTriggerand React rendering mistakes
Example prompts for the agent
- Create a card entrance animation with
gsap.fromToand a distributedstagger. - Build horizontal scrolling with
ScrollTriggerandcontainerAnimation. - 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-code2Manually: put the files in place
~/.claude/skills/gsap/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/gsap/
1Skills CLI (Vercel)
npx skills add AThevon/genjutsu --skill gsap -a codex2Manually: put the files in place
.agents/skills/gsap/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add AThevon/genjutsu --skill gsap -a cursor2Manually: put the files in place
.cursor/skills/gsap/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install AThevon/genjutsu gsap2Manually: put the files in place
.github/skills/gsap/SKILL.md1Skills CLI (Vercel)
npx skills add AThevon/genjutsu --skill gsap -a gemini-cli2Platform CLI
gemini skills install https://github.com/AThevon/genjutsu --path skills/_jutsu/gsapManually: put the files in place
.devin/skills/gsap/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add AThevon/genjutsu --skill gsap -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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.