Agent skill Web motion
GSAP Frameworks
Design, implement or review motion on the web.
Install the skill
Run the command from your project root with Node.js and npm.
npx skills@latest add nexu-io/open-design --skill gsap-frameworks --agent claude-code --yesCheck this file in your project.claude/skills/gsap-frameworks/SKILL.md
Other ways to install
Choose an assistant interactively
npx skills@latest add nexu-io/open-design --skill gsap-frameworksSelect your assistant and choose the project installation scope.
Official instructions
The tested Skills CLI 1.10.0 requires Node.js 22.20 or later. The Open Design and GreenSock editions use the same installed Skill directory. Check the source and the edition your project needs if the name is already present. A Vue component with a root template ref, an existing way to mount or remove it, and GSAP in the app.
View operation manualWhat this skill helps with
- Design, implement or review motion on the web.
Good for
- Web motion and transitions
- Current edition
- The GreenSock workflow curated by Open Design.
- Upstream publisher
- GreenSock
- Installed content
- SKILL.md with workflow guidance
- Result
- A scoped Vue animation with a repeatable mount and unmount check.
- Skill name
gsap-frameworks- Repository
nexu-io/open-design
Common pitfall
Avoid this prompt
Run gsap.to(".item", …) anywhere the component is created.
A shared selector can target another instance, and calling DOM code before mount can run before the elements are available.
Use these steps
- Find the root ref, animated descendants, and lifecycle hooks.
- Create animations after mounting and revert the context when the component unmounts.
- Exercise instance isolation and teardown while an animation is running.
Hands-on walkthrough
Give each instance of a Vue component independent motion and clean up its animation on unmount.
Give each instance of a Vue component independent motion and clean up its animation on unmount.
Identify the instance boundary
Find the root ref, animated descendants, and lifecycle hooks.
Prompt · Step 1Load the Open Design edition of the gsap-frameworks Skill. Use gsap-frameworks to inspect [Vue component]. Identify its root template ref, CSS selector for the target descendants, and an existing route or toggle that unmounts it. Show where DOM-only work belongs and how you will render two instances for a scope test.Create a scoped context
Create animations after mounting and revert the context when the component unmounts.
Prompt · Step 2Inside onMounted, create the animation in gsap.context(() => { … }, root.value) after confirming the root exists. Save that context in the component and call ctx.revert() in onUnmounted. Remove any native listeners that you add. Keep the pre-mount markup usable in server-rendered views.Test two instances and a remount
Exercise instance isolation and teardown while an animation is running.
- The second instance and unrelated sibling remain static.
- Remount restores startup styles and gives each trigger one response.
Prompt · Step 3Render two instances and an unrelated sibling with the same target class. Trigger the first instance and verify the others remain static. Unmount the active instance mid-animation, remount it, and verify the initial styles and a single response per trigger. If the app uses SSR, check the initial render and hydration console too. Report what ran.
API lookup
Use these calls when adapting the walkthrough to your component.
Scope Vue selectorsGSAP
- Command or reference
gsap.context(callback, root.value)- Examples
- Pass the actual root element from its template ref after mount.
Release managed animationsGSAP
- Command or reference
ctx.revert()- Examples
- Call in Vue onUnmounted or in a synchronous Svelte onMount disposer.
FAQ
How does a Svelte component clean up?
Create the scoped GSAP context in onMount and return a synchronous function that calls ctx.revert(). Remove any DOM listeners you installed in the same cleanup.
What does installing the skill add?
The project skill folder contains the publisher’s SKILL.md. Your application still needs its own GSAP dependency and a page to run the animation.