preview-svg

preview-svg is a skill for Claude Code from veelenga/preview-skills. It costs 107 tokens per session (3,260 once invoked), scanned A, original, MIT.

A browser preview tool for animated SVG files. SVG is a text-based image format, and the preview can show animations made with SVG animation tags, CSS, or inline JavaScript.

In plain words
What is it for?
Use it to prototype or inspect animated diagrams, icons, logos, path-drawing effects, shape morphs, and motion along paths, with an optional code view and export.
Why use it?
It makes animated graphics easier to inspect and explain than reading the SVG code alone. Controls such as play, pause, restart, timeline seeking, zoom, and pan help with review.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Good fit Use it to prototype or inspect animated diagrams, icons, logos, path-drawing effects, shape morphs, and motion along paths, with an optional code view and export.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/veelenga/preview-skills/preview-svg
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add veelenga/preview-skills --skill preview-svg
Clone the repo
git clone --depth 1 https://github.com/veelenga/preview-skills

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for preview-svg

README.md
[![agentmods](https://agentmods.dev/badge/skills/veelenga/preview-skills/preview-svg/github.svg)](https://agentmods.dev/skills/veelenga/preview-skills/preview-svg)
Your own site
<a href="https://agentmods.dev/skills/veelenga/preview-skills/preview-svg"><img src="https://agentmods.dev/badge/skills/veelenga/preview-skills/preview-svg/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for preview-svg

Your own site · 80×15
<a href="https://agentmods.dev/skills/veelenga/preview-skills/preview-svg"><img src="https://agentmods.dev/badge/skills/veelenga/preview-skills/preview-svg.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 107 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,260 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00107 $0.03260
Opus 5 $0.00053 $0.01630
Sonnet 5 $0.00021 $0.00652
Haiku 4.5 $0.00011 $0.00326

Measured 11d ago against content hash 11317ff86f96, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

preview-svg scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

The scan reads SKILL.md. This mod also ships 8 executable files (config.sh, lib/browser-utils.sh, lib/content-utils.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/preview-svg/SKILL.md · 330 lines

How it starts

The opening of the file, as written. The whole thing — 330 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Preview SVG Animation Skill

Render any animated SVG in a controllable browser preview — built for explaining hard concepts visually. Supports SMIL (<animate>, <animateTransform>, <animateMotion>), CSS keyframes/transitions inside <style>, and inline JS.

Agent Usage

When the user asks to visualize or explain something with an animated SVG, write the SVG content and pipe it to the script. The renderer parses the SVG, wires up animation controls, and automatically opens the result in the browser — do NOT open the file manually.

# Pipe SVG content
cat heartbeat.svg | ./run.sh

# Or from a file
./run.sh diagram.svg

# Skip browser, just emit path (useful for batch generation)
./run.sh diagram.svg --no-browser

Usage

# Preview an SVG file
/preview-svg heartbeat.svg

# Pipe SVG content (preferred for temporary explainers)
cat animation.svg | /preview-svg
echo '<svg ...>...</svg>' | /preview-svg

Built-in Controls

  • Play / Pause — pauses all SMIL via pauseAnimations() and CSS via animation-play-state.
  • RestartsetCurrentTime(0) for SMIL + reapplies CSS animations.
  • Timeline scrub — drag the slider to seek; live updates while playing (SMIL only; CSS-only animations don't expose seeking).
  • Zoom & Pan — mouse wheel to zoom (0.2x–20x), drag to pan via viewBox manipulation. Reset button restores original framing.
  • Code view — toggle to inspect the source SVG.
  • Export SVG — download the current SVG (preserves any runtime changes).

When to Use

Activate when the user wants to:

  • Explain a concept visually (gradient descent, request flow, data structures)
  • Animate an icon or logo (path-draw, morph, hamburger↔X)
  • Show motion along a path (<animateMotion> + <mpath>)
  • Prototype loading spinners, progress rings, ambient backgrounds
  • Build a self-contained, script-free interactive SVG (SMIL begin="el.click")

For interactive D3 / JS-driven visualizations, prefer preview-d3. For 3D / WebGL scenes, use preview-threejs. For flowcharts / sequence diagrams, use preview-mermaid.

Read the full file on GitHub · 330 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 330 lines · 107 tokens per session scan A 11317ff86f96

Subscribe to this mod's changes

preview-svg is a skill published in the GitHub repository veelenga/preview-skills (8 stars, last pushed 1mo ago), licensed MIT. It adds 107 tokens to every session and 3,260 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

brandkit

Premium brand-kit image generation skill for creating high-end brand-guidelines boards, logo systems, identity decks, and visual-world presentations. Trained for minimalist, cinematic, editorial, dark-tech, luxury, cultural, security, gaming, developer-tool, and consumer-app brand systems. Optimized for intentional…

firstsun-dev/skills · 89 tokens

canvas-design

Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.

x-cmd/skill · 59 tokens

visual-asset-design

A guide for turning character, scene, and prop ideas into prompts for generating consistent reference images. It covers layouts, camera views, visual identity, and continuity across image variations.

agentscope-ai/QwenPaw · 113 tokens

muapi-logo-creator

Engineer professional-grade brand logos using geometric primitives and negative space — generates minimalist, scalable vector-style marks via muapi.ai.

SamurAIGPT/Generative-Media-Skills · 29 tokens

muapi-photo-pack-generator

Generate a pack of professional or aesthetic photos from a single reference image while preserving the exact identity of the person.

SamurAIGPT/Generative-Media-Skills · 28 tokens

drawio-diagram

A tool for creating editable Draw.io diagrams, a file format used for flowcharts, system diagrams, and model illustrations.

xstongxue/best-skills · 104 tokens