squash-stretch-mastery — Claude Code skill: setup and features
Guides AI agents on squash and stretch physics: handles UI bounces and impact deformation while preserving object volume.
npx skills add dylantarre/animation-principles --skill squash-stretch-mastery -a claude-codeWhat squash-stretch-mastery does
This skill teaches the assistant how to apply Disney's squash and stretch principle to interface and game animations. Volume preservation is the core rule. Whenever an object compresses along one axis, it must expand along the other, because failing to preserve volume makes shapes look like they scale rather than deform under force.
The instructions establish deformation ranges for various materials. Soft items get bold deformation, while rigid wood or metal keep micro-shifts around 1-2% to prevent a stiff mechanical look. For user interfaces, it recommends squashing tapped buttons down to 95-98% height and stretching lists on overscroll.
Implementation heuristics suggest starting around 10% deformation for energetic motions and 2-3% for subtle polish. Extreme poses need easing. Without smooth ease-in and ease-out transitions, the deformation snaps jarringly instead of reading as organic impact.
What it helps with
- animate button presses with subtle height compression
- configure impact deformation for game jump arcs
- preserve visual volume during logo bounces
- add elastic stretching to list overscroll
Example prompts for the agent
- Add a gentle 96% squash on button tap with volume compensation
- Animate this notification card drop with an elastic bounce on arrival
- Implement landing impact deformation with 10% squash on the character sprite
How to install squash-stretch-mastery
1Skills CLI (Vercel)
npx skills add dylantarre/animation-principles --skill squash-stretch-mastery -a claude-code2Manually: put the files in place
~/.claude/skills/squash-stretch-mastery/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/squash-stretch-mastery/
1Skills CLI (Vercel)
npx skills add dylantarre/animation-principles --skill squash-stretch-mastery -a codex2Manually: put the files in place
.agents/skills/squash-stretch-mastery/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add dylantarre/animation-principles --skill squash-stretch-mastery -a cursor2Manually: put the files in place
.cursor/skills/squash-stretch-mastery/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install dylantarre/animation-principles squash-stretch-mastery2Manually: put the files in place
.github/skills/squash-stretch-mastery/SKILL.md1Skills CLI (Vercel)
npx skills add dylantarre/animation-principles --skill squash-stretch-mastery -a gemini-cli2Platform CLI
gemini skills install https://github.com/dylantarre/animation-principles --path skills/11-by-principle-focus/squash-stretch-masteryManually: put the files in place
.devin/skills/squash-stretch-mastery/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add dylantarre/animation-principles --skill squash-stretch-mastery -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about squash-stretch-mastery
How to install squash-stretch-mastery in Claude Code?
Run npx skills add dylantarre/animation-principles --skill squash-stretch-mastery -a claude-code. This downloads the skill file into ~/.claude/skills/squash-stretch-mastery/SKILL.md.
What does squash-stretch-mastery do?
It gives the AI precise deformation constraints, ensuring animated objects expand as they compress so they deform organically instead of scaling.
What deformation values does this skill recommend?
It suggests starting around 10% deformation for energetic actions and 2-3% for subtle polish. UI buttons, for instance, compress down to 95-98% height on tap.
Source text
SKILL.md · MIT
--- name: squash-stretch-mastery description: Use when implementing deformation effects, bounce animations, impact responses, or any motion requiring organic elasticity and weight expression. --- # Squash & Stretch Mastery ## The Foundation Principle Squash and stretch is considered the most important of Disney's 12 principles because it solves animation's fundamental problem: making rigid objects feel alive. Developed in the 1930s at Disney, it emerged from observing how real flesh and rubber deform under force while maintaining constant volume. ## Core Theory **Volume Preservation**: When an object squashes, it must widen. When it stretches, it must narrow. This constraint creates believability—violate it and objects appear to grow or shrink rather than deform. **Force Visualization**: Squash and stretch makes invisible forces visible. A ball squashing on impact shows us the floor's resistance. A character stretching mid-leap reveals velocity and momentum. ## The Elasticity Spectrum Not all objects deform equally: - **High elasticity**: Rubber balls, cartoon characters, jelly (extreme deformation) - **Medium elasticity**: Human faces, cloth, muscle (subtle deformation) - **Low elasticity**: Wood, metal, bone (minimal but present micro-deformation) Even "rigid" objects benefit from 1-2% deformation—it prevents the dead, mechanical feel. ## Interaction with Other Principles **Timing amplifies squash/stretch**: Fast impacts demand more squash; slow floats need gentle stretch. The deformation amount must match velocity. **Anticipation uses stretch**: A character winding up for a jump often stretches slightly before the motion begins. **Follow-through extends it**: After landing, the squash ripples through secondary elements (hair, clothing, flesh). ## Domain Applications ### UI/Motion Design - Button press: subtle squash (95-98% height) on tap - List items: stretch slightly when pulled beyond bounds (rubber-band scroll) - Notifications: squash on arrival, bounce to rest ### Character Animation - Facial expressions: cheeks squash on smile, stretch on surprise - Walk cycles: torso compresses on contact, extends on passing - Emotional beats: extreme stretch for shock, squash for dejection ### Logo Animation - Bouncing logos: exaggerated squash creates playful personality - Subtle breathing: micro-squash/stretch keeps static logos alive ### Game Feel - Jump arcs: stretch on ascent, squash on landing - Hit reactions: brief squash sells impact before knockback - Collectibles: rhythmic pulse using gentle squash/stretch ## Common Mistakes 1. **Breaking volume**: Objects appear to grow/shrink instead of deform 2. **Uniform deformation**: Real objects deform more where force is applied 3. **Over-application**: Subtle contexts need 1-5%, not cartoon 50% 4. **Static extremes**: Deformation should ease in/out, never snap ## Implementation Heuristic Start with 10% deformation for energetic motions, 2-3% for subtle polish. Adjust based on material and tone. When in doubt, less is more—squash/stretch should be felt, not consciously noticed.
© dylantarre · MIT · dylantarre/animation-principles