Platinum sponsors

Prompting tips

Ask for animations the editor can edit.

An agent that follows docs/agents.md applies these rules on its own. Without it, add them to your prompt, or to the instructions file of your project, so the code the agent writes stays editable:

  • Give every animation, setter, timeline, timeline child, layout and layout transition a unique, descriptive literal id, such as 'Hero title reveal', and every label a unique name.
  • Use the object form for timeline call() and sync(): call({ id, callback }, position) and sync({ id, target }, position).
  • Write values inline in each call, not in variables or shared objects.
  • Use stagger() and random({ ... }) instead of function values, and cubicBezier(), linear(), spring() or a built-in ease such as 'out(3)' instead of custom ease functions.
  • Put shared settings and initial poses in named utils.set() calls.
  • Finish each timeline with init() once everything is added.
  • Load the editor only in development, before the code that creates the animations.

Example prompt

With the anime.js Editor block in your AGENTS.md, describe only the motion:

Animate the hero section. The title fades up, then the three cards rise
one after another, then the footer fades in. Use one Anime.js timeline.

The agent gives the timeline and every child an id, and keeps the values inline.

Previous
Next