Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

autofigure

Skill by ZhihaoAIRobotic

Converts raster figure images into editable DrawIO files. It is for users who want to edit a figure in draw.io instead of working from a flat PNG or JPEG.

  • Score 55
  • 157 stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install autofigure

Built from the published package, never by AI.

git clone --depth 1 https://github.com/ZhihaoAIRobotic/ClawPhD /tmp/ClawPhD && mkdir -p ~/.claude/skills && cp -r /tmp/ClawPhD/clawphd/skills/autofigure ~/.claude/skills/autofigure

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install autofigure in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

AutoFigure converts a raster figure, such as a PNG or JPEG, into an editable .drawio file. Text, arrows and shapes become real mxCell elements, and icons are embedded as transparent PNGs. The skill runs four steps in order: SAM3 segmentation on fal.ai to detect regions, RMBG-2.0 background removal to crop icons, a multimodal LLM that rebuilds the figure as DrawIO XML, and a final step that swaps placeholders for the icons.

It suits users who want to edit a figure in draw.io rather than work from a flat image. The source says output quality depends on the vision model used. It needs a FAL API key and PyTorch with torchvision and transformers installed. The RMBG-2.0 model downloads from HuggingFace on first use.

Written from the project's SKILL.md and checked against it.

What it can do

  • segment_figureDetects icons and visual elements with SAM3 and produces samed.png and boxlib.json.
  • crop_remove_bgCrops detected regions from the original figure and removes backgrounds with RMBG-2.0.
  • generate_drawio_templateUses a multimodal LLM to rebuild the figure as DrawIO XML with gray placeholder cells.
  • replace_icons_drawioEmbeds transparent icons into placeholder cells and writes final.drawio.
  • generate_svg_templateLegacy tool that generates an SVG template when SVG output is wanted.
  • replace_icons_svgLegacy tool that embeds icons into the SVG template.

What you need

  • FAL API key, set as FAL_KEY or fal_api_key in config.json
  • PyTorch with torch, torchvision and transformers installed
  • A multimodal LLM for DrawIO generation
  • HuggingFace access to download the RMBG-2.0 model

Try asking

  • Convert figures/method.png into an editable DrawIO file
  • Turn this architecture diagram into a draw.io file with its icons
  • Convert this figure to DrawIO and refine the layout with 2 iterations

Good to know

  • DrawIO output quality depends on the VLM model used.
  • SAM3 segmentation requires a FAL API key.
  • The RMBG-2.0 model is downloaded from HuggingFace on first use.
  • For complex figures, the source suggests optimize_iterations of 1 or 2.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: clawphd/skills/autofigure/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to autofigure

All alternatives →
paperbananadwzhu-pku
94

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.

AAA Skill 7.7k
technical-wireframe-info-layoutMengTo
94

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.

AAA Skill 8.5k
spline-3d-integrationsickn33
94

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.

AAA Skill 50k
code-slice-heroheygen-com
94

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.

AAA Skill 92k
patentfigdavila7
94

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.

AAA Skill 34k
framed-tech-dark-border-gradientMengTo
94

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.

AAA Skill 8.5k

Compare with paperbanana, technical-wireframe-info-layout or spline-3d-integration

autofigure: common questions

What does AutoFigure produce?

It produces final.drawio, where text, arrows and shapes are editable mxCell elements and icons are embedded as transparent PNGs. The file opens in draw.io.

Which API key does AutoFigure need?

SAM3 segmentation runs on fal.ai and needs a FAL API key. It can be set as fal_api_key in config.json or as the FAL_KEY environment variable.

Can AutoFigure output SVG instead of DrawIO?

Yes. The source lists legacy SVG tools, generate_svg_template and replace_icons_svg, for SVG output.

How do I install autofigure?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is autofigure free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is autofigure safe to use?

It scores 55 of 100. Grades: maintenance D, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to autofigure?

Similar skills: paperbanana, technical-wireframe-info-layout, spline-3d-integration, code-slice-hero.

autofigure Install

Add to stack

Loading.