gsap-refactor
Orchestrate safe GSAP improvements for existing pages or components. Use when the page already exists and needs better animation quality, cleanup, performance fixes, accessibility hardening, or a more
SKILL.mdskills/gsap-animated-frontend/subskills/gsap-refactor/SKILL.md
GitHubGSAP Refactor
Use this workflow for existing pages/components that already have code and may already have motion.
Sequence
- Read
.gsapartifacts first. - Read the actual implementation files.
- Run internal discovery, audit, and scan helpers.
- Detect framework, packages, routes, current motion libraries, and matched page files.
- Identify what to preserve, remove, simplify, or improve.
- Update
.gsap/audit-report.md,.gsap/animation-plan.md,.gsap/tasks/<page>.tasks.md, and.gsap/phases/<page>/*.md. - Split the refactor into phased sections instead of sweeping the full page at once.
- Apply safe changes to the active phase only unless the user asks for a broader pass.
- Update page artifact statuses and notes.
Internal Helper
Use:
python scripts/gsap_workflow.py gsap-refactor --path "<project>" --page "<page>"
This command should gather current workflow state, inspect the project structure, detect current motion systems, write audit/refactor notes, and prepare implementation state. It is the only public helper command for this mode.
Refactor Rules
- preserve good motion when possible
- remove noisy or redundant effects
- add reduced-motion handling where missing
- reduce mobile-heavy patterns before adding more spectacle
- do not change the motion direction without updating
.gsapartifacts
Completion
Before finishing, ensure:
.gsap/audit-report.mdrecords major findings and fixes.gsap/animation-plan.mdreflects the refactor priorities.gsap/tasks/<page>.tasks.mdreflects the current queue and active phase.gsap/phases/<page>/reflects the refactor section breakdown.gsap/pages/<page>.animation.mdreflects the final status