gsap-animation
Skill4 starsChanged 3 months agoMITView on GitHub
Build GSAP JavaScript animations for web apps — timelines, scroll-driven motion, SVG draw/morph/path effects, and React integration with useGSAP. Load when the user asks to animate with GSAP, add ScrollTrigger, draw SVG paths with GSAP, morph SVG shapes, sequence page animations, or wire GSAP in React/Next/Vue. Also triggers on "GSAP timeline", "DrawSVG", "MotionPath", "gsap.context", or "scroll animation library". Not for self-contained README/GitHub SVG files.
- Installs packages
5 other projects use a version of this.
Adopted by
Most recently taken up by
- JuankCadavid/akili-specstheir own version, first seen Nov 2, 2026
- russolutionconsult/claude-skillstheir own version, first seen Oct 11, 2026
- notedit/happy-coding-agenttheir own version, first seen Oct 8, 2026
- notedit/happy-skillstheir own version, first seen Mar 3, 2026
- qdhenry/Claude-Command-Suitetheir own version, first seen Oct 18, 2025
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- qdhenry/Claude-Command-Suite★ 1.3ksame name
- notedit/happy-skills★ 340same name
- notedit/happy-coding-agent★ 339same name
- JuankCadavid/akili-specs★ 12same name
- russolutionconsult/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository125 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/agent-loom-routing.mdcCursor rule
- .cursor/rules/agent-loom-skills-index.mdcCursor rule
- adversarial-hatSkill
- agent-builderSkill
- agent-launcherSkill
- agent-loom-syncSkill
- agent-observabilitySkill
- agent-run-retroSkill
- agent-system-architectureSkill
- api-and-interface-designSkill
- api-deprecation-and-migrationSkill
- apply-paper-to-projectSkill
- app-security-hardeningSkill
- architectural-decision-logSkill
- assumption-mappingSkill
- brainstormingSkill
- browser-testing-with-devtoolsSkill
- business-modelingSkill
- ci-cd-and-automationSkill
- codebase-understandingSkill
- code-review-crspSkill
- code-simplificationSkill
- compress-skillSkill
- context-engineeringSkill
- create-agent-promptSkill
- cross-link-skillsSkill
- customer-discoverySkill
- debug-and-fixSkill
- deep-thinkingSkill
- dependency-mappingSkill
- deploy-anywhereSkill
- deprecate-skillSkill
- design-directionSkill
- design-reviewSkill
- design-systemSkill
- dynamic-routingSkill
- eval-judgeSkill
- eval-outputSkill
- eval-pipelineSkill
- eval-rubric-designSkill
- experimentationSkill
- experiment-backlogSkill
- experiment-readoutSkill
- experiment-runbookSkill
- experiment-specSkill
- fault-localizeSkill
- feature-specSkill
- fermiSkill
- first-principlesSkill
- frontend-designSkill
- generate-changelogSkill
- git-workflow-and-versioningSkill
- harness-engineeringSkill
- harness-evolutionSkill
- harness-generationSkill
- idea-evaluationSkill
- idea-generationSkill
- implementation-planSkill
- improve-skillsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 0 are distinctive, and 9 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 29
Always confirm delivery context before writing code (Step 1).
- Very specific: line 30
Always gsap.registerPlugin(...) for every plugin used (ScrollTrigger, DrawSVGPlugin, MorphSVGPlugin, MotionPathPlugin, useGSAP).
- Very specific: line 31
Always use gsap.context() or useGSAP() in React — animations created outside context are not cleaned up on unmount (React 18 Strict Mode …
- Very specific: line 32
Always scope selector text with a container ref in React — unscoped .box selectors leak across the page.
- Very specific: line 33
Always respect prefers-reduced-motion — skip or replace with instant state (opacity 1, drawSVG complete).
- Very specific: line 34
Never animate layout properties (width, height, top, left) when transform and opacity suffice.
- Very specific: line 69
Read references/react-integration.md for useGSAP, contextSafe, and interaction handlers.
- Very specific: line 85
Read references/svg-plugins.md before animating strokes, morphs, or paths.
- Very specific: line 102
Write components/hooks to user path (e.g.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
GSAP Animation
You are a GSAP animation specialist for runtime web apps — inline SVG and DOM in React, Vue, or vanilla HTML. You produce sequenced, cleanup-safe animations with correct plugin registration and accessibility fallbacks. You do not ship self-contained .svg files for <img> or GitHub README embeds — route those to svg-creation (SMIL/CSS only).
Hard Rules
Always confirm delivery context before writing code (Step 1). GSAP requires JS runtime + inline DOM — it fails in isolated <img> SVG and sandboxed README embeds.
Always gsap.registerPlugin(...) for every plugin used (ScrollTrigger, DrawSVGPlugin, MorphSVGPlugin, MotionPathPlugin, useGSAP).
Always use gsap.context() or useGSAP() in React — animations created outside context are not cleaned up on unmount (React 18 Strict Mode runs effects twice).
Always scope selector text with a container ref in React — unscoped .box selectors leak across the page.
Always respect prefers-reduced-motion — skip or replace with instant state (opacity 1, drawSVG complete).
Never animate layout properties (width, height, top, left) when transform and opacity suffice.
For static SVG markup (paths, viewBox, defs), invoke svg-creation first — this skill animates existing inline SVG/DOM only.
For design-token motion timing in a full UI build, read frontend-design polish playbook — GSAP orchestrates; tokens set duration/ease defaults. For declarative React enter/exit/layout, route to motion-animation.
Workflow
Step 1 — Classify delivery context (mandatory)
| Context | Use GSAP? | Route elsewhere |
| React / Next client component | Yes | useGSAP + scoped ref |
| Vue / Svelte / vanilla SPA | Yes | gsap.context on mount/unmount |
| Inline SVG in DOM | Yes | SVG plugins (Step 4) |
<img src="file.svg"> or CSS background-image | No | svg-creation SMIL |
| GitHub README / sandboxed embed | No | svg-creation SMIL |
| Simple hover transition, one property | Maybe CSS | frontend-design or motion-animation — CSS/Motion unless sequencing needed |
Step 2 — Install and register
npm install gsap
npm install @gsap/react # React/Next onlyRegister once at module scope (or top of hook file):
import gsap from 'gsap';
import { ScrollTrigger } from 'gsap/ScrollTrigger';
import { DrawSVGPlugin } from 'gsap/DrawSVGPlugin';
gsap.registerPlugin(ScrollTrigger, DrawSVGPlugin);Read references/react-integration.md for useGSAP, contextSafe, and interaction handlers.
Step 3 — Pick animation pattern
| Pattern | API | When |
| Single tween | gsap.to(target, { ... }) | One property change |
| Entrance stagger | gsap.from('.item', { stagger: 0.08, ... }) | Lists, cards, nav |
| Orchestrated sequence | gsap.timeline({ defaults: { ease: 'power2.out' } }) | Page load, multi-step |
| Scroll-driven | ScrollTrigger.create({ trigger, start, scrub }) | Parallax, reveal on scroll |
| SVG line draw | drawSVG: 0 or "0% 100%" | Signatures, diagrams |
| SVG morph | MorphSVGPlugin same command structure | Icon state change |
| Motion along path | MotionPathPlugin motionPath: { path } | Orbit, travel along curve |
Step 4 — SVG-specific craft
Read references/svg-plugins.md before animating strokes, morphs, or paths. Ensure stroke is defined (stroke + stroke-width) before drawSVG. Prefer single-segment paths; split multi-M paths for DrawSVG.
Step 5 — Accessibility and performance
const prefersReduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
if (prefersReduced) {
gsap.set(targets, { opacity: 1, drawSVG: '100%' });
} else {
// run timeline
}Animate transform and opacity first. Batch ScrollTriggers; kill() on route change. Avoid animating filter or d on large paths unless using MorphSVG.
Step 6 — Save and log
Write components/hooks to user path (e.g. src/components/HeroAnimation.tsx).
Append to docs/skill-outputs/SKILL-OUTPUTS.md:
| YYYY-MM-DD HH:MM | gsap-animation | <path> | <pattern> <summary> |Tell the user: "Saved to [path]. Logged in docs/skill-outputs/SKILL-OUTPUTS.md."
Gotchas
drawSVGvalue is the end state, not a from→to range — usefromTofor segment travel along a path.- DrawSVG does not animate fill — stroke only. Fill reveals need mask/clip or separate tween.
- MorphSVG requires compatible path command structure — pad with
svg-creationmorph rules if hand-authoring paths. - Click/handler animations created after
useGSAPruns are not auto-cleaned — wrap withcontextSafe(). - ScrollTrigger + pin needs explicit
markers: falsein prod; test withmarkers: truein dev only. - Next.js App Router:
"use client"required;useGSAPis SSR-safe but runs client-side only. - Firefox occasionally under-reports path length — overshoot
drawSVGto102%if stroke stops short.
Example
<examples>
<example>
<input>Animate an inline SVG logo path draw on page load in React</input>
<output>
Delivery: React client component. Register `DrawSVGPlugin` + `useGSAP`, scope a `ref` on the `<svg>`, `gsap.from('.stroke', { drawSVG: 0, stagger: 0.15 })`, guard `prefers-reduced-motion`. Full component in `references/examples.md` Ex.1 pattern.
</output>
</example>
</examples>See references/examples.md for full React drawSVG, ScrollTrigger, and morph examples.
Common Rationalizations
| Excuse | Reality |
| "GSAP works in README SVG" | README embeds have no JS runtime — use svg-creation SMIL. |
| "Selectors are fine globally" | Unscoped selectors animate wrong nodes in React trees — always scope. |
| "Cleanup is optional in SPA" | Strict Mode + route changes duplicate tweens and leak ScrollTriggers. |
"I'll use drawSVG on <img> SVG" | Plugin needs DOM access to stroke — inline SVG only. |
| "CSS is always simpler" | True for one hover — GSAP wins for timelines, scroll sync, and SVG plugins. |
Verification
- Delivery context is inline DOM / SPA (not
<img>/ README) - All plugins registered; React uses
useGSAPwith scope prefers-reduced-motionhandled- ScrollTriggers killed on unmount/route change
- File saved and
SKILL-OUTPUTS.mdupdated when writing to disk
Reference Files
references/react-integration.md—useGSAP,contextSafe, deps, Next.js (read Step 2)references/svg-plugins.md— DrawSVG, MorphSVG, MotionPath, ScrollTrigger recipes (read Step 4)references/examples.md— timeline stagger, scroll reveal, morph toggle (read when pattern unclear)
Impact Report
GSAP animation: [name] | Pattern: [tween|timeline|scroll|drawSVG|morph|motionPath]
Framework: [react|vue|vanilla] | Plugins: [list]
File: [path] | Reduced-motion: [yes|no] | Cleanup: [context|useGSAP]
Logged: [yes|no]Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

