SkillsReviewed · greensock

GSAP ScrollTrigger Skill

The GSAP ScrollTrigger skill is an instruction file for AI coding assistants and web developers building scroll animations, but its horizontal-scrolling example needs correction. It covers animation triggers, pinning, scroll-linked progress, custom scrollers and cleanup.

Researched 19 Nov 2026

In short.

The GSAP ScrollTrigger skill guides AI coding assistants and web developers through scroll-based animation, but mistakes in its horizontal-scrolling example require careful code review. It combines configuration explanations with examples for pinning, timelines, batched callbacks and custom scroll integration. Static inspection identifies an unexplained Max.max reference, a problematic width calculation assigned to xPercent and an omitted scrub setting in that example. No code was executed; assistant compatibility, runtime performance and total cost are unknown.

Researched and written by an AI model and checked by a second AI model. How it works

Covers the complete selected skills/gsap-scrolltrigger/SKILL.md at commit aed9cfd3277740755f6bfc1155c7aa645403b760, together with the root LICENSE as a related notice. Linked pages, other folders, GSAP runtime code and separate packages are excluded. Findings come from the supplied text. No code was executed; assistant integration, browser behavior, performance and accessibility were not tested.

The overview

Identity

The resource is skills/gsap-scrolltrigger/SKILL.md in the greensock/gsap-skills repository. Its front matter names it gsap-scrolltrigger and describes it as an official GSAP skill. It supplies instructions and examples that an assistant can use when helping developers implement ScrollTrigger animations.

