mermaid-check
Skill by ranxi2001
Checks and fixes Mermaid diagram syntax errors in the zero2Agent project. It triggers on requests such as "mermaid 不显示" or "flowchart 报错". It is written for maintainers who need diagrams in Markdown articles to render.
Install mermaid-check
Built from the published package, never by AI.
git clone --depth 1 https://github.com/ranxi2001/zero2Agent /tmp/zero2Agent && mkdir -p ~/.claude/skills && cp -r /tmp/zero2Agent/.agents/skills/mermaid-check ~/.claude/skills/mermaid-checkRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/ranxi2001/zero2Agent /tmp/zero2Agent && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/zero2Agent/.agents/skills/mermaid-check ~/.gemini/antigravity-cli/skills/mermaid-checkAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
mermaid-check is a skill for finding and fixing syntax problems in Mermaid diagrams in the zero2Agent project. It triggers on phrases such as "mermaid 渲染错误" or "检查 mermaid". The source documents the project's rendering pipeline, which loads mermaid 9.4.3 from a CDN, and lists eight known bugs with fixes, such as unquoted Unicode symbols breaking labels and \n not producing line breaks.
The skill scans Markdown files for mermaid code fences and checks each block. It validates blocks with the mermaid CLI (mmdc) when that is installed, and otherwise relies on pattern matching against a table of known issues. A Python script walks the project and reports failing blocks with file and line numbers. It is aimed at contributors to the zero2Agent project who need to fix diagrams that fail to render.
Written from the project's SKILL.md and checked against it.
What it can do
- Diagram scanFinds mermaid code fences in project Markdown files and lists them for checking.
- Syntax validation with mmdcRuns each mermaid block through the mermaid CLI and reports errors with file and line.
- Pattern-based detectionFlags common problems such as \n in labels, Unicode arrows and unquoted subgraph titles.
- Unicode label fixesExplains which symbols such as × and → break unquoted labels and how to quote or replace them.
- Line break guidanceShows how to write multi-line node labels without using \n.
- Rendering bug referenceDocuments eight known rendering bugs in the zero2Agent setup with causes and fixes.
What you need
- Node.js and npm, for the mermaid CLI (mmdc)
- Python 3, for the batch validation script
Try asking
- 检查 zero2Agent 项目中所有 mermaid 图表的语法
- 这篇文章的 mermaid 图显示 syntax error,帮我修复
- flowchart 报错,帮我看看节点标签里的特殊符号
Good to know
- Written for the zero2Agent project and its mermaid 9.4.3 setup.
- Without mmdc, the skill relies on pattern matching rather than full validation.
- The batch script skips .git, .claude and node_modules folders.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .agents/skills/mermaid-check/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to mermaid-check
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
mermaid-check: common questions
Which Mermaid version does this skill target?
The source says the project uses mermaid 9.4.3, loaded from a CDN, with htmlLabels set to false and securityLevel set to loose.
Why does a label with × or → fail to render?
The source says the 9.4.3 parser cannot handle some Unicode symbols in unquoted labels. Wrapping the label in double quotes keeps the original characters working.
Can the check run without the mermaid CLI?
Yes. The source says that when mmdc is not available, the skill relies on pattern matching to find common problems.
How do I install mermaid-check?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is mermaid-check free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is mermaid-check safe to use?
It scores 78 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to mermaid-check?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
