Loading...
Loading...
Generate clean, minimal technical SVG diagrams in a consistent Cloudflare-inspired style. Use when creating architecture diagrams, flow diagrams, or component diagrams for blog posts and documentation.
npx skill4agent add somtougeh/dotfiles technical-svg-diagramsreferences/svg-patterns.mdagent-browsercairosvg| Purpose | Color | Hex |
|---|---|---|
| Background | Light gray | #fafafa |
| Grid lines | Subtle gray | #e5e5e5 |
| Primary text | Dark gray | #333 |
| Secondary text | Medium gray | #666 |
| Muted text | Light gray | #999 |
| Borders/arrows | Gray | #ccc |
| Success/positive | Green | #27ae60 |
| Error/negative | Red | #e74c3c |
| Primary accent | Blue | #3498db |
| Warning/sandbox | Orange | #f39c12 |
| Process step | Purple | #9b59b6 |
monospace[ LIKE_THIS ]<pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse">
<path d="M 20 0 L 0 0 0 20" fill="none" stroke="#e5e5e5" stroke-width="0.5"/>
</pattern><marker id="arrow" markerWidth="10" markerHeight="10" refX="9" refY="3" orient="auto">
<path d="M0,0 L0,6 L9,3 z" fill="#ccc"/>
</marker><circle cx="X" cy="Y" r="35" fill="none" stroke="#ccc" stroke-width="2"/>
<circle cx="X" cy="Y" r="18" fill="#COLOR"/><rect x="X" y="Y" width="W" height="H" fill="none" stroke="#ccc" stroke-width="2"/><rect x="X" y="Y" width="W" height="H" fill="none" stroke="#f39c12" stroke-width="2" stroke-dasharray="5,3"/><rect x="X" y="Y" width="W" height="H" fill="none" stroke="#ccc" stroke-width="1"/>
<text x="CX" y="CY" font-family="monospace" font-size="11" fill="#666" text-anchor="middle">LABEL_NAME</text><svg viewBox="0 0 WIDTH HEIGHT" xmlns="http://www.w3.org/2000/svg">
<defs>
<!-- Grid pattern -->
<!-- Arrow markers as needed -->
</defs>
<!-- Background -->
<rect width="WIDTH" height="HEIGHT" fill="#fafafa"/>
<rect width="WIDTH" height="HEIGHT" fill="url(#grid)"/>
<!-- Title -->
<text x="40" y="40" font-family="monospace" font-size="14" fill="#333" font-weight="bold">TITLE</text>
<text x="X" y="40" font-family="monospace" font-size="12" fill="#888">[ TAG ]</text>
<!-- Content -->
<!-- Bottom note -->
<text x="CENTER" y="BOTTOM" font-family="monospace" font-size="10" fill="#999" text-anchor="middle">summary note</text>
</svg>diagram-before.svgdiagram-after.svgdiagram-flow.svgdiagram-architecture.svgagent-browserbun run scripts/create-html.ts --svg diagram.svg --output diagram.html--padding <px>--background <color>agent-browser set viewport 3840 2160
agent-browser open "file://$(pwd)/diagram.html"
agent-browser wait 1000
agent-browser screenshot --full diagram.png
agent-browser closerm diagram.htmluvx --from cairosvg cairosvg diagram.svg -o diagram.png --output-width 1600
uvx --with pillow python -c "from PIL import Image; Image.open('diagram.png').save('diagram.webp', 'WEBP', lossless=True)"
rm diagram.pnglossless=True# ImageMagick
convert -background none -density 150 diagram.svg diagram.webp
# librsvg + cwebp
rsvg-convert -w 1600 diagram.svg -o diagram.png && cwebp diagram.png -o diagram.webpbrew install cairoapt install libcairo2-dev