Agent skill

CLI Anything Mermaid

by HKUDS in HKUDS/CLI-Anything

Command-line interface for Mermaid Live Editor - Create, edit, and render Mermaid diagrams via stateful project files and mermaid.ink renderer URLs.

Apache-2.0Auto-check passedDevelopment

Install CLI Anything Mermaid

skills CLI
$ npx skills add HKUDS/CLI-Anything --skill cli-anything-mermaid -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install HKUDS/CLI-Anything cli-anything-mermaid --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/HKUDS/CLI-Anything.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cli-anything-mermaid .claude/skills/cli-anything-mermaid && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cli-anything-mermaid
GitHub stars
52k
Token cost
~1.1k tokens
SKILL.md length
334 words
Files
1
Skills in repo
78
Repo updated
First seen
Licence
Apache-2.0

At a glance

Command-line interface for Mermaid Live Editor - Create, edit, and render Mermaid diagrams via stateful project files and mermaid.ink renderer URLs.

  • Works in 5 steps: Always use --json flag for parseable… → Check return codes - 0 for success,… → Parse stderr for error messages on failure → …
  • Tasks that involve Diagrams
  • SKILL.md covers Installation, Usage, Command Groups and Examples, plus 5 more sections
  • Calls pip

What it does

CLI Anything Mermaid is an agent skill from HKUDS/CLI-Anything. Command-line interface for Mermaid Live Editor - Create, edit, and render Mermaid diagrams via stateful project files and mermaid.ink renderer URLs. Designed for AI agents and power users who need to generate flowcharts, sequence diagrams, and other visualizations without a GUI.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Diagrams. It works with Mermaid. The repository describes itself as: "CLI-Anything: Making ALL Software Agent-Native" -- CLI-Hub: https://clianything.cc/. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Diagrams

Example prompts

  • “/cli-anything-mermaid”

Requirements

  • Python 3

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Always use --json flag for parseable output
  2. Check return codes - 0 for success, non-zero for errors
  3. Parse stderr for error messages on failure
  4. Use absolute paths for all file operations
  5. Verify outputs exist after render operations

What it can do on your machine

Read from SKILL.md and the folder at commit 34f5195. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pip, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

CLI Anything Mermaid loads about 1.1k tokens when it runs. Until then it costs about 75 tokens; SKILL.md has 334 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~75
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from HKUDS/CLI-Anything at commit 34f5195, republished under its Apache-2.0 licence (© HKUDS). 334 words, ~1,138 tokens.

