diagram-to-image_skill

This skill converts Mermaid diagrams and Markdown tables into PNG or SVG images, enabling visual exports for platforms that don't support rich formatting.
  • Python

61

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill sugarforever/01coder-agent-skills --skill diagram-to-image

  • SKILL.md6.0 KB

Overview

This skill converts Mermaid diagrams and Markdown tables into PNG or SVG images for platforms that don't support rich formatting, like X/Twitter. It produces descriptive filenames and selects an appropriate output location based on project or conversation context. The skill reports the final path, why it was chosen, and basic file info after conversion.

How this skill works

It inspects the diagram or table content to generate a concise, kebab-case filename and then determines the best output directory by checking user-specified paths, common image/asset folders, document context, and conversation cues. For Mermaid it writes a temporary .mmd file and runs mermaid-cli (mmdc) to export PNG or SVG; for Markdown tables it renders a temporary file and uses a Python script to produce a PNG. It handles directory creation, name collisions, and missing-dependency guidance.

When to use it

  • You have a Mermaid diagram that must be shared as an image (PNG/SVG).
  • You need a Markdown table exported as an image for social platforms.
  • Creating visuals for X/Twitter or other services without rich formatting.
  • User explicitly asks: "convert to image", "export as PNG", or "make this an image".

Best practices

  • Provide a short description or topic when pasting a diagram to get a better filename.
  • Specify an output path if you want the image placed in a particular folder.
  • Prefer PNG for raster needs (social platforms) and SVG for scalable graphics.
  • Confirm creation of new directories before the skill writes files.
  • Keep diagrams concise so exported images render cleanly at common sizes.

Example use cases

  • Convert an authentication flowchart to ./images/login-flow.png when an images/ folder exists.
  • Export an AI-agent flow for an article as ai-agent-flow.png in the document folder.
  • Render a comparison Markdown table as model-comparison.png for a social post.
  • Save a user-specified path like ~/Desktop/my-chart.png when explicitly provided.
  • Generate an entity-relationship.svg from an erDiagram for documentation.

FAQ

The skill will offer to create the directory (or create it if you allow) and then save the image there.

Which format should I choose, PNG or SVG?

Choose PNG for pixel-perfect, widely supported images (social media) and SVG when you need scalable vector graphics.

What happens if the filename already exists?

The skill appends a numeric suffix (for example -2) to avoid overwriting existing files.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational