diagram-to-image

diagram-to-image is a skill for Claude Code from sugarforever/01coder-agent-skills. It costs 56 tokens per session (1,920 once invoked), scanned A, original, MIT.

A converter that turns Mermaid diagrams and Markdown tables into PNG image files. Mermaid is a text format for describing diagrams, while PNG is a common image format supported by most websites and social platforms.

In plain words
What is it for?
Use it to export flowcharts, other Mermaid diagrams, and Markdown tables as images, including visuals prepared for platforms such as X or Twitter.
Why use it?
It helps when a platform cannot display Mermaid or rich Markdown tables directly. The result can be shared as a normal image.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is ls -d ./images ./assets ./img ./static ./public/images ./assets/images 2>/dev/null | head -1.

Part of the 01coder-skills plugin — 23 skills shipped together

not rated 139repo 18d ago A scan Socket: warnSnyk: warnSkillSpector: warn 56 tokens original MIT

Good fit Use it to export flowcharts, other Mermaid diagrams, and Markdown tables as images, including visuals prepared for platforms such as X or Twitter.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/sugarforever/01coder-agent-skills
agentmods
npx agentmods add skills/sugarforever/01coder-agent-skills/diagram-to-image

Made for: Claude Code.

Or install 01coder-skills, the plugin that ships this one along with the rest of its 23 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for diagram-to-image

README.md
[![agentmods](https://agentmods.dev/badge/skills/sugarforever/01coder-agent-skills/diagram-to-image/github.svg)](https://agentmods.dev/skills/sugarforever/01coder-agent-skills/diagram-to-image)
Your own site
<a href="https://agentmods.dev/skills/sugarforever/01coder-agent-skills/diagram-to-image"><img src="https://agentmods.dev/badge/skills/sugarforever/01coder-agent-skills/diagram-to-image/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for diagram-to-image

Your own site · 80×15
<a href="https://agentmods.dev/skills/sugarforever/01coder-agent-skills/diagram-to-image"><img src="https://agentmods.dev/badge/skills/sugarforever/01coder-agent-skills/diagram-to-image.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,920 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket warn 18 Sept 2026
  • Snyk warn 18 Sept 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 115
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00056 $0.01920
Opus 5.5 $0.00022 $0.00768
Sonnet 5.5 $0.00011 $0.00384
Haiku 4.5 $0.00006 $0.00192

Measured 2mo ago against content hash 8c0291ecc683, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

diagram-to-image scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/diagram-to-image.mjs, scripts/table_to_image.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/diagram-to-image/SKILL.md · 236 lines

How it starts

The opening of the file, as written. The whole thing — 236 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Diagram to Image

Convert Mermaid diagrams and Markdown tables to PNG images via the mermaid-red API (diagramless.xyz). Produces high-quality, styled output with custom themes — no heavy local dependencies needed.

When to Use

Use this skill when:

  • User has a Mermaid diagram that needs to be converted to an image
  • User has a Markdown table that needs to be converted to an image
  • User is writing content for X/Twitter and needs visual exports
  • User asks to "convert to image", "export as PNG", "make this an image", or similar

Prerequisites

The bundled script uses Node.js built-in fetch (Node 18+). No npm install needed.

# The render script is bundled with this skill:
SKILL_DIR=~/.claude/skills/diagram-to-image/scripts
ls $SKILL_DIR/diagram-to-image.mjs

Smart Output Location

IMPORTANT: Determine the best output location based on context. Follow this decision tree:

1. User Specifies Path

If user explicitly mentions a path or filename, use that.

2. Project Context Detection

Check for common image/asset directories in the current project:

# Check for existing image directories (in order of preference)
ls -d ./images ./assets ./img ./static ./public/images ./assets/images 2>/dev/null | head -1

Use the first existing directory found. Common patterns:

  • ./images/ - General projects
  • ./assets/ - Web projects
  • ./assets/images/ - Structured web projects
  • ./public/images/ - Next.js, React projects
  • ./static/ - Hugo, other static site generators
  • ./img/ - Short form convention

3. Article/Document Context

If user is writing an article or document:

  • Look for the document's directory
  • Create images/ subdirectory if appropriate
  • Name the image based on the document name + descriptor

4. Conversation Context

Analyze the conversation to determine:

  • What the diagram represents → Use for filename (e.g., auth-flow.png, user-journey.png)
  • Related file being discussed → Place image near that file
  • Topic being discussed → Use for naming

Read the full file on GitHub · 236 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 236 lines · 56 tokens per session scan A 8c0291ecc683

Subscribe to this mod's changes

diagram-to-image is a skill published in the GitHub repository sugarforever/01coder-agent-skills (139 stars, last pushed 18d ago), licensed MIT. It adds 56 tokens to every session and 1,920 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

diagram-to-image compared with skills from other repositories

diagram-to-image next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
diagram-to-imagesugarforever/01coder-agent-skillsSkill13918d agoMITA56Claude Code
imagegenopenai/codexSkill133kyesterdayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill99kyesterdayApache-2.0A19Claude Code
local-ai-agentsmicrosoft/ai-agents-for-beginnersSkill79k4d agoMITA200Claude Code, Codex
systematic-debuggingobra/superpowersSkill313k3d agoMITA21Claude Code
next-cache-components-adoptionvercel/next.jsSkill143kyesterdayMITA95Claude Code
next-partial-prefetching-adoptionvercel/next.jsSkill143kyesterdayMITA103Claude Code