raster-to-svg

raster-to-svg is a skill for Claude Code from bestdeejay-design/agent-skills. It costs 244 tokens per session (2,323 once invoked), scanned A, original, MIT.

A converter that traces a PNG raster image, made from pixels, into an SVG vector image, made from shapes that can be resized without becoming blurry.

In plain words
What is it for?
Use it to turn PNG logos, icons, diagrams, and documentation artwork into SVG files for websites or README files. It is not intended for accurately tracing complex photographs.
Why use it?
It helps reuse logos, icons, and simple diagrams at different sizes without losing sharpness. It also offers contour and mosaic-style results and can work without installing extra Python packages.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter.

Good fit Use it to turn PNG logos, icons, diagrams, and documentation artwork into SVG files for websites or README files. It is not intended for accurately tracing complex photographs.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/bestdeejay-design/agent-skills/raster-to-svg"><img src="https://agentmods.dev/badge/skills/bestdeejay-design/agent-skills/raster-to-svg.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 244 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,323 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.00244 $0.02323
Opus 5 $0.00122 $0.01162
Sonnet 5 $0.00049 $0.00465
Haiku 4.5 $0.00024 $0.00232

Measured today against content hash 895ac6112f3c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

raster-to-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 today.

The scan reads SKILL.md. This mod also ships 8 executable files (evals/gen_fixtures.py, evals/qa_pixels.py, examples/web/app.js, …), 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/raster-to-svg/SKILL.md · 121 lines

How it starts

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

Raster To SVG

Превращает растровую PNG-картинку в масштабируемый векторный SVG.

Загружай этот скилл когда нужно перевести растровое изображение в вектор: для логотипов, иконок, схем, README-ассетов или любого PNG, который должен масштабироваться без потери качества.

🎯 When to use

Use this skill when:

  • Есть PNG-файл (логотип, иконка, схема) и нужен SVG для вставки в веб/документацию
  • Просят «векторизировать картинку», «png в svg», «trace image», «convert png to svg»
  • Нужна детерминированная трассировка без внешних зависимостей (только Python 3)
  • Хочется стилизованный результат: контурную обводку или мозаику из примитивов

Do NOT use when:

  • Исходник уже в векторе (SVG/PDF/EPS) — трассировка растра не нужна
  • Нужна фотореалистичная векторизация сложных фото — лучше специализированный редактор
  • Формат не PNG — CLI принимает только PNG на входе (в веб-интерфейсе JPG/JPEG/WEBP конвертируются автоматически в браузере)

📦 Files

  • SKILL.md — этот файл
  • scripts/raster_to_svg.py — конвертер PNG → SVG (Python 3 stdlib, без pip)
  • scripts/raster_to_svg_server.py — локальный веб-сервер с UI (стандартный http.server)
  • scripts/svg_export.py — конвертеры SVG → DXF R12 / EPS (слои по цвету заливки)
  • scripts/raster_to_svg_mcp.py — опциональный MCP-сервер для AI-агентов
  • examples/web/ — фронтенд (index.html + style.css + app.js): drag & drop (PNG/JPG/WEBP с локальной перекодировкой), sticky-превью с лупой ×4 на результате, 12 быстрых пресетов (плоский стиль, минимал, лайн-арт, иконка, логотип, фото-плоский, фото, дуотон, винтаж, чб, мозаика-постер, мозаика-круги) с меткой «ручные настройки» при ручном изменении, скрытие неактуальных групп настроек движка (vtracer/native/мозаика), подготовка фото (сглаживание + ступени цвета в браузере), прогресс-бар, код SVG, скачивание

🧰 Usage

# Базово: PNG → SVG с белым фоном:
python3 skills/raster-to-svg/scripts/raster_to_svg.py -i logo.png -o logo.svg --bg white

# Меньше цветов (нативный contour):
python3 raster_to_svg.py -i logo.png -o logo.svg --colors 4

# Мозаичный постер из примитивов:
python3 raster_to_svg.py -i icon.png -o icon.svg -m mosaic --cell 8 --shape auto

# Пайплайн stdin → stdout:
cat icon.png | python3 raster_to_svg.py -i - -o -

# Машиночитаемый отчёт:
python3 raster_to_svg.py -i logo.png -o logo.svg --json

# Принудительно нативный движок (без vtracer):
python3 raster_to_svg.py -i logo.png -o logo.svg --engine native

Read the full file on GitHub · 121 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. today Changed · +8 lines 895ac6112f3c
  2. 12d ago First seen · 113 lines · 244 tokens per session scan A 7b7cbe9ea74c

Subscribe to this mod's changes

raster-to-svg is a skill published in the GitHub repository bestdeejay-design/agent-skills (6 stars, last pushed today), licensed MIT. It adds 244 tokens to every session and 2,323 once invoked, about $0.0012 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.