Skip to main content
rule CX Codex

svg-icon-enrichment — Claude Code rule for animating SVG icon internals

svg-icon-enrichment — a rule that teaches Claude Code and Codex to animate the inner parts of SVG icons: clock hands, scissor blades, pulsing dots, flowing dashes. For micro-animation without swapping the icons themselves.

AGPL-3.0 ★ 78,316 updated 2026-10-24

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/rules/svg-icon-enrichment.md
Open on GitHub

What svg-icon-enrichment does

The rule pushes the agent to see an SVG icon as a set of moving parts, not a flat image. Each meaningful child element gets its own GSAP-driven motion.

Four motion patterns are defined: rotation for clock hands and gears, oscillation for scissor blades and toggles, pulse for recording dots and hearts, and dash flow along strokes for data streams. Everything runs inside a paused GSAP timeline so frame seeking stays deterministic.

It is a sibling to svg-path-draw, which handles outline drawing. This rule covers internal parts, ideally once the outline is already drawn. GSAP loaded from a CDN and constants like MIN_REVOLUTIONS, SEC_REVOLUTIONS, PULSE_CYCLES are required for the timeline to build.

What it helps with

  • Spin clock hands and gears with rotation
  • Make scissor blades and wings oscillate
  • Add a pulse to a recording dot or heart
  • Move dashes along a stroke like a data stream

Example prompts for the agent

  • Add a clock icon to the scene: minute hand does 2 revolutions, second hand 8 over 4 seconds
  • Create a pulsing recording dot: 3 cycles over the scene, ring fades in counter-phase
  • Animate a data stream: dashes flow left to right via strokeDashoffset

How to install svg-icon-enrichment

Manually: put the files in place

.claude/rules/svg-icon-enrichment.md

The paths frontmatter field limits the files

Step by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use

Questions about svg-icon-enrichment

How do I install svg-icon-enrichment in Claude Code?

Add the file .claude/rules/svg-icon-enrichment.md to the project root. Claude Code picks the rule up on the next run.

What does svg-icon-enrichment do?

It teaches the agent to animate internal SVG icon parts with rotation, oscillation, pulse and dash flow. All motion is built on a GSAP timeline.

How is it different from svg-path-draw?

svg-path-draw animates the outline of an icon, while this rule handles its internal elements. Ideally enrichment runs after the outline has finished drawing.

Similar IDE rules

All IDE rules for Frontend and UI →

From the same set101

The whole set →
website-to-video website-to-video captures a website with headless Chrome and turns its visuals into a HyperFrames video. Use it for a site tour, showcase, or social clip. CX Codex +1 ★ 78,316repo stars asr-keyword-glow asr-keyword-glow — a rule that makes words light up and scale up as they get "spoken", driven by per-word timestamps. For promo clips and narrated videos where you need to pace the emphasis. CX Codex +1 ★ 78,316repo stars press-release-spring press-release-spring calculates tactile button animation with linear scaling on tap, GSAP spring bounce on release, and glowing visual cues. Useful when polishing UI interactions. CX Codex +1 ★ 78,316repo stars card-morph-anchor The card-morph-anchor rule describes a container that changes shape as one scene gives way to another. Use it when the morph itself should carry the transition. CX Codex +1 ★ 78,316repo stars physics-press-reaction physics-press-reaction synchronizes cursor and element compression in GSAP using shared spring scaling. Controls approach trajectory, simultaneous press down, and bouncy release. CX Codex +1 ★ 78,316repo stars camera-cursor-tracking The camera-cursor-tracking rule keeps a growing text element in view with a two-stage virtual camera. Use it for search fields, animated URLs, and similar scenes. CX Codex +1 ★ 78,316repo stars seedance-2-5 Skill for generating 4–30 second video clips with ByteDance Seedance 2.5 via fal.ai, Volcengine Ark, Runway, or ComfyUI. CX Codex +1 ★ 78,316repo stars orbit-3d-entry orbit-3d-entry sets up a GSAP animation where items flip in from 3D coordinates and transition into a continuous elliptical orbit around a center point. CX Codex +1 ★ 78,316repo stars

Project sponsors

Companies that keep this analytics open