SM

smil-animation

Build interactive, script-free SVG animations using the SMIL 3.0 declarative standard.

Install

mkdir -p .claude/skills/smil-animation && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/15235" && unzip -o skill.zip -d .claude/skills/smil-animation && rm skill.zip

Installs to .claude/skills/smil-animation

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Create self-contained, script-free SVG animations and interactive logic using SMIL 3.0. Use when building interactive icons, ambient backgrounds, or complex transitions without CSS or JS overhead.
196 chars✓ has a “when” trigger
Intermediate

Key capabilities

  • Implement linear or spline transitions for SVG attributes using `<animate>`
  • Apply spatial changes like rotation, scaling, and translation with `<animateTransform>`
  • Create movement along complex bezier paths using `<animateMotion>` and `<mpath>`
  • Set up interactive event handling with `begin` and `end` attributes for DOM events
  • Optimize animations with spline interpolation and phase shifting
  • Perform path morphing by animating the `d` attribute of SVG paths

How it works

The skill implements self-contained SVG animations and interactive logic using SMIL 3.0 elements like `<animate>`, `<animateTransform>`, and `<animateMotion>`, controlling temporal logic and event handling through attributes.

Inputs & outputs

You give it
SVG elements and desired animation/interaction specifications
You get back
Self-contained, script-free SVG animations and interactive logic using SMIL 3.0

When to use smil-animation

  • Building interactive SVG icons
  • Creating ambient SVG backgrounds
  • Implementing script-free animations

About this skill

SMIL 3.0 Declarative Animation & Logic

Purpose

Expert implementation of SMIL 3.0 for self-contained, script-free animations and interactive event handling within SVGs. This skill enables complex multi-step logic and synchronization between independent elements that CSS cannot easily handle.

Invocation

  • Manual: /smil-animation [animate|transform|motion]
  • Automatic: Triggered when requests involve "SVG animation", "script-free interaction", or "SVG path morphing".
  • Arguments: Optional $0 to specify the primary technique (e.g., motion).

Prerequisites & Permissions

  • Standard workspace read tools (Read, Grep, Glob) for analyzing existing SVGs.
  • No special permissions required.

Workflow

  1. Define the Temporal Logic:
    • Choose the appropriate element:
      • <animate>: Linear or spline transitions for attributes (radius, color, opacity).
      • <animateTransform>: Spatial changes (rotation, scaling, translation). Use additive="sum" to stack effects.
      • <animateMotion>: Movement along complex bezier paths using <mpath>.
  2. Setup Interactive Event Handling:
    • Use begin and end attributes to listen to DOM events:
      • Click: begin="elementID.click"
      • Hover: begin="elementID.mouseenter" and end="elementID.mouseleave"
      • Chaining: begin="otherAnimation.end + 2s" for sequencing.
  3. Apply Optimization Techniques:
    • Spline Interpolation: Use calcMode="spline" and keySplines for custom easing curves.
    • Phase Shifting: Use prime number durations (e.g., 3.14s, 7.1s) to prevent repetition artifacts in ambient backgrounds.
    • Path Morphing: Animate the d attribute (ensure the number of path points remains consistent).

Examples

Example 1 — Interactive Icon Transformation

Command: User asks for a hamburger menu that turns into an 'X' on click. Implementation:

<path d="M2,5 L18,5">
  <animate attributeName="d" begin="menu.click" dur="0.2s" fill="freeze" to="M5,5 L15,15" />
</path>

Example 2 — Heartbeat Pulse

Command: "Create a heartbeat pulse for this circle." Implementation:

<circle r="10">
  <animate attributeName="r" values="10;12;10" dur="0.8s" repeatCount="indefinite" />
</circle>

Safety & Guardrails

  • Browser Compatibility: Note that while widely supported in browsers, some older tools or environments (like certain email clients) may not render SMIL.
  • Complexity: For extremely heavy animations, suggest performance testing as SMIL runs on the main layout thread of the SVG.
  • Refusal: Do not use SMIL for security-sensitive logic; it is for presentation and simple interaction only.

Notes for maintainers

  • SMIL 3.0 spec: https://www.w3.org/TR/SMIL3/
  • Ensure rotate="auto" is used with animateMotion to align objects to curves.
  • Use syncbase values for precise sequencing.

When not to use it

  • When security-sensitive logic is required
  • When targeting environments with poor SMIL compatibility (e.g., some older email clients)
  • When CSS or JavaScript is preferred for animation

Limitations

  • Browser compatibility may vary in older tools or environments
  • Performance testing is suggested for extremely heavy animations
  • SMIL is for presentation and simple interaction only, not security-sensitive logic

How it compares

It enables complex, script-free SVG animations and interactions directly within the SVG markup, offering a declarative approach that avoids external CSS or JavaScript overhead.

Compared to similar skills

smil-animation side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
smil-animation (this skill)06moNo flagsIntermediate
scroll-experience1016moNo flagsIntermediate
interaction-design155moNo flagsIntermediate
motion106moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

scroll-experience

davila7

Expert in building immersive scroll-driven experiences - parallax storytelling, scroll animations, interactive narratives, and cinematic web experiences. Like NY Times interactives, Apple product pages, and award-winning web experiences. Makes websites feel like experiences, not just pages. Use when: scroll animation, parallax, scroll storytelling, interactive story, cinematic website.

101142

interaction-design

wshobson

Design and implement microinteractions, motion design, transitions, and user feedback patterns. Use when adding polish to UI interactions, implementing loading states, or creating delightful user experiences.

1550

motion

onmax

Use when adding animations with Motion Vue (motion-v) - provides motion component API, gesture animations, scroll-linked effects, layout transitions, and composables for Vue 3/Nuxt

1044

frontend-enhancer

ailabs-393

This skill should be used when enhancing the visual design and aesthetics of Next.js web applications. It provides modern UI components, design patterns, color palettes, animations, and layout templates. Use this skill for tasks like improving styling, creating responsive designs, implementing modern UI patterns, adding animations, selecting color schemes, or building aesthetically pleasing frontend interfaces.

35

threejs-postprocessing

CloudAI-X

Three.js post-processing - EffectComposer, bloom, DOF, screen effects. Use when adding visual effects, color grading, blur, glow, or creating custom screen-space shaders.

17

animation-performance-retro

TheOrcDev

Optimize 8-bit animations for smooth performance. Apply when creating animated pixel art, game UI effects, or any retro-styled animations.

10

Search skills

Search the agent skills registry