Skip to main content
rule CX Codex

asr-keyword-glow — Claude Code rule for word-level speech highlighting

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.

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/asr-keyword-glow.md
Open on GitHub

What asr-keyword-glow does

Each word carries start and end timestamps. Every frame computes an attack–sustain–release envelope: zero before start, a linear ramp to peak, hold at one, then decay to a rest level of 0.25 with a faint lingering glow. The envelope feeds both the textShadow blur radius and the word scale, so a stronger blur and bigger scale mean a louder visual accent.

The rule lays out the HTML with one span per word, CSS for the scene and phrase, and a GSAP timeline with a single driver object spanning the whole scene duration. The brand word gets a .brand class, wider letter spacing, and a longer emphasis window.

Variations include a sine pulse during sustain, a color lerp at the peak, a karaoke mode that dims inactive words, and a 3D pop-out via translateZ. The rule recommends karaoke for short 5–10 word phrases because the subtle default reads too faint on video. You need GSAP 3.14.2 from a CDN or the timeline will not build.

What it helps with

  • highlight a word exactly when the voiceover hits it
  • pace emphasis in a promo clip without real audio
  • keep a breadcrumb of recently spoken words via rest glow
  • build karaoke-style highlighting for a short phrase

Example prompts for the agent

  • Build a scene with the asr-keyword-glow rule: six words, brand word last
  • Highlight the words in this HTML using my voiceover timings, karaoke variant
  • Set up the GSAP timeline with the envelope for this phrase and add the peak color shift

How to install asr-keyword-glow

Manually: put the files in place

.claude/rules/asr-keyword-glow.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 asr-keyword-glow

How do I install asr-keyword-glow in Claude Code?

Place the rule file at .claude/rules/asr-keyword-glow.md. The agent can then apply it when generating scenes with word highlighting.

What does asr-keyword-glow do?

It creates a spoken-word effect: a word brightens and grows at its timestamp, then falls back to a subtle rest glow. Timings can be hardcoded, so no real ASR output is required.

What does the rule depend on?

GSAP 3.14.2 loaded from a CDN. Without it, the timeline the rule describes will not run.

Similar IDE rules

All IDE rules for Frontend and UI →

From the same set101

The whole set →
3d-text-depth-layers The 3d-text-depth-layers rule builds dimensional typography from offset DOM layers. Use it for large hero headings with stacked depth or animated extrusion. CX Codex +1 ★ 78,316repo stars ai-video-gen ai-video-gen turns a written prompt into a video clip through HeyGen, fal.ai, Kling or Gemini, choosing a gateway for the job. CX Codex +1 ★ 78,316repo stars dynamic-content-sequencing dynamic-content-sequencing computes scene display timing from text length and pacing parameters. It gives longer paragraphs more screen presence without hardcoding frame counts. CX Codex +1 ★ 78,316repo stars 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 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 svg-icon-enrichment 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. 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

Project sponsors

Companies that keep this analytics open