Introduction¶
When handling requests in an Agent such as “draw an illustration”, “create a 16:9 cover”, or “export PNG”, there are usually two paths: call a multimodal image-generation API, or have the model directly write HTML/CSS. The former tends to make mistakes with numbers and text in posters and infographics; the latter can produce pages, but when specifying aspect ratios, high-resolution bitmaps, or GIF/MP4 animations, you often have to assemble your own rendering pipeline.
Below is a community Skill from SkillHub called SVG Studio (page name “SVG Drawing Workbench - Smart Image Generation”, coordinates @user_dfcfbf47/svg-studio). Its idea is: let the model write SVG source code to express graphics, delivering an editable .svg by default; when the user explicitly asks, scripts export PNG or animated images. This covers illustrations, charts, posters, and more without relying on multimodal image generation.
What Is This¶
SVG Studio is a community-sourced (community) Agent Skill categorized under design-media, currently at version 1.3.0, published by user_dfcfbf47. The SkillHub tags indicate no API Key required (requires_api_key=false).
One-sentence positioning: use “writing SVG” instead of “calling image-generation models” to produce vector graphics of any aspect ratio and complexity, exportable as SVG / PNG / GIF / APNG / WebP / MP4, or embedded into HTML.
Official entry points:
- API page: https://api.skillhub.cn/user_dfcfbf47/svg-studio
- SkillHub page: https://www.skillhub.cn/skills/user_dfcfbf47/svg-studio
Core Features¶
The following capabilities align with the official introduction and the SKILL.md inside the Skill package, and can be understood in four parts:
-
Write complex SVGs based on instructions
Covers charts, illustrations, flowcharts, architecture diagrams, posters, infographics, icons, covers, OG images, etc. The Skill includesreferences/svg-techniques.md(layout and pitfalls),references/handdrawn-infographic.md(hand-drawn/product-style recipes), andreferences/animation.md(animation approaches). -
SVG → PNG high-resolution rendering
scripts/render.py: Chrome headless preferred (gradients, filters, and CJK font fidelity), automatically falling back to resvg → cairosvg when no browser is available. Supports--scale(DPR, default 2),--width/--height, and--bg(transparent or solid color). -
Multi-frame / template SVG → animated images
scripts/animate.py: template mode (a__T__placeholder inside the SVG represents 0→1 progress) or frame-directory mode, compositing GIF / APNG / WebP / MP4 (MP4 requires local ffmpeg). -
Any aspect ratio and DPR
UseviewBoxto set proportions (e.g., 16:9, 1:1, 9:16, OG 1200×630, etc.); pixel clarity is controlled via--scaleor--widthat render time.
Delivery convention (explicitly stated in the Skill): deliver only .svg by default; do not proactively convert to PNG unless the user requests a bitmap. Export the corresponding format only when animated image files are needed.
Installation & Activation¶
The installation method given on the SkillHub page is: have the Agent follow the SkillHub installation instructions to install @user_dfcfbf47/svg-studio.
If the skillhub CLI is already on your machine, you can install the Skill into the current Agent’s skills directory (must use --dir; otherwise it defaults to ./skills/ and may not be recognized):
command -v skillhub && skillhub --version
If the CLI is not installed, follow the official documentation to run the full installation (the example below is the recommended command from the docs):
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
Install this Skill (replace <skills 目录> with the path corresponding to your environment):
skillhub install svg-studio --namespace user_dfcfbf47 --dir <skills 目录>
Common Agent skills directories (excerpted from the SkillHub installation documentation):
| Environment | Path |
|---|---|
| Cursor | ~/.cursor/skills/ |
| Claude Code | ~/.claude/skills/ |
| Codex | ~/.codex/skills/ or .agents/skills/ under the project |
| workbuddy | ~/.workbuddy/skills/ |
After installation, describing a drawing request in conversation will trigger the Skill; whether it auto-loads depends on each client’s Skill discovery rules.
Typical Usage¶
The workflow in SKILL.md is: choose aspect ratio → write and save SVG → (optionally) render PNG → (optionally) composite animation → self-check → deliver.
1. Set viewBox and write SVG¶
Common ratio examples (from the Skill docs): square 0 0 1000 1000, 16:9 0 0 1280 720, 9:16 0 0 720 1280, OG 0 0 1200 630. It is recommended to start with xmlns and a system font family; for non-transparent cases, draw a full-coverage background rect first to avoid a transparent background when exporting bitmaps.
2. Render only when the user asks for PNG¶
Run inside the Skill directory (paths depend on your installation location; the workbuddy example in SKILL.md uses its managed Python, other environments can use python3):
python3 scripts/render.py poster.svg
python3 scripts/render.py poster.svg -o poster.png --scale 2 --bg "#0f172a"
python3 scripts/render.py chart.svg --width 1600
python3 scripts/render.py chart.svg --html chart.html
3. When animated image files are needed¶
For in-browser playback, an animated SVG (SMIL or CSS @keyframes) is sufficient without transcoding. For standalone animated files, use animate.py:
# Template mode: anim.svg contains a __T__ placeholder
python3 scripts/animate.py --template anim.svg --frames 30 -o out.gif --fps 15 --bg "#0f172a"
# Frame directory: frame-000.svg ...
python3 scripts/animate.py --frames-dir ./frames -o out.webp --fps 24 --loop 0
The output file extension determines the format: .gif, .webp, .apng/.png, .mp4.
4. Self-check¶
When the user wants a bitmap, use file out.png to confirm dimensions, and open the image with the client’s Read tool to check for text truncation, background, and animation. When delivering only SVG, the Skill recommends rendering a temporary PNG for visual inspection and then deleting it, without treating temporary files as deliverables.
Use Cases & Notes¶
Suitable for:
- The user says “generate an image / draw something / make an illustration / poster / infographic / chart / flowchart / architecture diagram / icon / cover / OG image” and specifies ratios like 16:9, 1:1, 9:16 or requests PNG.
- Creating GIFs, loading animations, short looping demos, and can accept a vector style.
- When the model has no multimodal image generation, or requires that text and numbers match the source code (SVG is plain text and can be verified word by word).
Limitations & pitfalls (from the Skill documentation; recommended to be aware of before use):
- Photo-realistic imagery and real people/landscapes are not suitable for SVG; such requests should go through multimodal image generation.
- Hand-drawn / heavy filters (such as
feTurbulence+feDisplacementMap) may be distorted via the resvg path; the documentation requires that such images must use Chrome for rendering. - Without Chrome, resvg/cairosvg is used; cairosvg depends on the system libcairo and will fall back further if not installed.
- On first run, the script creates an isolated
.venv/inside the Skill directory and installs Pillow, cairosvg, etc. Do not package or distribute.venv. - The SkillHub page shows a rating of 100000 and 2282 downloads (statistics are subject to the platform).
Conclusion¶
SVG Studio splits “image generation” into model-controllable SVG authoring and optional render.py / animate.py export, giving text models a path for illustrations, charts, and animations that does not depend on diffusion-based image generation. For installation or updates, refer to the SkillHub official addresses above and @user_dfcfbf47/svg-studio.