aditya-deokar/gsap-motion-engineer/gsap-debugger
Claude Code and agent skill by aditya-deokar/gsap-motion-engineer
- community
Checking that the SKILL.md file is still in the repository.
Surgical GSAP debugging and diagnostic troubleshooting playbook. Instantly diagnoses and fixes React 18/19 strict mode double-firing, Flash of Unstyled Content (FOUC), ScrollTrigger pin spacing jumps, mobile Safari layout shift, timeline conflicts, memory leaks, and provides emergency reset commands. Use when animations lag, fail to trigger, repeat unexpectedly, or break on route changes.
Install
npx vskill@latest install aditya-deokar/gsap-motion-engineer/gsap-debuggerSKILL.md
The same SKILL.md was published earlier as aditya-deokar/gsap-motion-engineer/gsap-debugger.
GSAP Debugger & Troubleshooting Matrix
When to Use This Skill
Activate this skill whenever:
- Animations stutter, drop frames, or fail to play smoothly.
- ScrollTriggers trigger at incorrect offsets, fail to pin, or overlap adjacent sections.
- Animations play twice or break when navigating back/forward in React or Next.js.
- An unstyled flash of content appears before GSAP initializes (FOUC).
- You see
window is not definedor hydration errors in Next.js / Nuxt. - An emergency reset is needed to clear corrupted animation states.
π¨ Emergency Circuit Breaker
When all animations are desynchronized or stuck in an invalid state during development, run this emergency snippet to flush the entire GSAP engine:
π Diagnostic Matrix & Troubleshooting Tree
Use this decision tree to locate the root cause of the bug:
π οΈ The Top 8 GSAP Pitfalls & Guaranteed Fixes
1. React 18/19 Strict Mode Double Execution
The Problem: React mounts, unmounts, and remounts components in development. If using plain useEffect, tweens instantiate twice and fight each other. The Fix: Use @gsap/react useGSAP hook or wrap inside gsap.context():
2. Flash of Unstyled Content (FOUC)
The Problem: When using gsap.from(), elements start visible in CSS, then GSAP loads and snaps them to their "from" position a fraction of a second later, causing an ugly flash. The Fix:
- Add CSS guard:
- Always use
autoAlphainstead ofopacity:
3. Next.js App Router SSR / Hydration Errors
The Problem: GSAP and ScrollTrigger access window and document. In Next.js App Router, components render on the server where window does not exist. The Fix: Add "use client" directive at top of file, and ensure plugins are registered safely:
4. Layout Property Thrashing (left, top, width, height)
The Problem: Animating left, top, width, or height forces the browser CPU to recalculate page layout on every single frame, causing frame drops. The Fix: Convert directly to composite transforms:
5. ScrollTrigger Offsets Incorrect After Async Content Loads
The Problem: ScrollTrigger calculates trigger positions when the page initially loads. When dynamic images, fonts, or API data load later, page height expands, making triggers fire too early or too late. The Fix:
6. Overlapping Tweens Fighting for the Same Target
The Problem: Triggering multiple tweens on the same element (e.g. rapid hover events) causes conflicting tweens to run concurrently, resulting in stutter. The Fix: Use overwrite: "auto" or gsap.quickTo():
7. Section Jumps When Pinning
The Problem: When ScrollTrigger pins an element, it wraps it in a pin-spacer container. If the trigger doesn't anticipate the pin or has complex CSS margins, a visible jump occurs. The Fix:
8. Memory Leaks on Single Page App Route Changes
The Problem: Navigating between pages in React, Next.js, or Vue leaves background ScrollTriggers active, querying elements that no longer exist. The Fix:
In React, useGSAP handles this automatically if scope is passed.
π Comprehensive Pre-Flight Debugging Checklist
Before deploying animations to production, verify:
- [ ] Are all plugins registered via
gsap.registerPlugin()? - [ ] Are all animated elements scoped within their component ref?
- [ ] Are you animating
x/y/scaleinstead ofleft/top/width/height? - [ ] Have you set
force3D: trueon complex transform animations? - [ ] Have you tested with
markers: trueon ScrollTriggers? - [ ] Is
autoAlphaused instead of rawopacityto avoid FOUC? - [ ] Does the page respect
(prefers-reduced-motion: reduce)? - [ ] Have you tested on a real mobile device (not just desktop devtools)?
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-debugger/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-debugger)