png2svg
Reconstruct a geometric PNG (logo, icon, monogram) as a clean native SVG with exact geometry and gradients, using an analyse -> measure -> model -> check ->…
Skill by iannuttall
Chalk Labs
Need help deploying png2svg?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/iannuttall-png2svg
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/png2svg
What's inside
- Skill name
png2svg- Description
- Reconstruct a geometric PNG (logo, icon, monogram) as a clean native SVG with exact geometry and gradients, using an analyse -> measure -> model -> check -> residuals iteration loop scored by perceptual metrics. Use when asked to vectorise, trace or convert a PNG/WebP logo to SVG, recreate a logo's geometry, rebuild a logo as editable vector, or produce colour variants of a reconstructed logo. Not for photos, textures, or organic artwork.
- License
- MIT
- Compatibility
- Requires uv and network access on first run. uv provisions Python 3.12+ and caches the script dependencies automatically.
- Metadata
- author: iannuttall · version: 0.2.0
- Instructions
- 351 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (21)
- SKILL.md
- conventions.md · references/
- examples.md · references/
- model.md · references/
- build_template.py · scripts/
- measure_template.py · scripts/
- __init__.py · scripts/png2svg/
- analyse.py · scripts/png2svg/
- cli.py · scripts/png2svg/
- compare.py · scripts/png2svg/
- curves.py · scripts/png2svg/
- geom.py · scripts/png2svg/
- measure.py · scripts/png2svg/
- model.py · scripts/png2svg/
- outline.py · scripts/png2svg/
- paint.py · scripts/png2svg/
- primitives.py · scripts/png2svg/
- render.py · scripts/png2svg/
- residuals.py · scripts/png2svg/
- svggen.py · scripts/png2svg/
- png2svg_cli.py · scripts/
SKILL.md (first lines)
# png2svg: geometry-first PNG -> SVG reconstruction You are the editor in this loop. Deterministic commands measure, render, and score; you make the design judgments; shape decomposition, layering, paint model; and iterate until the metrics converge. This is reconstruction, not tracing. The output is the handful of shapes a designer would have drawn, not a contour fitted to pixels. The visual loop is deliberate. `check` renders the current SVG and writes a 50/50 reference/render `overlay.png`; inspect that together with the edge and colour residuals, change the decomposition or constraints, and repeat. The library makes measurements reproducible. It cannot decide whether a meeting of two edges is a fillet, an overlap, or a coincidence. ## 0. Triage; is this image suitable? **Look at the image first.** Proceed when it reads as designer-built geometry: flat or gradient fills, crisp edges, shapes decomposable into lines, arcs and Béziers. Rule of thumb: **if it could have been built in Figma from shapes and gradients, it is recoverable.** There are three outcomes, and picking the right one up front decides which targets you are aiming at: | the source | aim for | judge by | |---|---|---| | flat or gradient fills, crisp edges | an exact reconstruction | IoU, edge distance, ΔE | | a render with grain, brushed metal, shadows, glow | **structure and shading; drop the texture** | IoU and `deltaE_lowfreq` | | photos, painterly art, anything under ~100px | decline |; | The middle case is the one to get right rather than refuse. A textured source disagrees with **itself** by more than any vector can match, so per-pixel ΔE will report failure for a reconstruction that reads correctly at a glance. `check` reports `texture_std`; around 1-2 for clean vector art, 10+ for a textured render. When it is high, reconstruct the structure and the large-scale shading, drop grain and fine detail deliberately, say so in the model notes, and judge by the low-frequency figures. For the third case say so plainly and suggest `vtracer` or `potrace`, which do the different job of fitting contours to pixels. ## 1. Setup Everything runs through one entry point: `scripts/png2svg_cli.py` in this skill's directory. On first run uv builds a cached environment from the script's own dependency block; there is nothing to install. Check for uv before starting: ```bash command -v uv uv --version ``` If uv is missing, stop and ask the user to install it from https://docs.astral.sh/uv/getting-started/installation/. Do not require a separate Python installation; uv provisions a compatible interpreter. Below, `$SKILL` stands for this skill's directory (the folder containing this file). **Substitute the literal path**: each command may run in a fresh shell, so an assignment made in one will not survive to the next. ```bash uv run --no-project "$SKILL/scripts/png2svg_cli.py" init INPUT.png --project work/<name> uv run --no-project "$SKILL/scripts/png2svg_cli.py" analyse work/<name> ``` `init` copies the source and estimates the background from a 2px border median. `analyse` writes `analysis/features.json` and `analysis/overlay.png`: components with bboxes, boundary segments (line / arc / corner / curve with fitted params and errors), and a paint probe per component: - `flat`; solid colour - `linear`; gradient, dominant direction given - `angular`; conic sweep, centre given - `complex`; layered or occluded paint; your judgment needed Each component also carries a `structure` block, and `analyse` prints its `hint` line if it found anything: repeated spacings between parallel edges, exact 180°/mirror symmetry with its centre, and corners far tighter than the shape's usual radius. **Read that line first**; it is the fastest available answer to the route question in §2, and every number in it is one you would otherwise derive by hand. A repeated spacing or a tight corner means overlapping primitives; a symmetry centre means parameters you can delete rather than fit. It reports only what it measured. Silence means nothing was found, not that the mark is simple. **Treat every coordinate in features.json as a ±0.5px proposal**, and read `overlay.png` next to the source before deciding anything. `analyse` is fooled by watermarks and compression artefacts. ## 2. Decompose; and pick your route Decide the structure before measuring anything: how many overlapping primitives, what occludes what, where the paint seams are. A hard colour boundary **inside** one silhouette usually means two overlapping shapes; the seam is the top shape's edge, not a gradient stop, and it often passes through an arc centre. Getting this right is most of the work; everything downstream is arithmetic. This decision also picks which of **two routes** you measure with. They are siblings, not a default and a fallback; reaching for the wrong one costs you either a pile of nodes or an afternoon: | what you are looking at | route | § | |---|---|---| | one silhouette whose boundary **is** the design; a letterform, a swoosh, an organic blob | **trace it** | 3a | | overlapping filled primitives; bars, rects, discs, capsules; where the union's boundary is a *by-product* of where they landed | **fit the primitives** | 3b | `analyse`'s `structure` hint checks the first two of these for you. Three tells, any one of which is enough: - **A corner that is an intersection, not a fillet.** Walk the silhouette and ask of each corner: did a designer round this, or did it appear because two shapes crossed? Sharp spikes and tiny radii next to generous ones mean
From iannuttall/skills, MIT.
Signals
- Stars
- 7
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Jul 30, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 0.2.0
- License
- MIT
- Repository
- github.com/iannuttall/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from iannuttall
- 0.567score
AGENTS.md · iannuttall/seo
iannuttall
AGENTS.md from iannuttall/seo: 106 lines covering Code patterns, Report truth, Real data never goes in the repo, Tests and CI and more.
TemplateAFreshness: A★ 593Codex +5 - 0.461score
find-skills
iannuttall
Find and install agent skills with `npx playbooks find skill` and `npx playbooks add skill`.
SkillDFreshness: D★ 7Claude Code +9 - 0.461score
get-url
iannuttall
Fetch any URL as markdown with `npx playbooks get`.
SkillDFreshness: D★ 7Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get png2svg running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
png2svg skill. Agent Mart. https://agentmart.dev/skills/iannuttall-png2svg (last updated 2026-10-24)