Download SKILL.mdSave it as .claude/skills/cli-anything-mermaid/SKILL.md (or your agent's skills folder).
name
cli-anything-mermaid
description
Command-line interface for Mermaid Live Editor - Create, edit, and render Mermaid diagrams via stateful project files and mermaid.ink renderer URLs. Designed for AI agents and power users who need to generate flowcharts, sequence diagrams, and other visualizations without a GUI.

cli-anything-mermaid

Create, edit, and render Mermaid diagrams via stateful project files and the mermaid.ink renderer. Designed for AI agents and power users who need to generate flowcharts, sequence diagrams, and other visualizations without a GUI.

Installation

This CLI is installed as part of the cli-anything-mermaid package:

bash
pip install cli-anything-mermaid

Prerequisites:

  • Python 3.10+
  • No external software required (rendering uses mermaid.ink cloud service)

Usage

Basic Commands
bash
# Show help
cli-anything-mermaid --help

# Start interactive REPL mode
cli-anything-mermaid

# Create a new project
cli-anything-mermaid project new -o diagram.json

# Run with JSON output (for agent consumption)
cli-anything-mermaid --json project info
REPL Mode

When invoked without a subcommand, the CLI enters an interactive REPL session:

bash
cli-anything-mermaid
# Enter commands interactively with tab-completion and history

Command Groups

Project

Project lifecycle commands.

CommandDescription
newCreate a new Mermaid project with optional sample preset and theme
openOpen an existing Mermaid project file
saveSave the current project to a file
infoShow current project information
samplesList available sample diagram presets
Diagram

Diagram source manipulation commands.

CommandDescription
setReplace the Mermaid source text (inline or from file)
showPrint the current Mermaid source code
Export

Render and share commands.

CommandDescription
renderRender the diagram to SVG or PNG via mermaid.ink
shareGenerate a Mermaid Live Editor URL for sharing
Session

Session state commands.

CommandDescription
statusShow current session state
undoUndo the last diagram source change
redoRedo the last undone change

Examples

Create and Render a Flowchart
bash
# Create a project with flowchart sample
cli-anything-mermaid project new --sample flowchart -o flow.json

# Replace diagram source
cli-anything-mermaid --project flow.json diagram set --text "graph TD; A-->B; B-->C;"

# Render to SVG
cli-anything-mermaid --project flow.json export render output.svg --format svg
Create a Sequence Diagram
bash
# Create project with sequence sample
cli-anything-mermaid project new --sample sequence -o seq.json

# Set diagram from file
cli-anything-mermaid --project seq.json diagram set --file my_diagram.mmd

# Render to PNG
cli-anything-mermaid --project seq.json export render output.png --format png
Share a Diagram
bash
# Generate an editable Mermaid Live URL
cli-anything-mermaid --project flow.json export share --mode edit

# Generate a view-only URL
cli-anything-mermaid --project flow.json export share --mode view
Interactive REPL Session
bash
cli-anything-mermaid
# new flowchart
# set graph TD; A-->B; B-->C;
# render output.svg
# share
# quit

State Management

The CLI maintains session state with:

  • Undo/Redo: Revert or replay diagram source changes
  • Project persistence: Save/load project state as JSON
  • Session tracking: Track modifications and changes

Output Formats

All commands support dual output modes:

  • Human-readable (default): Tables, colors, formatted text
  • Machine-readable (--json flag): Structured JSON for agent consumption
bash
# Human output
cli-anything-mermaid project info

# JSON output for agents
cli-anything-mermaid --json project info

For AI Agents

When using this CLI programmatically:

  1. Always use --json flag for parseable output
  2. Check return codes - 0 for success, non-zero for errors
  3. Parse stderr for error messages on failure
  4. Use absolute paths for all file operations
  5. Verify outputs exist after render operations

More Information

  • Full documentation: See README.md in the package
  • Test coverage: See TEST.md in the package
  • Methodology: See HARNESS.md in the cli-anything-plugin

Version

1.0.0

© HKUDS, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/cli-anything-mermaid of HKUDS/CLI-Anything.

Open the folder on GitHubat commit 34f5195

Compare with similar skills

CLI Anything Mermaid next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

CLI Anything Mermaid compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
CLI Anything Mermaid this skillHKUDS/CLI-Anything52k—~1.1kAutomated safety check: PassApache-2.0
Archify Diagramstt-a1i/archify81k—~2.9kAutomated safety check: PassMIT
Diagram Designcathrynlavery/diagram-design48k1 repos~7.6kAutomated safety check: PassMIT
Draw.io Diagram StudioAgents365-ai/drawio-skill10k—~2.4kAutomated safety check: NotesMIT
Pretty Mermaid Rendererimxv/Pretty-mermaid-skills1.5k—~2kAutomated safety check: PassMIT
Archify Diagram BuilderUnclecheng-li/AI_Animation1.5k2 repos~4.1kAutomated safety check: PassMIT

Similar skills

  • Archify Diagrams

    tt-a1i/archify

    Creates interactive architecture, workflow, sequence, data-flow and lifecycle diagrams as standalone HTML with inline SVG, themes and image or video export.

    81k GitHub stars~2.9k tokensUpdated today
    DevelopmentAuto-check passed
  • Diagram Design

    cathrynlavery/diagram-design

    Creates branded diagrams, from architecture, flowchart and sequence to charts and maps, as self-contained HTML with inline SVG, with import from draw.io, Mermaid and Excalidraw.

    48k GitHub starsUsed in 1 repo~7.6k tokens
    DevelopmentAuto-check passed
  • Draw.io Diagram Studio

    Agents365-ai/drawio-skill

    Creates and edits editable draw.io diagrams from descriptions, code, infrastructure files, SQL and API schemas, with sync, review, test and export tools.

    10k GitHub stars~2.4k tokensUpdated 8 days ago
    DevelopmentAuto-check: notes
  • Pretty Mermaid Renderer

    imxv/Pretty-mermaid-skills

    Writes and renders Mermaid diagrams as themed SVG, PNG or terminal ASCII and Unicode art with a bundled Node.js CLI that needs no browser.

    1.5k GitHub stars~2k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Archify Diagram Builder

    Unclecheng-li/AI_Animation

    Builds validated architecture, workflow, sequence, data-flow and lifecycle diagrams as standalone interactive HTML from a small JSON spec, with optional motion and image export.

    1.5k GitHub starsUsed in 2 repos~4.1k tokens
    DevelopmentAuto-check passed
  • Mermaid

    WH-2099/mermaid-skill

    Generate Mermaid diagrams from user requirements. An agent skill from WH-2099/mermaid-skill.

    288 GitHub starsUsed in 4 repos~958 tokens
    DevelopmentAuto-check passed

More from HKUDS/CLI-Anything

All 78 skills in this repo
  • CLI-Anything for Codex

    HKUDS/CLI-Anything

    Lets Codex build, refine, test, validate and list CLI-Anything harnesses for GUI applications or source repositories, following the project's full methodology.

    52k GitHub stars~1.5k tokensUpdated 19 days ago
    Auto-check passed
  • CLI-Anything for Reasonix

    HKUDS/CLI-Anything

    Adapts the CLI-Anything methodology so Reasonix can build, refine, test and validate a command-line harness for an existing GUI application or source repository.

    52k GitHub stars~1.8k tokensUpdated 19 days ago
    Auto-check passed
  • Guides Hermes Agent through building, refining and testing a CLI-Anything harness that wraps a GUI application or source repository in a scriptable command line.

    52k GitHub stars~1.1k tokensUpdated 19 days ago
    Auto-check passed
  • Builds, refines, tests or validates a CLI-Anything harness that wraps a GUI application or source repository as a stateful Click CLI with JSON output and a REPL mode.

    52k GitHub stars~839 tokensUpdated 19 days ago
    Auto-check passed
  • Krita CLI Harness

    HKUDS/CLI-Anything

    Drives Krita from the command line to create projects, add layers, apply filters, resize the canvas and export images, with JSON output for agents.

    52k GitHub stars~931 tokensUpdated 19 days ago
    Auto-check passed
  • MacroCLI GUI Macros

    HKUDS/CLI-Anything

    Defines, lists, inspects and runs parameterized GUI macros from the command line, with the runtime choosing the execution backend.

    52k GitHub stars~1.4k tokensUpdated 19 days ago
    Auto-check passed

Works with

Categories

Questions about CLI Anything Mermaid

What does CLI Anything Mermaid do?

Command-line interface for Mermaid Live Editor - Create, edit, and render Mermaid diagrams via stateful project files and mermaid.ink renderer URLs. CLI Anything Mermaid is an agent skill from HKUDS/CLI-Anything.ink renderer URLs.

When should I use CLI Anything Mermaid?

CLI Anything Mermaid fits situations like: tasks that involve Diagrams.

How do I install CLI Anything Mermaid in Claude Code?

Run `npx skills add HKUDS/CLI-Anything --skill cli-anything-mermaid -a claude-code`. Or copy the skill folder (skills/cli-anything-mermaid in HKUDS/CLI-Anything) into .claude/skills/cli-anything-mermaid in your project. Claude Code loads it when a task matches its description.

How do I install CLI Anything Mermaid in Codex?

Run `npx skills add HKUDS/CLI-Anything --skill cli-anything-mermaid -a codex`. Or copy the skill folder (skills/cli-anything-mermaid in HKUDS/CLI-Anything) into .agents/skills/cli-anything-mermaid in your project. Codex loads it when a task matches its description.

Can I use CLI Anything Mermaid in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add HKUDS/CLI-Anything --skill cli-anything-mermaid -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cli-anything-mermaid, .gemini/skills/cli-anything-mermaid, .github/skills/cli-anything-mermaid and .opencode/skills/cli-anything-mermaid in your project.

What does CLI Anything Mermaid need to run?

Going by SKILL.md and its folder, CLI Anything Mermaid needs the command-line tools its instructions call (pip). Our summary lists: Python 3.

Does CLI Anything Mermaid access the network?

SKILL.md contains no URLs. Its commands use pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is CLI Anything Mermaid safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does CLI Anything Mermaid use?

CLI Anything Mermaid is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does CLI Anything Mermaid use?

About 1.1k tokens (SKILL.md is roughly 4.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to CLI Anything Mermaid?

Skills that share tags, products or a category with CLI Anything Mermaid: Archify Diagrams (tt-a1i/archify, 81k stars), Diagram Design (cathrynlavery/diagram-design, 48k stars), Draw.io Diagram Studio (Agents365-ai/drawio-skill, 10k stars) and Pretty Mermaid Renderer (imxv/Pretty-mermaid-skills, 1.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains CLI Anything Mermaid?

HKUDS (a GitHub organization) maintains it in HKUDS/CLI-Anything, which has 51,809 GitHub stars. The repository holds 78 skills in this directory. The repository was last updated on September 22, 2026.

Source: HKUDS/CLI-Anything on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.