mermaid-tools
An agent skill by daymade, from daymade/claude-code-skills. Tags: conversion, diagrams, documentation, markdown, visual-art.
What it does
Extracts Mermaid diagrams from markdown files and generates high-quality PNG images using bundled scripts. Activates when working with Mermaid diagrams, converting diagrams to PNG, extracting diagrams from markdown, or processing markdown files with embedded Mermaid code.
Install
With the skills CLI, which installs into Claude Code, Codex, Cursor and other agents:
npx skills add daymade/claude-code-skills --skill mermaid-tools
Or copy the skill folder into Claude Code's skills directory by hand (~/.claude/skills for every project, or .claude/skills inside one):
git clone --depth 1 https://github.com/daymade/claude-code-skills
cp -r claude-code-skills/daymade-docs/mermaid-tools ~/.claude/skills/mermaid-tools
Safety box score
Grade C, moderate risk: 37 of 100 risk points, rated 2026-10-19. The grade rates what the skill and its scripts can reach on the machine of whoever installs it, across eight categories from shell execution to secrets access. How the score works.
This skill extracts Mermaid code blocks from markdown and renders PNGs using bundled shell/Python scripts plus Chrome/Puppeteer. The main risks are the setup instructions that require system-wide installs and sudo, and the browser automation config that runs Chrome with sandboxing disabled.
| Category | Level | Why |
|---|---|---|
| Code & shell execution | 2 (moderate) | The skill ships and runs native scripts (`scripts/extract-and-generate.sh`, `scripts/extract_diagrams.py`) and shells out to `python3` and `mmdc` to process files. |
| Network access | 2 (moderate) | The setup docs instruct network fetches and installs, including `wget -q -O - https://dl.google.com/linux/linux_signing_key.pub` and `npm install -g @mermaid-js/mermaid-cli`. |
| Filesystem reach | 2 (moderate) | The scripts create output directories and write numbered `.mmd` and `.png` files (`mkdir -p "$OUTPUT_DIR"`, `open(mmd_file, 'w', ...)`), and the setup docs modify a system apt sources file. |
| Secrets & credentials | 0 (none) | There is no code or documentation that reads or asks for tokens, passwords, keychains, browser sessions, or other secrets. |
| Privilege & persistence | 3 (high) | The setup instructions require admin-level changes such as `sudo apt-key add -`, `sudo tee /etc/apt/sources.list.d/google-chrome.list`, and `sudo apt install ...`, plus a global npm install. |
| Instruction hijack surface | 0 (none) | The skill does not instruct the agent to ignore rules, hide behavior, follow remote instructions, or otherwise alter prompting; the files are plain local tooling docs and scripts. |
| Irreversible actions | 0 (none) | It automates local diagram conversion only; it does not deploy, publish, send messages, pay, book, or delete external resources. |
| Transparency | 0 (none) | All shipped files are readable text (shell, Python, JSON, markdown); there are no binaries, encoded blobs, or downloaded installers in the skill itself. |
Before installing
- Read `references/setup_and_troubleshooting.md` and decide whether you accept the documented `sudo apt` and system-repo changes.
- Inspect `scripts/puppeteer-config.json` for the disabled sandbox flags before running it on untrusted markdown.
- Test `scripts/extract-and-generate.sh` in a scratch repo first and confirm it only writes to the intended output directory.
- Make sure `mmdc`, `google-chrome-stable`, and `python3` are already installed so you do not have to follow the setup commands blindly.
Rated 2026-10-19 by an automated review of 5 files from the skill's repository.
Source
- Repository
- daymade/claude-code-skills (all skills from this repository)
- Path
- daymade-docs/mermaid-tools/SKILL.md
- Branch
- main
- Updated
- 2026-09-20
Related skills
- crypto-protocol-diagram — Extracts protocol message flow from source code, RFCs, academic papers, pseudocode, informal prose, ProVerif (.pv).
- technical-writing — Layered technical-writing standard: Diátaxis structure, Google developer style sentences, STE instruction rules, Global English syntax.
- doc-to-markdown — Converts DOCX/PDF/PPTX to high-quality Markdown with automatic post-processing.
- excalidraw-use — Place existing images onto an Excalidraw whiteboard, turn a slide deck into clean per-slide images first.
- pdf-creator — Convert markdown files to professional PDF documents with proper Chinese font support, theme system, and visual self-check.
- diagram — Turn an English description (or mermaid source) into a diagram triplet: the source, an editable .excalidraw file you can open on excalidraw.com.