gsap-greensock — скилл для Claude Code: что делает и как установить
Скилл подсказывает агенту, как применить 12 диснеевских принципов анимации в GreenSock: от сжатия и растяжения до движения по дуге через твины и таймлайны.
npx skills add dylantarre/animation-principles --skill gsap-greensock -a claude-codeЧто делает gsap-greensock
Скилл добавляет в контекст правила сборки анимаций на базе GreenSock Animation Platform. В него заложены готовые шаблоны для 12 классических принципов анимации: захлёст движения, упреждение, сценичность, тайминг и расчёт вторичных действий.
Внутри собраны рецепты под синтаксис gsap.timeline() и одиночные твины gsap.to(). Ассистент узнаёт, как выстраивать цепочки с параметрами смещения "<" или "-=0.2", настраивать траектории через motionPath и использовать функции плавности вроде power2.inOut или back.out(2).
Без подключённого пакета GSAP сгенерированный код работать не будет. Скилл опирается исключительно на API GreenSock вроде scaleX или transformPerspective.
Какие задачи решает
- запрограммировать отскок кнопки или мяча с эффектом сжатия и растяжения
- составить цепочку движений через
gsap.timeline()с наложением слоёв - анимировать полёт объекта по кривой траектории через
motionPath - добавить упреждение перед прыжком или исчезновением карточки
Примеры запросов агенту
- Сделай анимацию клика по кнопке с упреждением и вторичным движением иконки через GSAP
- Настрой покадровое перемещение спрайта по ключевым точкам с помощью keyframes в GSAP
- Анимируй взмах плаща персонажа с задержкой относительно тела через таймлайн GreenSock
Как установить gsap-greensock
1Через Skills CLI (Vercel)
npx skills add dylantarre/animation-principles --skill gsap-greensock -a claude-code2Вручную: положить файлы
~/.claude/skills/gsap-greensock/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/gsap-greensock/
1Через Skills CLI (Vercel)
npx skills add dylantarre/animation-principles --skill gsap-greensock -a codex2Вручную: положить файлы
.agents/skills/gsap-greensock/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add dylantarre/animation-principles --skill gsap-greensock -a cursor2Вручную: положить файлы
.cursor/skills/gsap-greensock/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install dylantarre/animation-principles gsap-greensock2Вручную: положить файлы
.github/skills/gsap-greensock/SKILL.md1Через Skills CLI (Vercel)
npx skills add dylantarre/animation-principles --skill gsap-greensock -a gemini-cli2Командой платформы
gemini skills install https://github.com/dylantarre/animation-principles --path skills/09-by-tool-framework/gsap-greensockВручную: положить файлы
.devin/skills/gsap-greensock/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add dylantarre/animation-principles --skill gsap-greensock -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о gsap-greensock
Как установить gsap-greensock в Claude Code?
Выполните команду npx skills add dylantarre/animation-principles --skill gsap-greensock -a claude-code. Файл навыка сохранится по пути ~/.claude/skills/gsap-greensock/SKILL.md.
Зачем нужен скилл gsap-greensock?
Он помогает агенту писать выразительные анимации по 12 принципам Disney, используя цепочки таймлайнов и готовые функции плавности GSAP.
Какие функции GSAP использует этот скилл?
Скилл применяет gsap.timeline(), метод gsap.to(), списки keyframes, траектории motionPath, параметры stagger, зацикливание yoyo и функции плавности ease.
Исходный текст
SKILL.md · MIT
---
name: gsap-greensock
description: Use when implementing Disney's 12 animation principles with GSAP (GreenSock Animation Platform)
---
# GSAP Animation Principles
Implement all 12 Disney animation principles using GSAP's powerful timeline and tween system.
## 1. Squash and Stretch
```javascript
gsap.to(".ball", {
scaleX: 1.2,
scaleY: 0.8,
yoyo: true,
repeat: 1,
duration: 0.15,
ease: "power2.inOut"
});
```
## 2. Anticipation
```javascript
const tl = gsap.timeline();
tl.to(".character", { y: 20, scaleY: 0.9, duration: 0.2 }) // wind up
.to(".character", { y: -200, duration: 0.4, ease: "power2.out" }); // action
```
## 3. Staging
```javascript
gsap.to(".background", { filter: "blur(3px)", opacity: 0.6 });
gsap.to(".hero", { scale: 1.1, zIndex: 10 });
```
## 4. Straight Ahead / Pose to Pose
```javascript
// Pose to pose with explicit keyframes
gsap.to(".sprite", {
keyframes: [
{ x: 0, y: 0 },
{ x: 100, y: -50 },
{ x: 200, y: 0 },
{ x: 300, y: -30 }
],
duration: 1
});
```
## 5. Follow Through and Overlapping Action
```javascript
const tl = gsap.timeline();
tl.to(".body", { x: 200, duration: 0.5 })
.to(".hair", { x: 200, duration: 0.5 }, "-=0.4") // overlaps
.to(".cape", { x: 200, duration: 0.6 }, "-=0.45"); // more drag
```
## 6. Slow In and Slow Out
```javascript
gsap.to(".element", {
x: 300,
duration: 0.6,
ease: "power2.inOut" // slow in and out
});
// Other eases: "power3.in", "power3.out", "elastic.out"
```
## 7. Arc
```javascript
gsap.to(".ball", {
motionPath: {
path: [{ x: 0, y: 0 }, { x: 100, y: -100 }, { x: 200, y: 0 }],
curviness: 1.5
},
duration: 1
});
```
## 8. Secondary Action
```javascript
const tl = gsap.timeline();
tl.to(".button", { scale: 1.1, duration: 0.2 })
.to(".icon", { rotation: 15, duration: 0.15 }, "<") // same time
.to(".particles", { opacity: 1, stagger: 0.05 }, "<0.1");
```
## 9. Timing
```javascript
// Fast snap
gsap.to(".fast", { x: 100, duration: 0.15 });
// Gentle float
gsap.to(".slow", { y: -20, duration: 2, ease: "sine.inOut", yoyo: true, repeat: -1 });
```
## 10. Exaggeration
```javascript
gsap.to(".element", {
scale: 1.5, // exaggerated scale
rotation: 720, // multiple spins
duration: 0.8,
ease: "back.out(2)" // overshoot
});
```
## 11. Solid Drawing
```javascript
gsap.to(".box", {
rotationX: 45,
rotationY: 30,
transformPerspective: 1000,
duration: 0.5
});
```
## 12. Appeal
```javascript
gsap.to(".card", {
scale: 1.02,
boxShadow: "0 20px 40px rgba(0,0,0,0.2)",
duration: 0.3,
ease: "power1.out"
});
```
## GSAP Timeline Pattern
```javascript
const masterTL = gsap.timeline({ defaults: { ease: "power2.out" }});
masterTL
.add(anticipation())
.add(mainAction())
.add(followThrough());
```
## Key GSAP Features
- `gsap.timeline()` - Sequence animations
- `ease` - 30+ built-in easing functions
- `stagger` - Offset multiple elements
- `motionPath` - Arc and path animations
- `yoyo` / `repeat` - Loop control
- `"<"` / `"-=0.2"` - Position parameter for overlap
© dylantarre · MIT · dylantarre/animation-principles