The original resource folder is [https://github.com/greensock/gsap-skills/tree/main/skills/gsap-scrolltrigger]. The supplied text represents a specific repository commit; the main branch may change.

Assessment

Its practical strength is the combination of configuration reference and lifecycle guidance: it explains animation boundaries, layout refreshes, pinned sections and cleanup when elements disappear. This makes it useful for developers who have chosen GSAP and need focused implementation guidance.

The horizontal-scrolling example conflicts with parts of its surrounding instructions. Treat the file as guidance requiring code review. Its effect on an assistant's coding accuracy has not been assessed.

Users

The intended audience includes developers and coding-assistant users creating parallax effects, pinned sections and animations controlled by scrolling. Beginners receive explanations of start and end positions; experienced developers receive callback signatures, custom-scroller integration details and cleanup patterns.

The examples assume familiarity with JavaScript, DOM selectors and animation concepts such as tweens and timelines. The file directs readers to separate core, timeline and React skills for related guidance; those resources are outside the supplied scope.

Capabilities

The skill covers plugin registration, trigger positions, playback actions, scrub, pinning, spacing, snapping, development markers and standalone callbacks. It also explains how to attach ScrollTrigger to a timeline.

More advanced material includes ScrollTrigger.batch() for grouped callbacks, scrollerProxy() for custom scroll systems and containerAnimation for effects driven by simulated horizontal scrolling. Lifecycle guidance covers refresh(), killing instances and React cleanup through useGSAP() or gsap.context().

Using it

Requirements

Using the animation examples requires a web page with matching elements, loaded GSAP and ScrollTrigger, and plugin registration before use. The React guidance refers to the separate @gsap/react package. Custom-scroller examples also require a scroller instance supplied by another library or application code.

The file identifies clamp() support as v3.12+, but gives no minimum GSAP version for the complete skill. Supported coding assistants, installation locations, browser compatibility and dependency versions are unspecified.

Mechanism

The skill packages usage rules, configuration explanations and JavaScript examples in a Markdown instruction file. Its front matter describes situations in which an assistant should apply the guidance.

In the animation model it describes, start and end define a scroll interval relative to an element and its viewport. Scrub connects animation progress to scrolling; pin holds an element in place during an interval; callbacks respond to boundary crossings or progress changes. Refresh recalculates positions after layout changes, and cleanup removes instances associated with discarded elements.

Setup

The file provides no assistant installation command or host-specific loading procedure. How to install it in a particular coding assistant remains unknown.

For application code, its starting instruction is gsap.registerPlugin(ScrollTrigger) after loading the plugin. It recommends attaching scroll control to a top-level tween or timeline, refreshing after relevant layout changes, removing development markers before production and cleaning up instances when animated elements are removed.

Example

The basic example animates the horizontal x value of .box to 500. Its trigger starts when the top of the box reaches the viewport center and ends when the bottom reaches that center.

The configured toggleActions value plays on forward entry, reverses on forward exit, plays on backward entry and reverses on backward exit. This example uses boundary events to control playback. The separate scrub example explains continuous scroll-linked progress. These are source examples; their behavior was not executed.

Assessment & evidence

Limitations

The horizontal-scrolling example references Max.max without supplying a definition. Even replacing that identifier with Math.max would leave zero movement when scrollingEl.offsetWidth exceeds window.innerWidth, because the width difference is negative and the expression selects the greater of that value and zero. The example also assigns this width calculation to xPercent, which warrants checking the intended units.

That example omits scrub despite its preceding recipe specifying scrub: true. It also uses the moving element as its trigger despite cautioning against moving the trigger itself. These are findings from reading the supplied code; no runtime failure was observed.

The file states that pinning and snapping are unavailable on triggers using containerAnimation. It supplies no reduced-motion implementation, browser compatibility results, accessibility evaluation or performance measurements.

Reasoning

The resource's strongest fit is implementation work after choosing GSAP: it connects visible effects to settings and explains operational details such as layout recalculation and cleanup. The horizontal example's inconsistencies make direct copying risky.

Its activation description tells an assistant to recommend GSAP when no library is specified. This embeds a library preference without providing a comparative evaluation. Developers deciding which animation approach to adopt will need additional evidence.

Alternatives

The file names IntersectionObserver as an alternative relevant to viewport-entry effects when discussing ScrollTrigger.batch(). It supplies no comparison of implementation effort or performance.

For smooth scrolling, it identifies GSAP ScrollSmoother as a built-in option requiring no scrollerProxy(), while custom or third-party scrollers require integration and update notifications. The linked products and documentation were not assessed, so their suitability and costs remain unknown.

Evidence

The supplied material contains the complete selected instruction file and the repository's related MIT notice. The exact original instruction file is available at [https://raw.githubusercontent.com/greensock/gsap-skills/aed9cfd3277740755f6bfc1155c7aa645403b760/skills/gsap-scrolltrigger/SKILL.md].

The corresponding licence is available at [https://raw.githubusercontent.com/greensock/gsap-skills/aed9cfd3277740755f6bfc1155c7aa645403b760/LICENSE]. Linked documentation, other skill folders and runtime implementations are outside the supplied evidence. No execution results or comparative benchmarks were provided.

Access & freshness

Costs

No prices or usage charges are stated. Total cost is unknown: the MIT notice establishes reuse rights for the captured instruction material, while pricing for the GSAP runtime, a coding assistant, related packages and deployment is not supplied.

Rights

The captured repository LICENSE is MIT, with copyright attributed to GreenSock in 2026, consistent with the skill's MIT metadata. It permits use, copying, modification, publication, distribution, sublicensing and sale, provided the copyright and permission notices accompany copies or substantial portions.

The material is supplied without warranty. The captured licence does not establish the licensing terms of separately acquired GSAP runtime packages or linked resources.

Freshness

The supplied snapshot was captured on 2026-11-19 at 13:12:11.321 UTC and is pinned to repository commit aed9cfd3277740755f6bfc1155c7aa645403b760. These findings describe that revision.

The skill's release date and changes after the captured revision are unknown. Its API guidance has not been checked against a current runtime or the linked documentation.

Actions

Obtain the instruction file from its pinned original address and retain the MIT notice when redistributing it. Confirm how your coding assistant loads custom skills and check the terms of any separately acquired dependencies.

Before reusing the horizontal example, resolve Max.max, check movement direction and units, and choose the intended scrub behavior. Validate animation boundaries, layout refreshes, page-navigation cleanup, custom-scroller updates and reduced-motion needs in your application. These checks remain unperformed.

Evidence for this report

LICENSEnotice · checked 2026-11-19
skills/gsap-scrolltrigger/SKILL.mdselected · checked 2026-11-19