Skip to main content
skill CX Codex

gsap · mengto — Claude Code skill: GSAP animations and ScrollTrigger

A skill that helps your coding agent write and debug GSAP web animations: timelines, ScrollTrigger, stagger, transforms.

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

What gsap does

The skill kicks in when a project needs GSAP motion — element entrances, micro-interactions, page transitions, scroll-driven scenes. Your agent gets a reference for the API: gsap.to, gsap.from, gsap.fromTo, timelines with the position parameter, eases like power2.out and elastic.out(1, 0.3), and stagger with each, from and grid options.

ScrollTrigger has its own section. It covers registering the plugin, the inline scrollTrigger var, and the full config with trigger, start, end, scrub, pin, snap, markers. Then the usual breakages: animating top/left/width instead of transforms, a trigger that never fires because of sizing or a nested scroll container, leaks in SPAs when there is no gsap.context() and revert on unmount, and FOUC from starting before fonts and images load.

Three recipes ship with it: a staggered hero entrance, a sequenced nav-title-CTA timeline, and a pinned section with scroll scrub. When the brief is vague, the skill tells the agent to ask whether you are on a static site or an SPA, whether you need pin and scrub, and what your mobile and reduced-motion constraints are. Worth installing if GSAP is already in your stack — without the library, the API notes have nothing to attach to.

What it helps with

  • build one sequenced timeline instead of scattered CSS transitions
  • fix a ScrollTrigger that never fires inside a nested scroll container
  • stop jank by animating transforms instead of top and left
  • clean up animation leaks when a React component unmounts
  • kill the flash of content before fonts and images load

Example prompts for the agent

  • Add a staggered GSAP entrance for the hero section on elements with data-anim
  • Build a timeline for the nav, title and CTA with overlapping timing
  • Set up a ScrollTrigger with pin and scrub for the story section

How to install gsap

1Skills CLI (Vercel)

npx skills add MengTo/Skills --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?

Run npx skills add MengTo/Skills --skill gsap -a claude-code. The skill file lands at ~/.claude/skills/gsap/SKILL.md.

What does the gsap skill do?

It gives your agent a GSAP reference: tweens, timelines, eases, stagger, ScrollTrigger, plus the common pitfalls. It works across HTML, CSS, JS and React.

Do I need GSAP itself in my project?

Yes. The skill documents the GSAP library and its ScrollTrigger plugin, so the patterns it suggests need GSAP loaded to run.

Source text

SKILL.md · MIT
---
name: gsap
description: Use when you need to add or debug professional web animations with GSAP (timelines, ScrollTrigger, stagger, transforms) in HTML/CSS/JS/React. Includes patterns for smooth motion, performance, and common pitfalls.
---

# GSAP (GreenSock) — Web Animation Skill

## When to use
- High-quality UI/motion design: entrances, micro-interactions, page transitions
- Timeline-based sequences (vs. scattered CSS transitions)
- Scroll-driven storytelling (with ScrollTrigger)
- Complex easing, staggering, orchestration across many elements

## Key concepts & APIs
- Tweens:
  - `gsap.to(targets, vars)`
  - `gsap.from(targets, vars)`
  - `gsap.fromTo(targets, fromVars, toVars)`
- Timelines:
  - `const tl = gsap.timeline({ defaults, repeat, yoyo, paused })`
  - Chain: `tl.to(...).from(...).addLabel('x').add(() => ...)`
  - Position parameter: absolute `1.2`, relative `"+=0.5"`, overlap `"-=0.3"`, label `"intro"`
- Eases: `ease: "power2.out"`, `"expo.inOut"`, `"elastic.out(1, 0.3)"`
- Staggers: `stagger: 0.05` or `{ each, from: "start|center|end|random", grid }`
- Performance-friendly properties:
  - Prefer transforms (`x`, `y`, `scale`, `rotation`) and opacity (`autoAlpha`)
- ScrollTrigger (plugin):
  - `gsap.registerPlugin(ScrollTrigger)`
  - Inline: `gsap.to(".box", { scrollTrigger: ".box", x: 500 })`
  - Advanced: `scrollTrigger: { trigger, start, end, scrub, pin, snap, markers }`
  - Standalone: `ScrollTrigger.create({ trigger, start, end, onUpdate, onToggle })`

