Svg Export logo

Svg Export

Community
ChanMeng666
svg-export

Finalize a rendered SVG for production: run SVGO optimization, add accessibility metadata (<title>, <desc>), verify viewBox sanity, and copy to a user-specified destination. Use when the user says "ship it", "optimize and export", "make it production-ready", "minify this SVG", "copy the final SVG to <path>", "export <slug> for the website", or asks for the byte-size after optimization. Always run after /svg-animate produces a passing verdict and before the SVG is committed or shared.

Overview

PublisherChanMeng666
Repositorysvg-animation-studio
Skill namesvg-export
Stars
3
Forks
0
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by ChanMeng666 on GitHub. Read the source before you install it.

Installation

Install the Svg Export AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/ChanMeng666/svg-animation-studio/tree/main/.claude/skills/svg-export
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ChanMeng666/svg-animation-studio.git /tmp/svg-animation-studio
mkdir -p .claude/skills
cp -r /tmp/svg-animation-studio/.claude/skills/svg-export .claude/skills/svg-export
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Svg Export in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Svg Export on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Svg Export is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

You finalize an SVG that's already been rendered and visually verified. You're the last step before the file leaves the repo. Your job: make it small, accessible, and well-named.

What was passed in

$ARGUMENTS[0] is the preset slug (must exist in output/). $ARGUMENTS[1..N] may include --out=<path> to copy the final file somewhere outside output/.

If no slug, return:

usage: /svg-export <preset-slug> [--out=<path>]

If output/<slug>.svg doesn't exist, ask the caller to run /svg-animate (or node lib/render-cli.js <slug>) first.

Step 1 — Verify the source

Read output/<slug>.svg. Sanity-check:

  • Contains <svg opening tag and </svg> closing tag.
  • Has a viewBox attribute (otherwise scaling is broken).
  • Has a <title> element (presets emit it via composeSVG's title opt). If missing, fall back to the slug. Log a warning — presets should set title and desc explicitly.

If structural checks fail, return:

EXPORT FAILED: Source: output/.svg Re-render via /svg-animate or node lib/render-cli.js <slug>.

Step 2 — Optimize with SVGO

The repo ships an animation-safe svgo.config.mjs at its root, which SVGO picks up automatically. Just point at input + output:

bash
npx svgo -i output/<slug>.svg -o output/<slug>.min.svg

DO NOT pass --enable/--disable (those are SVGO v2; this repo runs v3, where they're config-only) and DO NOT run stock preset-default. Stock SVGO is built for static icons and silently breaks animations: it collapses the group nesting that carries animation transforms (relocating transform-box: fill-box origins — e.g. a blink's eyes jump to the corner), minifies <style> (dropping @keyframes), and converts shape elements that are animation targets. The repo config disables exactly those plugins while still compressing path data. See docs/embedding-animated-svg.md.

Capture before/after sizes. Typical savings: 35–40% on an animated preset. If savings are < 5%, the file is already small — that's fine, not a problem.

Always re-verify the minified file animates (Step 3) — a size win that broke the motion is a regression, not an optimization.

Step 3 — Verify minified file still composes AND animates

Parse check — the file must contain <svg and </svg> and be non-empty. For an animated source, ALSO confirm the motion survived:

  • The <style> block and every @keyframes still present (grep count matches the source). A 0 here means SVGO dropped the animation.
  • If the source has transform-box, it's still there.
  • Ideally, render the minified file as an <img> (see svg-verify's <img> step) and confirm it still moves — not just that it parses.

If any check fails, abort and keep the unminified version as authoritative:

WARNING: SVGO altered the animation (e.g. @keyframes dropped / blink detached).
Keeping output/<slug>.svg as final. Check svgo.config.mjs is being applied.

Step 4 — Copy to destination (if requested)

If --out=<path> was passed:

  • If the path ends in .svg, copy output/<slug>.min.svg there.
  • If the path is a directory, copy as <dir>/<slug>.svg (NOT .min.svg — users want a clean filename at the destination).
  • Create parent directories if missing.
  • Refuse to overwrite without explicit acknowledgement (--force).

Step 5 — Report

EXPORTED: <slug>
Source:     output/<slug>.svg (<bytes> bytes)
Minified:   output/<slug>.min.svg (<bytes> bytes, <pct>% saved)
Destination: <path or "stayed in output/">
Accessibility: title="..." desc="..."
ViewBox:    "<viewBox>"

Keep it under 8 lines. The caller will share this with the user.

Anti-patterns

  • ❌ Stripping viewBox, <title>, or <desc>. They're tiny and critical for accessibility / responsive scaling. SVGO's default removeViewBox preset would strip viewBox; we disable it.
  • ❌ Overwriting an existing destination file without a --force flag. Users have lost work to that.
  • ❌ Running SVGO on a file we're not sure about. Always do Step 1's structural check first.
  • ❌ Forgetting to copy to --out= when the user asked. The whole point of this skill is shipping the file to where they want it.

Frequently asked questions

What does the Svg Export AI skill do?

Finalize a rendered SVG for production: run SVGO optimization, add accessibility metadata (<title>, <desc>), verify viewBox sanity, and copy to a user-specified destination. Use when the user says "ship it", "optimize and export", "make it production-ready", "minify this SVG", "copy the final SVG to <path>", "export <slug> for the website", or asks for the byte-size after optimization. Always run after /svg-animate produces a passing verdict and before the SVG is committed or shared.

Why use Svg Export on TypingMind?

Because you install it once and use it with any model. Svg Export is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Svg Export in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ChanMeng666/svg-animation-studio/tree/main/.claude/skills/svg-export. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Svg Export?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Svg Export?

As many as you like. As long as a model supports skills, you can use Svg Export with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Svg Export AI skill free?

Yes. It is published on GitHub by ChanMeng666 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