image-to-svg

image-to-svg is a skill for Claude Code, Codex from oaustegard/claude-skills. It costs 122 tokens per session (5,014 once invoked), scanned A, original, MIT.

An image-conversion tool that turns raster pictures, such as PNGs or photographs, into editable SVG vector artwork.

In plain words
What is it for?
It reproduces logos, icons, illustrations, paintings, and line art as SVG files by extracting colors and shapes from the source image.
Why use it?
It helps reuse images in formats that can scale without becoming blurry and can be edited as shapes.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It reproduces logos, icons, illustrations, paintings, and line art as SVG files by extracting colors and shapes from the source image.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/oaustegard/claude-skills/image-to-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 oaustegard/claude-skills --skill image-to-svg
Clone the repo
git clone --depth 1 https://github.com/oaustegard/claude-skills

Made for: Claude Code, Codex.

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 image-to-svg

README.md
[![agentmods](https://agentmods.dev/badge/skills/oaustegard/claude-skills/image-to-svg/github.svg)](https://agentmods.dev/skills/oaustegard/claude-skills/image-to-svg)
Your own site
<a href="https://agentmods.dev/skills/oaustegard/claude-skills/image-to-svg"><img src="https://agentmods.dev/badge/skills/oaustegard/claude-skills/image-to-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 image-to-svg

Your own site · 80×15
<a href="https://agentmods.dev/skills/oaustegard/claude-skills/image-to-svg"><img src="https://agentmods.dev/badge/skills/oaustegard/claude-skills/image-to-svg.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 122 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,014 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium analysis-evasion · line 1
    Suspicious Unicode normalization or mixed-script content
    Fix: Review the flagged content for security risks. Ensure no credentials, secrets, or sensitive data are exposed.
How audits are shown
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.00122 $0.05014
Opus 5 $0.00061 $0.02507
Sonnet 5 $0.00024 $0.01003
Haiku 4.5 $0.00012 $0.00501

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

Security

Grade A, and why

image-to-svg scanned grade A with 1 finding 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 12d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/lines.py, scripts/pipeline.py), 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

subprocess.run(['rsvg-convert', '-w', '1400', 'output.svg', '-o', 'output.png'])
image-to-svg/SKILL.md · 358 lines

How it starts

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

Image to SVG Reproduction

Convert raster images into faithful SVG reproductions using data-driven color quantization and contour extraction. Never hand-draw shapes from visual interpretation — always extract geometry from the actual pixel data.

Core Principle

Trust the data, not your imagination. Claude's visual interpretation of images is unreliable for precise color matching, shape positioning, and spatial relationships. Every shape, color, and position must come from computational analysis of the source pixels.

Quick Start

pip install opencv-python-headless scikit-image scipy scikit-learn --break-system-packages -q
apt-get install -y librsvg2-bin -qq
import sys
sys.path.insert(0, '/mnt/skills/user/image-to-svg/scripts')
from pipeline import image_to_svg

svg, flow = image_to_svg("source.jpg", mode="painting")

with open("output.svg", "w") as f:
    f.write(svg)

flow.summary()  # timing + status per step

Mode Selection

Look at the image and ask: "Does this have smooth gradients or hard edges?" Gradients → higher K. Hard edges → lower K.

Mode K Best for Dark shape gating
"graphic" 28 Logos, icons, Kandinsky, flat design Loose (keeps thin lines)
"illustration" 40 Comics, editorial, digital art Moderate
"painting" 56 Renaissance, Impressionist, watercolor Standard
"photo" 64 Portraits, landscapes, still life Standard (prevents woodcut artifacts)

Default is "painting". When uncertain, start there.

Tradeoffs: K=64 produces ~2300 shapes (~1.2MB SVG) vs K=28's ~1000 shapes (~550KB). Processing time roughly doubles with K. The quality gain in tonal gradation is substantial for photos but wasted on graphic art.

All mode defaults (K, dark_lum, compactness_min, etc.) can be overridden via **kwargs:

svg, flow = image_to_svg("source.jpg", mode="graphic", K=12, min_area=20)

Compositional Pipeline (Line Art)

Read the full file on GitHub · 358 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 12d ago First seen · 358 lines · 122 tokens per session scan A df386cbab388

Subscribe to this mod's changes

image-to-svg is a skill published in the GitHub repository oaustegard/claude-skills (148 stars, last pushed yesterday), licensed MIT. It adds 122 tokens to every session and 5,014 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

superdesign

Design or redesign frontend UI, presentations, and graphics on the Superdesign canvas with a choice of leading AI models. Use whenever the user wants to design a page, feature, flow, slide deck, or brand-new product; improve or reproduce existing UI; compare design results across top models; explore visual variants…

superdesigndev/superdesign-skill · 115 tokens

high-quality-slides

A method for creating polished presentation slides, including HTML slide decks, with research, a clear story, chosen visuals, and fixed layouts.

andyqiu847-ai/high-quality-slides · 165 tokens

data-craft

Generate beautiful themed HTML data displays. Six visual idioms with matched voices, rendered as self-contained HTML files. Use when the user asks for charts, dashboards, reports, tearsheets, briefings, data visualizations, or any data-driven document.

yixiliu617/data-craft · 54 tokens

tufte-viz

Design, build, and critique data visualizations using Edward Tufte's principles. Use this skill WHENEVER the work involves a chart, graph, plot, dashboard, table, diagram, or any visual display of data, even if the user does not name Tufte or "data viz" explicitly. Triggers include: (1) Building a new chart, graph…

HugoVeltorai/publicskills · 234 tokens

figma-to-code

Generate production-ready React/Next.js code from Figma designs. Instructs proper Figma MCP tool usage, component reuse strategies, and variant mapping. CRITICAL: ALWAYS use this skill when user provides a Figma link or mentions implementing/redesigning from Figma design. Never attempt manual implementation without…

scoobynko/claude-code-design-skills · 73 tokens

wp-ux-design

WordPress UX and design enforcement — Core Web Vitals, mobile-first layout, typography, color systems, navigation, page builder patterns, image optimization, form UX, loading and error states, admin UX, and performance checklists with concrete CSS/HTML/PHP examples.

xonack/wp-ux-design-claude-skill · 59 tokens