raster-logo-svg
Skill46 starsChanged 47 days agoMITView on GitHub
Turn a raster logo (PNG, JPG, WebP) into a pixel-identical, self-contained SVG by base64 embedding. Use when an .svg logo is needed without a vector source, or a redrawn SVG does not match the original.
- Installs packages
In this repository3 other files it gives its agents.
- releaseSkill
- designer-skillSkill
- ux-designerSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Create an SVG wrapper around an existing raster logo so the output is pixel-identical to the source.
- Very specific: line 19
Default to embed when a .webp, .png, or .jpg logo already exists and the user wants .svg.
- Very specific: line 38
Use the SVG for plugin manifests, favicons, npm package icons, or anywhere a .svg path is required.
- Distinctive: line 59
Cons: Not true vector; upscaling very large may soften (same as the raster).
- Distinctive: line 65
Use potrace/ImageMagick trace for full-color wordmarks.
- Very specific: line 71
Only for local tooling that resolves sibling files (not GitHub README <img src="logo.svg">):
- Very specific: line 77
Prefer base64 embed for portable .svg files.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
raster-logo-svg
Create an SVG wrapper around an existing raster logo so the output is pixel-identical to the source. This is not true vectorization.
Choose the approach
| Need | Do |
| Match an existing raster logo exactly | Embed (this skill) |
| Crisp at any size, editable paths | Export from Figma/Illustrator, or commission true vector |
| Quick monochrome outline | Potrace (usually wrong for brand logos with color/gold/type) |
| Hand-redrawn paths | Only if no raster exists and user accepts approximation |
Default to embed when a .webp, .png, or .jpg logo already exists and the user wants .svg.
Workflow
- Source of truth — keep the raster (e.g.
docs/logo.webp). Do not delete it. - Generate SVG — run the script from repo root or skill directory:
python3 skills/raster-logo-svg/scripts/embed-logo.py docs/logo.webp -o docs/logo.svg -l "project-name"Requires ImageMagick (magick identify) for dimensions. Install: brew install imagemagick.
- README — prefer the raster in GitHub README for reliable rendering:
<img src="docs/logo.webp" alt="project-name" width="580" />Use the SVG for plugin manifests, favicons, npm package icons, or anywhere a .svg path is required.
- Verify — open the SVG locally; it must look identical to the raster. Do not commit temp traces (
icon-traced.svg, potrace output, failed hand-drawn attempts).
Output format
The script produces:
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 W H" role="img" aria-label="…">
<image width="W" height="H" href="data:image/webp;base64,…"/>
</svg>viewBoxmatches source pixel dimensions frommagick identify.- MIME:
image/webp,image/png, orimage/jpegfrom file extension. - Self-contained: no external
href="logo.webp"(breaks when SVG is copied alone).
Tradeoffs (tell the user when relevant)
- Pros: Perfect visual match, fast, no design source needed.
- Cons: Not true vector; upscaling very large may soften (same as the raster).
- Size: SVG file ≈ base64(raster) + ~200 bytes overhead (~33% larger than raw binary).
Do not
- Hand-draw paths to “recreate” a brand logo when the raster exists — results rarely match.
- Use potrace/ImageMagick trace for full-color wordmarks.
- Replace the canonical raster with only SVG unless the user explicitly drops the raster.
- Embed secrets or sensitive images in public repos without user confirmation.
Optional: external-reference SVG
Only for local tooling that resolves sibling files (not GitHub README <img src="logo.svg">):
<image href="logo.webp" width="1163" height="350"/>Prefer base64 embed for portable .svg files.
Example (designer-skill)
python3 skills/raster-logo-svg/scripts/embed-logo.py \
docs/designer-skill-mcp-logo.webp \
-o docs/designer-skill-mcp-logo.svg \
-l "designer-skill-mcp"README uses designer-skill-mcp-logo.webp; plugin/icon paths can use the .svg.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

