Skip to content

Mermaid Diagram CLI

Create, edit and render Mermaid flowcharts and diagrams from the command line.

Stars
58,084
Licence
Apache-2.0
Files
1 file

What it does

Once installed, the agent can build Mermaid diagrams (flowcharts, sequence diagrams and similar) through a command-line tool called cli-anything-mermaid. It can create a project file, set or edit the diagram text, undo or redo changes, and render the result to SVG or PNG using the mermaid.ink online renderer. It can also generate shareable Mermaid Live Editor links.

Great for

  • Developers who want an AI agent to draw architecture or sequence diagrams for documentation
  • Anyone who needs diagrams without opening a graphical editor
  • Agents that need machine-readable (JSON) output from diagram tools

Skip it if

  • Sensitive or confidential diagrams, because rendering and sharing send the Mermaid source to the external mermaid.ink service (and Mermaid Live Editor links embed the diagram), which the skill does not describe as private
  • Offline or air-gapped environments, because rendering depends on the mermaid.ink cloud service
  • Users who need a full visual diagram editor rather than text-based Mermaid code

Try asking

  • “Create a flowchart of our login process and render it to SVG”
  • “Turn this sequence diagram source file into a PNG I can paste in a doc”
  • “Generate a view-only share link for the diagram we just made”
Step-by-step guide: how to use Mermaid Diagram CLIInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 1 original files, the Apache-2.0 licence and an attribution note.

    cli-anything-mermaid.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip cli-anything-mermaid.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip cli-anything-mermaid.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Use absolute file paths, as the skill recommends, so outputs are written where you expect.
  • Ask the agent to use --json output so results can be parsed reliably.
  • Avoid putting confidential names or data in diagram text, since it is sent to the external renderer.

What's inside

  • SKILL.md

Redistributed unmodified from HKUDS/CLI-Anything under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.