## Common pitfalls (and fixes)
- Animating layout properties (top/left/width/height) → jank
  - Use transforms, add `will-change: transform`, avoid forced reflow.
- ScrollTrigger “not firing” due to wrong trigger sizing/overflow containers
  - Ensure trigger exists, has height, and check scroll container (nested scrolling needs config).
- Not cleaning up in SPA/React
  - Use `gsap.context()` and revert on unmount; kill triggers (`ScrollTrigger.getAll().forEach(t => t.kill())`) if needed.
- FOUC / measuring before fonts/images load
  - Initialize after layout is stable; run `ScrollTrigger.refresh()` after images load.

## Quick recipes

### 1) Hero entrance (stagger)
```js
gsap.from(".hero [data-anim]", {
  y: 24,
  autoAlpha: 0,
  duration: 0.8,
  ease: "power2.out",
  stagger: 0.06,
});
```

### 2) Sequenced timeline
```js
const tl = gsap.timeline({ defaults: { ease: "power2.out", duration: 0.6 } });
tl.from(".nav", { y: -20, autoAlpha: 0 })
  .from(".hero-title", { y: 30, autoAlpha: 0 }, "-=0.2")
  .from(".hero-cta", { scale: 0.95, autoAlpha: 0 }, "-=0.2");
```

### 3) Scroll-scrub pinned section
```js
gsap.registerPlugin(ScrollTrigger);

gsap.timeline({
  scrollTrigger: {
    trigger: ".story",
    start: "top top",
    end: "+=800",
    scrub: 1,
    pin: true,
  },
}).to(".story .panel", { xPercent: -200 });
```

## What to ask the user (if requirements unclear)
- Is this a static site or SPA (React/Next/Vue)? Any page transitions?
- Do we need scroll-driven sections (pin/scrub/snap)?
- Performance constraints (mobile support, reduced motion)?

© MengTo · MIT · MengTo/Skills

Similar skills

Everything for Frontend and UI →

gsap by other authors comes first.

gsap AThevon This skill helps an agent write GSAP animations with timelines, staggered effects, and ScrollTrigger. Use it for complex motion and scroll-linked scenes. CX Codex +1 997installs 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-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 freshtechbro A skill that teaches the agent to write GSAP animations and ScrollTrigger scroll effects: tweens, timelines, pinning, parallax. CX Codex +1 2,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 gsap-react Bbeierle12 A skill with GSAP patterns for React: the useGSAP hook, ref handling, cleanup on unmount and timeline control. CX Codex +1 724installs gsap-timeline greensock This skill helps an agent build GSAP timelines, control timing, and manage playback. Use it for multi-step or parallel animation scenes. CX Codex +1 69,100installs 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 set148

threejs Guides your agent through building and debugging interactive Three.js scenes: scene, camera, lights, glTF loading, controls and performance. CX Codex +1 2,000installs landing-page Skill for planning and copywriting single-offer landing pages for web apps or services. Sets up section order, benefit-driven copy formulas, and objection handling. CX Codex +1 2,000installs animation-on-scroll A skill that wires up scroll-reveal with IntersectionObserver, plus Tailwind animation classes and keyframes. CX Codex +1 2,000installs animation-systems Motion design guide for clean, product-grade web animations like Stripe, Linear, and Apple. Useful when building UI transitions, hover states, and modals. CX Codex +1 1,900installs design-first-ui-prompting Turns loose visual ideas into strict, design-system-style specifications for UI generation. It fixes grids, typography rules, and spacing upfront for predictable screens. CX Codex +1 1,800installs gsap-scrolltrigger-storytelling 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 tailwindcss A skill that steers your coding agent through Tailwind CSS UI work: layout, typography, responsive variants, theming and component patterns. CX Codex +1 1,700installs optimize-web-animations Pauses offscreen CSS, Canvas, and WebGL animations and fixes frontend memory leaks. Useful when long browser sessions or heavy page effects cause janky scrolling and high CPU load. CX Codex +1 1,700installs

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