Make AI assistants understand anime.js v4 syntax correctly, every time.
This repository contains comprehensive instructions to ensure AI coding assistants (Claude, Cursor, ChatGPT, etc.) generate correct anime.js v4 code and properly migrate from GSAP.
Just copy and paste these commands into your AI assistant:
Quick reference (condensed version):
Add rules from https://github.com/Makio64/animejs-v4-ai-guidelines/blob/main/CLAUDE_CONDENSED.mdFull reference (comprehensive):
Add rules from https://github.com/Makio64/animejs-v4-ai-guidelines/blob/main/CLAUDE.mdMigrate from GSAP:
Follow https://github.com/Makio64/animejs-v4-ai-guidelines/blob/main/GSAP_TO_ANIME.md to migrate this GSAP codeQuick reference (condensed):
@https://github.com/Makio64/animejs-v4-ai-guidelines/blob/main/CLAUDE_CONDENSED.mdFull reference:
@https://github.com/Makio64/animejs-v4-ai-guidelines/blob/main/CLAUDE.mdMigrate from GSAP:
@https://github.com/Makio64/animejs-v4-ai-guidelines/blob/main/GSAP_TO_ANIME.md migrate from GSAPQuick reference (faster, condensed):
Use instructions from https://github.com/Makio64/animejs-v4-ai-guidelines/blob/main/CLAUDE_CONDENSED.md for anime.js v4Full reference (comprehensive):
Use instructions from https://github.com/Makio64/animejs-v4-ai-guidelines/blob/main/CLAUDE.md for anime.js v4For GSAP migration:
Follow the guide at https://github.com/Makio64/animejs-v4-ai-guidelines/blob/main/GSAP_TO_ANIME.mdCLAUDE_CONDENSED.md ⚡ (Recommended for quick tasks)
Condensed anime.js v4 reference with:
- ✅ Essential v4 syntax rules
- 🎯 Quick property reference table
⚠️ Common mistakes to avoid- 🎨 Most-used animation patterns
- 📋 Validation checklist
CLAUDE.md 📖 (Full reference)
Complete anime.js v4 reference guide with:
- ✅ Correct v4 syntax and imports
⚠️ Common AI mistakes (and how to avoid them)- 📝 Code formatting guidelines
- 🎯 Quick validation checklist
- 📚 Full API reference
- 🎨 All animation patterns
- 💻 TypeScript support
- ⚡ Performance tips
Complete GSAP to anime.js v4 migration guide:
- 🔄 Property name mappings
- 🎨 Easing function conversions
- ⏱️ Timeline migration patterns
- 📜 ScrollTrigger → ScrollObserver
- 🎯 Side-by-side code examples
Problem: AI assistants often generate outdated anime.js v3 syntax, causing errors and confusion.
Solution: These guidelines enforce v4 syntax and prevent common mistakes.
import anime from 'animejs';
anime({
targets: '.element',
translateX: 250,
easing: 'easeInOutQuad',
duration: 2000
});import { animate } from 'animejs';
animate('.element', {
x: 250,
ease: 'inOutQuad',
duration: 2000
});Add one of these lines to your existing CLAUDE.md:
# For quick reference (recommended):
For animations, follow: https://github.com/Makio64/animejs-v4-ai-guidelines/blob/main/CLAUDE_CONDENSED.md
# For comprehensive reference:
For animations, follow: https://github.com/Makio64/animejs-v4-ai-guidelines/blob/main/CLAUDE.md# Append to your CLAUDE.md
curl https://raw.githubusercontent.com/Makio64/animejs-v4-ai-guidelines/main/CLAUDE.md >> CLAUDE.mdgit clone https://github.com/Makio64/animejs-v4-ai-guidelines.gitWhen AI generates anime.js code, check for these red flags:
❌ Wrong (v3)
import anime from 'animejs'anime({ targets: ... })anime.timeline()easing: 'easeInOutQuad'
✅ Correct (v4)
import { animate } from 'animejs'animate('.element', { ... })createTimeline()ease: 'inOutQuad'
Found an issue or want to add more examples? Contributions are welcome!
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-addition) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-addition) - Open a Pull Request
MIT License - Use these guidelines freely in your projects!
Remember: Always verify AI-generated code uses v4 syntax. When in doubt, reference these guidelines!