Create SVG images and convert them to PNG without external graphics libraries. Use when you need to generate custom illustrations, avatars, or artwork (e.g., "draw a dragon", "create an avatar", "make a logo") or convert SVG files to PNG format. This skill works by writing SVG text directly (no PIL/ImageMagick required) and uses system rsvg-convert for PNG conversion.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install svg-draw或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install svg-draw⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/svg-draw/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: svg-draw description: Create SVG images and convert them to PNG without external graphics libraries. Use when you need to generate custom illustrations, avatars, or artwork (e.g., "draw a dragon", "create an avatar", "make a logo") or convert SVG files to PNG format. This skill works by writing SVG text directly (no PIL/ImageMagick required) and uses system rsvg-convert for PNG conversion. ---
Generate vector graphics and raster images using pure SVG code and system conversion tools.
For new drawings:
assets/ as starting points)For existing SVG files:
- Check assets/ for existing templates (dragon, lobster, etc.) - Or write SVG from scratch
```bash # Example: Write SVG to file write('/path/to/output.svg', svg_content) ```
```bash /root/.openclaw/workspace/skills/svg-draw/scripts/svg_to_png.sh input.svg output.png 400 400 ```
Always include:
tag with xmlns="http://www.w3.org/2000/svg" and viewBox (prevents transparent backgrounds)width and height attributesCommon SVG elements:
, , , , with text-anchor="middle" for centeringopacity attribute for transparency effectsExample character structure:
Background → Body → Head → Face features → Limbs → Accessories → Name
Use the bundled conversion script:
/root/.openclaw/workspace/skills/svg-draw/scripts/svg_to_png.sh <input.svg> <output.png> [width] [height]
Parameters:
input.svg: Source SVG file pathoutput.png: Destination PNG file pathwidth: Output width in pixels (default: 400)height: Output height in pixels (default: 400)Example:
/root/.openclaw/workspace/skills/svg-draw/scripts/svg_to_png.sh dragon.svg dragon.png 512 512
assets/dragon_template.svg)Blue dragon with:
Customization ideas:
fill="#4a90d9" for different body colorsfill="#ffcc00"assets/lobster_template.svg)Red lobster with:
Customization ideas:
fill="#e85d04" (darker red) or fill="#f48c06" (orange)Friendly/Cute:
#4a90d9 (blue), #f48c06 (orange)#ffcc00 (yellow), #ff6b6b (coral)#1a1a2e (dark blue)Professional:
Change colors: Find fill="#" or stroke="#" attributes and replace the hex codes
Resize elements: Adjust rx, ry (ellipses) or width, height (rectangles)
Reposition: Modify cx, cy (circles/ellipses) or x, y (rectangles)
Add text:
<text x="200" y="370" font-family="Arial, sans-serif" font-size="24" font-weight="bold" fill="#ffcc00" text-anchor="middle">Your Text</text>
svg_to_png.sh - Convert SVG to PNG using rsvg-convertdragon_template.svg - Friendly blue dragonlobster_template.svg - Cute red lobsterSVG not rendering:
tag with xmlns attributeviewBox is set correctlyConversion fails:
rsvg-convert is installed: which rsvg-convertImage looks wrong:
安装 SVG Draw 后,可以对 AI 说这些话来触发它
Help me get started with SVG Draw
Explains what SVG Draw does, walks through the setup, and runs a quick demo based on your current project
Use SVG Draw to create SVG images and convert them to PNG without external graphics...
Invokes SVG Draw with the right parameters and returns the result directly in the conversation
What can I do with SVG Draw in my design & creative workflow?
Lists the top use cases for SVG Draw, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/svg-draw/ 目录(个人级,所有项目可用),或 .claude/skills/svg-draw/(项目级)。重启 AI 客户端后,用 /svg-draw 主动调用,或让 AI 根据上下文自动发现并使用。
SVG Draw 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
SVG Draw 可免费安装使用。请查阅仓库了解许可证信息。
Create SVG images and convert them to PNG without external graphics libraries. Use when you need to generate custom illustrations, avatars, or artwork (e.g., "draw a dragon", "create an avatar", "make a logo") or convert SVG files to PNG format. This skill works by writing SVG text directly (no PIL/ImageMagick required) and uses system rsvg-convert for PNG conversion.
SVG Draw 属于「Design & Creative」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my design & creative tasks using SVG Draw
Identifies repetitive steps in your workflow and sets up SVG Draw to handle them automatically