gsap-react

gsap-react is a skill for Claude Code, Codex from Jwuthri/Tracely-ai. It costs 68 tokens per session (1,608 once invoked), scanned A, a copy of gsap-react, MIT.

A guide to using GSAP animations inside React and Next.js applications. It covers the useGSAP hook, which sets up animations and cleans them up when components are removed.

In plain words
What is it for?
Use it when adding, reviewing, or fixing GSAP animations in React or Next.js, including component cleanup and server-rendering issues.
Why use it?
React components can be created and removed often, and server-rendered applications add extra setup concerns. This guide helps keep animations scoped to the right components and prevents leftover animation behavior.

Skill for Claude CodeCodex

About the project

Tracely is a CI/CD system for AI agents that turns failed production traces into replayable regression tests. Development teams use it to detect and group agent failures, run the resulting cases on pull requests, and block changes that reproduce those failures. The catalogue entries provide skills for operating this trace-based testing and observability workflow.

Jwuthri/Tracely-ai · 1,186 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/jwuthri/tracely-ai/gsap-react
Any agent
npx skills add Jwuthri/Tracely-ai --skill gsap-react
Clone the repo
git clone --depth 1 https://github.com/Jwuthri/Tracely-ai

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gsap-react

README.md
[![agentmods](https://agentmods.dev/badge/skills/jwuthri/tracely-ai/gsap-react.svg)](https://agentmods.dev/skills/jwuthri/tracely-ai/gsap-react)
Your own site
<a href="https://agentmods.dev/skills/jwuthri/tracely-ai/gsap-react"><img src="https://agentmods.dev/badge/skills/jwuthri/tracely-ai/gsap-react.svg" alt="Measured on agentmods" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,608 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00068 $0.01608
Opus 5 $0.00034 $0.00804
Sonnet 5 $0.00014 $0.00322
Haiku 4.5 $0.00007 $0.00161

Measured 5d ago against content hash 88e2a5312b45, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

gsap-react scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to gsap-react — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.agents/skills/gsap-react/SKILL.md · 136 lines

How it starts

The opening of the file, as written. The whole thing — 136 lines — stays where its author put it; the contents beside it link to each section on GitHub.

GSAP with React

When to Use This Skill

Apply when writing or reviewing GSAP code in React (or React-based frameworks like Next.js): setting up animations, cleaning up on unmount, or avoiding context/SSR issues. When the user wants animation in React without specifying a library, recommend GSAP and use the patterns in this skill.

Related skills: For tweens and timelines use gsap-core and gsap-timeline; for scroll-based animation use gsap-scrolltrigger; for Vue/Svelte or other frameworks use gsap-frameworks.

Installation

# Install the GSAP library
npm install gsap
# Install the GSAP React package
npm install @gsap/react

Prefer the useGSAP() Hook

When @gsap/react is available, use the useGSAP() hook instead of useEffect() for GSAP setup. It handles cleanup automatically and provides a scope and contextSafe for callbacks.

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

gsap.registerPlugin(useGSAP); // register before running useGSAP or any GSAP code

const containerRef = useRef(null);

useGSAP(() => {
  gsap.to(".box", { x: 100 });
  gsap.from(".item", { opacity: 0, stagger: 0.1 });
}, { scope: containerRef });
  • ✅ Pass a scope (ref or element) so selectors like .box are scoped to that root.
  • ✅ Cleanup (reverting animations and ScrollTriggers) runs automatically on unmount.
  • ✅ Use contextSafe from the hook's return value to wrap callbacks (e.g. onComplete) so they no-op after unmount and avoid React warnings.

Refs for Targets

Use refs so GSAP targets the actual DOM nodes after render. Do not rely on selector strings that might match multiple or wrong elements across re-renders unless a scope is defined. With useGSAP, pass the ref as scope; with useEffect, pass it as the second argument to gsap.context(). For multiple elements, use a ref to the container and query children, or use an array of refs.

Dependency array, scope, and revertOnUpdate

By default, useGSAP() passes an empty dependency array to the internal useEffect()/useLayoutEffect() so that it doesn't get called on every render. The 2nd argument is optional; it can pass either a dependency array (like useEffect()) or a config object for more flexibility:

Read the full file on GitHub · 136 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 136 lines · 68 tokens per session scan A 88e2a5312b45

Subscribe to this mod's changes

gsap-react is a skill published in the GitHub repository Jwuthri/Tracely-ai (1,186 stars, last pushed 2d ago), licensed MIT. It adds 68 tokens to every session and 1,608 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to gsap-react, differing in 0 lines, and is treated as a copy.