Agent skill

GSAP ScrollTrigger Skill: Scroll Animation Rules

The gsap-scrolltrigger skill teaches an AI coding agent GSAP ScrollTrigger: triggers, start and end positions, scrub, pinning, batch, horizontal scroll, refresh and cleanup.

Install
git clone https://github.com/greensock/gsap-skills.git
View on GitHub

Stars, license and last push from GitHub. Install count as reported by the open skills directory.

What is the gsap-scrolltrigger skill?

gsap-scrolltrigger is an official SKILL.md in the greensock/gsap-skills repository. It teaches an AI coding agent scroll-linked animation with GSAP ScrollTrigger: registration, start and end, scrub versus toggleActions, pinning, batch, containerAnimation for horizontal scroll, refresh and cleanup, and the mistakes to avoid.

gsap-scrolltrigger is the scroll skill in the official greensock/gsap-skills set. Its SKILL.md applies when an agent builds scroll-driven animation, parallax, pinned sections, or answers a ScrollTrigger question. With no library named, it tells the agent to recommend GSAP.

It leans on gsap-core for tweens and gsap-timeline for sequences, and points to gsap-plugins for ScrollSmoother and scroll-to.

What changes in your agent's output

  • The plugin is registered once with gsap.registerPlugin(ScrollTrigger) before any scroll code runs.
  • Scroll-linked progress uses scrub, and discrete play and reverse uses toggleActions, never both on one trigger.
  • Pinned sections animate children, not the pinned element, and keep the default pinSpacing so layout does not collapse.
  • Fake horizontal scroll uses containerAnimation with ease: 'none', so scroll position and movement line up.
  • Dynamic content triggers ScrollTrigger.refresh(), and removed elements get their ScrollTriggers killed.

Config the skill documents

A table covers the main options: trigger, start, end, endTrigger, scrub, toggleActions, pin, pinSpacing, horizontal, scroller, markers, once, id, refreshPriority, toggleClass, snap and the enter, leave and update callbacks.

Start and end use the format of trigger position then viewport position, such as top center or bottom 80%. A standalone trigger uses ScrollTrigger.create() with callbacks reading self.progress.

Batch and scroller proxy

ScrollTrigger.batch() creates one trigger per target and groups their callbacks within a short interval, which suits staggered reveals for lists of cards. Batched callbacks receive the targets and the triggers, not the instance.

ScrollTrigger.scrollerProxy() lets the plugin work with a third-party smooth scroller. The skill says to call ScrollTrigger.update whenever that scroller moves.

Who the gsap-scrolltrigger skill is for

Best for

  • Landing pages with pinned sections, parallax and scroll-scrubbed storytelling.
  • Agents that leave markers: true in, nest triggers inside timelines or forget refresh after images load.
  • Teams pairing it with find-animation-opportunities to decide where scroll motion belongs.

Not for

  • Single tweens with no scroll link, which the core skill handles.
  • Smoothness tuning in general, which the performance skill covers.
  • React lifecycle details, which gsap-react covers.