figure-spec
Skill by wanshuiyin
Generates deterministic, editable SVG architecture, workflow, and pipeline diagrams from a structured JSON FigureSpec. It is for researchers and writers who need publication-ready vector figures.
Install figure-spec
Built from the published package, never by AI.
git clone --depth 1 https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep /tmp/Auto-claude-code-research-in-sleep && mkdir -p ~/.claude/skills && cp -r /tmp/Auto-claude-code-research-in-sleep/skills/figure-spec ~/.claude/skills/figure-specRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep /tmp/Auto-claude-code-research-in-sleep && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/Auto-claude-code-research-in-sleep/skills/figure-spec ~/.gemini/antigravity-cli/skills/figure-specAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
figure-spec is a skill that turns a structured JSON description (FigureSpec) into an SVG diagram. It covers architecture diagrams, workflow and pipeline figures, audit cascades, and system topology. A bundled Python renderer validates the spec, checks its schema, and writes the SVG. The source says the same spec always produces the same SVG for a fixed renderer version and fonts, and that the SVG is plain text that can be edited by hand.
The skill is for users who need precise, editable diagrams for formal papers or documentation. The source says it should be preferred over AI illustration for formal architecture and workflow figures. It states that the tool runs fully locally with no network access or API keys. Data plots and natural illustrations are routed to other skills.
Written from the project's SKILL.md and checked against it.
What it can do
- Render FigureSpec to SVGRuns the renderer's render command to turn a JSON spec into an editable SVG file.
- Validate specsChecks a JSON spec and reports errors such as missing fields, duplicate IDs, or invalid hex colors.
- Show the schemaPrints the authoritative FigureSpec schema through the renderer's schema command.
- Multiple node shapesSupports rect, rounded, circle, ellipse, and diamond nodes with shape-aware edge clipping.
- Edges and groupsDraws solid, dashed, or dotted edges with optional labels and curves, and groups nodes into background regions.
- CJK label supportHandles multi-line labels with Chinese character width estimation.
- Optional PDF exportShows how to convert the SVG to PDF with rsvg-convert for LaTeX inclusion.
- Optional cross-model reviewDescribes an optional review loop that scores clarity, readability, and semantic accuracy of a rendered figure.
What you need
- Python 3
- Bash shell
- rsvg-convert (only for PDF export)
Try asking
- Draw a layered architecture diagram for my system as an editable SVG.
- Validate this FigureSpec JSON before rendering it.
- Make a left-to-right pipeline figure with a feedback loop for my paper.
Good to know
- Not for data plots such as bar, line, or scatter charts; the source points to another skill.
- Not for natural or qualitative illustrations; the source points to another skill.
- Determinism holds for a fixed renderer version and fonts.
- The PDF step depends on rsvg-convert being installed.
Security check
B- Allowed to use Write, Edit without limitsIn
SKILL.md
Checked automatically: skills/figure-spec/SKILL.md, skills/figure-spec/scripts/figure_renderer.py. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
Allowed tools: Bash(*)ReadWriteEditmcp__codex__codexmcp__antigravity__antigravitymcp__antigravity__antigravity-replymcp__grok__grokmcp__grok__grok-replymcp__claude-review__reviewmcp__claude-review__review_replymcp__claude-review__review_startmcp__claude-review__review_reply_startmcp__claude-review__review_status
-
SKILL.md12 KB -
scripts/figure_renderer.py29 KB
Alternatives to figure-spec
All alternatives →PaperBanana generates publication-quality academic diagrams from a paper's methodology text and figure caption. It is aimed at researchers preparing figures for venues such as NeurIPS, ICML, and ACL.
Creates a monochrome technical wireframe design system for dark diagnostic interfaces. It covers layout, typography, info labels, widgets and an exploded wireframe centerpiece. It is for designers and developers building teardown, systems dashboard or specification-style screens.
Guides an AI assistant through embedding interactive Spline.design 3D scenes in web projects. It covers vanilla, React, Next.js, Vue and iframe setups, for developers adding 3D to websites.
Code Slice Hero is a HyperFrames headline block. A tiled surface flips cell by cell to reveal a second headline behind the first, at 1920×1080 and 8 seconds.
Generates patent-office-compliant figures and converts drawings through the PatentFig AI API. Built for patent filers who need USPTO or EPO line art, CAD-ready vectors, or filing-ready TIFF, PDF, or PNG files.
Creates a framed dark technical design system for AI assistants, using border-gradient shells, asymmetrical grid panels, and mono labels. Suited to premium, instrument-like interfaces that need visible boundaries. Published by MengTo.
Compare with paperbanana, technical-wireframe-info-layout or spline-3d-integration
figure-spec: common questions
Is the output the same every time?
The source says identical FigureSpec JSON produces identical SVG output for a fixed renderer version and fonts.
Does it need an API key or internet access?
No. The source says it runs fully local, with no network and no API keys.
Can I edit the generated figure?
Yes. The source says the SVG is plain text and can be edited by hand or programmatically, though it advises changing the JSON spec and re-rendering instead.
How do I install figure-spec?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is figure-spec free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is figure-spec safe to use?
It scores 93 of 100. Grades: maintenance A, licence A, quality A. Security check: grade B (allowed to use write, edit without limits). Review the code before you install. How grades work.
What are alternatives to figure-spec?
Similar skills: paperbanana, technical-wireframe-info-layout, spline-3d-integration, code-slice-hero.
