aditya-deokar/gsap-motion-engineer/gsap-react
Claude Code and agent skill by aditya-deokar/gsap-motion-engineer
- community
Checking that the SKILL.md file is still in the repository.
Production GSAP engineering for React 18/19 and Next.js App Router — @gsap/react useGSAP hook, ref scoping, contextSafe event handlers, SSR safety, and reusable motion components. Use when integrating GSAP with React or Next.js, building animated React components, handling cleanups, or managing SSR.
Install
npx vskill@latest install aditya-deokar/gsap-motion-engineer/gsap-reactSKILL.md
The same SKILL.md was published earlier as aditya-deokar/gsap-motion-engineer/gsap-react.
GSAP with React 18/19 & Next.js
When to Use This Skill
Apply this skill whenever building or reviewing animations in React or Next.js:
- Setting up animations with the official
@gsap/reactuseGSAPhook. - Preventing memory leaks and duplicate animations in React 18/19 Strict Mode.
- Scoping selector queries to component containers using
{ scope: ref }. - Handling interactive events (clicks, hovers) safely using
contextSafe(). - Building safe animations in Next.js App Router without hydration or SSR errors.
- Creating reusable React motion components (
<ScrollReveal>,<Magnetic>).
📦 Installation & Setup
⚡ The Modern useGSAP Hook
The @gsap/react useGSAP hook replaces traditional useEffect / useLayoutEffect, handling SSR guards, ref scoping, and automatic cleanup when components unmount:
🎯 Handling Click & Hover Events with contextSafe
When animations are triggered by user events (like button clicks) outside the initial useGSAP execution, use `contextSafe` so they are tracked by the cleanup context:
🔄 Responding to React State Changes
Pass state dependencies directly to useGSAP. Set revertOnUpdate: true if previous animations should reset before new ones run:
🌐 Next.js App Router SSR Best Practices
- Always declare `"use client"` at top of files containing GSAP animations.
- Safe Plugin Registration: Register plugins outside component functions:
```tsx "use client"; import gsap from "gsap"; import { ScrollTrigger } from "gsap/ScrollTrigger";
if (typeof window !== "undefined") { gsap.registerPlugin(ScrollTrigger); } ```
- Dynamic Import for Heavy Canvas/3D Components:
If using Three.js or complex GSAP canvas integrations, import them dynamically without SSR: ```tsx import dynamic from "next/dynamic";
const CanvasScene = dynamic(() => import("@/components/CanvasScene"), { ssr: false, }); ```
🧩 Reusable React Motion Component Pattern
A battle-tested <ScrollReveal> wrapper component:
Usage:
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/gsap-react/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/aditya-deokar/gsap-motion-engineer/gsap-react)