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.
检查并修复 zero2Agent 项目中 mermaid 图表的语法问题。当用户说"mermaid 渲染错误""图表语法检查""mermaid 不显示""flowchart 报错""检查 mermaid"时触发。也适用于用户提到某篇文章的 mermaid 图无法渲染、显示 syntax error 的场景。
$ npx skills add ranxi2001/zero2Agent --skill mermaid-check -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install ranxi2001/zero2Agent mermaid-check --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/ranxi2001/zero2Agent.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/mermaid-check .claude/skills/mermaid-check && rm -rf skills-srcUse ~/.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/
Install the "mermaid-check" agent skill from https://github.com/ranxi2001/zero2Agent/tree/main/.agents/skills/mermaid-check into .claude/skills/mermaid-check/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mermaid-check", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/ranxi2001/zero2Agent/tree/main/.agents/skills/mermaid-checkType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add ranxi2001/zero2Agent --skill mermaid-check -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install ranxi2001/zero2Agent mermaid-check --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ranxi2001/zero2Agent.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/mermaid-check .agents/skills/mermaid-check && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "mermaid-check" agent skill from https://github.com/ranxi2001/zero2Agent/tree/main/.agents/skills/mermaid-check into .agents/skills/mermaid-check/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mermaid-check", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ranxi2001/zero2Agent --skill mermaid-check -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install ranxi2001/zero2Agent mermaid-check --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ranxi2001/zero2Agent.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/mermaid-check .cursor/skills/mermaid-check && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "mermaid-check" agent skill from https://github.com/ranxi2001/zero2Agent/tree/main/.agents/skills/mermaid-check into .cursor/skills/mermaid-check/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mermaid-check", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/ranxi2001/zero2Agent.git --path .agents/skills/mermaid-check--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add ranxi2001/zero2Agent --skill mermaid-check -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install ranxi2001/zero2Agent mermaid-check --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ranxi2001/zero2Agent.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/mermaid-check .gemini/skills/mermaid-check && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "mermaid-check" agent skill from https://github.com/ranxi2001/zero2Agent/tree/main/.agents/skills/mermaid-check into .gemini/skills/mermaid-check/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mermaid-check", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install ranxi2001/zero2Agent mermaid-checkInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add ranxi2001/zero2Agent --skill mermaid-check -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/ranxi2001/zero2Agent.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/mermaid-check .github/skills/mermaid-check && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "mermaid-check" agent skill from https://github.com/ranxi2001/zero2Agent/tree/main/.agents/skills/mermaid-check into .github/skills/mermaid-check/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mermaid-check", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ranxi2001/zero2Agent --skill mermaid-check -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install ranxi2001/zero2Agent mermaid-check --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ranxi2001/zero2Agent.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/mermaid-check .opencode/skills/mermaid-check && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "mermaid-check" agent skill from https://github.com/ranxi2001/zero2Agent/tree/main/.agents/skills/mermaid-check into .opencode/skills/mermaid-check/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mermaid-check", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
mermaid-check检查并修复 zero2Agent 项目中 mermaid 图表的语法问题。当用户说"mermaid 渲染错误""图表语法检查""mermaid 不显示""flowchart 报错""检查 mermaid"时触发。也适用于用户提到某篇文章的 mermaid 图无法渲染、显示 syntax error 的场景。
Mermaid Check is an agent skill from ranxi2001/zero2Agent. 检查并修复 zero2Agent 项目中 mermaid 图表的语法问题。当用户说"mermaid 渲染错误""图表语法检查""mermaid 不显示""flowchart 报错""检查 mermaid"时触发。也适用于用户提到某篇文章的 mermaid 图无法渲染、显示 syntax error 的场景。
Its SKILL.md is about 1.4k 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: 面向大厂Agent研发岗位求职的agent教程网站,涵盖技术路线与面试八股文. The licence is MIT.
3 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 472ce78. It shows what the files ask for, not the result of running them.
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.
Shell commands in SKILL.md call:
npmnpxpython3From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use npm and npx, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Mermaid Check loads about 1.4k tokens when it runs. Until then it costs about 42 tokens; SKILL.md has 331 words of instructions outside code blocks.
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.
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.
The full file from ranxi2001/zero2Agent at commit 472ce78, republished under its MIT licence (© ranxi2001). 331 words, ~1,371 tokens.
.claude/skills/mermaid-check/SKILL.md (or your agent's skills folder).本项目使用 mermaid 9.4.3(CDN 加载),配置 htmlLabels: false,securityLevel: 'loose'。
图表写在 ```mermaid 代码围栏中,由 _layouts/default.html 中的 JS 转换后渲染。
```mermaid 代码围栏
↓ kramdown 渲染
<div class="language-mermaid"><code>原始文本(HTML 实体转义)</code></div>
↓ 项目 JS(default.html)
code.textContent → 原始 mermaid 文本(含 <br>、-->、| 等)
↓ srcToInnerHTML() 转换
innerHTML: 转义 < > & 但保留 <br/> 为真实 HTML 标签
↓ mermaid.init()
读取 innerHTML → entityDecode() → 解析器function srcToInnerHTML(src) {
return src
.replace(/&/g, '&')
.replace(/</g, '<')
.replace(/>/g, '>')
.replace(/<br\s*\/?>/gi, '<br/>');
}原理:先将所有 HTML 特殊字符转义,再把 <br> 从实体还原为真实标签。
mermaid 的 entityDecode 通过 escape()/unescape() 能正确处理:
--> → 解码回 --><br/> (真实标签) → escape 变为 %3Cbr/%3E → unescape 变回 <br/>| → escape 变为 %7C → unescape 变回 |安装 mermaid CLI:
npm install -g @mermaid-js/mermaid-cli验证单个图表:
echo 'flowchart LR
A[text] -->|label| B' > /tmp/test.mmd
npx mmdc -i /tmp/test.mmd -o /tmp/test.svg 2>&1批量验证项目中所有 mermaid 块:
python3 << 'EOF'
import re, os, subprocess, tempfile
base = os.getcwd()
errors = []
for root, dirs, files in os.walk(base):
dirs[:] = [d for d in dirs if d not in ['.git', '.claude', 'node_modules']]
for f in files:
if not f.endswith('.md'): continue
path = os.path.join(root, f)
with open(path) as fh:
content = fh.read()
for m in re.finditer(r'```mermaid\n(.*?)\n```', content, re.DOTALL):
block = m.group(1)
line = content[:m.start()].count('\n') + 1
with tempfile.NamedTemporaryFile(suffix='.mmd', mode='w', delete=False) as tmp:
tmp.write(block)
tmp_path = tmp.name
result = subprocess.run(
['npx', 'mmdc', '-i', tmp_path, '-o', '/dev/null'],
capture_output=True, text=True
)
os.unlink(tmp_path)
if result.returncode != 0:
errors.append((path, line, result.stderr.strip()))
if errors:
for path, line, err in errors:
print(f'{path}:{line}')
print(f' {err[:200]}')
print()
else:
print('All mermaid blocks pass syntax check')
EOF\n 在代码围栏中不是换行现象:节点标签想换行,写了 A[第一行\n第二行],渲染出错或显示字面 \n
原因:\n 只是两个字符(反斜杠+n),mermaid 不认识
修复:用 <br> 或 <br/>
A[第一行<br>第二行]现象:C[读文件 × 5] 报 "Syntax error in graph"
原因:mermaid 9.4.3 的 JISON 解析器无法处理 × (U+00D7) 等 Unicode 特殊字符。通过本地 HTML 隔离测试确认:去掉 × 后同一图表立即恢复正常。
已知有问题的字符(未加引号时):
× (U+00D7 乘号) — 已确认触发 syntax error→ (U+2192 右箭头) — 已确认干扰箭头语法← (U+2190 左箭头) — 同上: (U+FF1A 全角冒号) — 已确认在 ([用户:...]) 中触发 error安全的 Unicode 字符(已确认可用):
= _ - ? 等 ASCII 符号<br> <br/> 在代码围栏中正常工作["..."] 中均安全修复方案(二选一):
方案 A — 替换为 ASCII 等价:
C[读文件 x5] -- × → x
A -->|8k to 64k| B -- → → to
A([用户: 帮我审查]) -- : → :方案 B — 用双引号包裹标签(推荐,保留原始字符):
C["读文件 × 5"]
A(["用户:帮我做代码审查"])核心规则:非 CJK 的 Unicode 符号在未加引号的标签中不安全。加上 "..." 引号即可解决。
<div class="mermaid"> 中的 <br> 导致解析失败现象:写在 <div class="mermaid"> 中的 <br> 被浏览器 HTML 解析器消费,textContent 在节点标签中间断行
原因:浏览器先于 mermaid 解析 HTML,<br> 变成 DOM 元素
修复:使用 ```mermaid 代码围栏(kramdown 保留原始文本)
` ` `mermaid
flowchart LR
A[第一行<br>第二行] --> B
` ` `div.textContent = src 破坏 entityDecode现象:代码围栏图表初次渲染无法显示
原因:textContent 赋值导致 innerHTML 中 <br> 变为 <br>。mermaid 的 entityDecode 内部用临时 div 的 innerHTML 解码实体时,<br> 被解析为真实 HTML 元素,然后被 textContent 吞掉
修复:使用 srcToInnerHTML() 转换——先转义所有 HTML 字符,再将 <br> 恢复为真实 <br/> 标签
现象:切换深色/浅色模式后图表无法重新渲染
原因:rerenderMermaid 中用 el.innerHTML = src 直接设置原始文本,<br> 和 > 被当作 HTML 解析
修复:rerenderMermaid 也必须使用 srcToInnerHTML() 转换
现象:浅色模式下 mermaid 图显示为深色背景
原因:<head> 中 mermaid.initialize() 硬编码了 theme: 'dark'
修复:读取 data-theme 属性动态选择主题变量
现象:subgraph 内部框架 报错
修复:用引号包裹 subgraph FW["内部框架"]
现象:-->|含"引号"的文本| 报错
修复:整个 edge label 加引号 -->|"含引号的文本"|
grep -rn '```mermaid' --include="*.md" . | grep -v ".claude/"如仍有 <div class="mermaid">,先转为代码围栏。
对每个 mermaid block 检查:
| 问题 | 检测 | 修复 |
|---|---|---|
使用 <div class="mermaid"> | grep | 转为代码围栏 |
\n 在节点标签中 | \\n 在方括号/花括号内 | → <br> |
Unicode 箭头 → ← | 正则 | → ASCII 文本 |
× 乘号 (U+00D7) | 正则 × | → ASCII x |
| 其他 Unicode 符号 | 非 CJK 非 ASCII 字符 | 替换或用引号包裹 |
| subgraph 标题无引号 | subgraph \w+ [ 后无引号 | 加引号 |
| 嵌套引号 | " 在已有引号标签内 | 移除或转义 |
有 mmdc 就用 mmdc 验证,没有则依赖模式匹配。
flowchart LR
A[第一行<br>第二行] --> B[单行]
C["含特殊字符<br>如括号()"] --> D{判断}规则:
<br> 或 <br/> 换行\n(){}[]#& 等特殊字符时用双引号包裹整个标签-->|"文本"|© ranxi2001, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/mermaid-check of ranxi2001/zero2Agent.
Open the folder on GitHubat commit 472ce78
Mermaid Check 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Mermaid Check this skillranxi2001/zero2Agent | 715 | — | ~1.4k | Automated safety check: Pass | MIT | |
| Archify Diagramstt-a1i/archify | 82k | — | ~2.9k | Automated safety check: Pass | MIT | |
| Diagram Designcathrynlavery/diagram-design | 49k | 1 repos | ~7.6k | Automated safety check: Pass | MIT | |
| Draw.io Diagram StudioAgents365-ai/drawio-skill | 10k | — | ~2.4k | Automated safety check: Notes | MIT | |
| Pretty Mermaid Rendererimxv/Pretty-mermaid-skills | 1.5k | — | ~2k | Automated safety check: Pass | MIT | |
| Archify Diagram BuilderUnclecheng-li/AI_Animation | 1.5k | 2 repos | ~4.1k | Automated safety check: Pass | MIT |
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.
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.
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.
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.
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.
WH-2099/mermaid-skill
Generate Mermaid diagrams from user requirements. An agent skill from WH-2099/mermaid-skill.
ranxi2001/zero2Agent
A skill your agent uses when user requests diagrams, flowcharts, architecture charts, or visualizations.
ranxi2001/zero2Agent
将批量面经或零散面试题逐题去重并分发:Agent/LLM/AI工程题写入 zero2Agent 的 learn-agent-interview,传统后端八股写入相邻 zero2Leetcode 的夏季八股。大批量输入使用 gpt-5.6-luna API 逐篇并发抽题和语义召回,再审查、去重和写答案;不新建面经实录文章。
ranxi2001/zero2Agent
Check and fix Chinese quote pairing in Markdown files generated by ClaudeCode or other agents, while preserving Markdown syntax and protected blocks.
ranxi2001/zero2Agent
在 zero2Agent 项目中创建新的学习文章。当用户说"写一篇新文章"、"创建文章"、"新建文章"、"在某模块下添加一篇关于X的文章"、"帮我起草一篇讲XX的内容"、"整理面经"时触发。适用于所有模块下新建内容,包括面试维度拆解文章和面经实录。即使用户没有明确说"文章",只要涉及给 zero2Agent 项目增加教学内容,也应当触发此技能。
ranxi2001/zero2Agent
在 zero2Agent 项目中创建新的学习模块。当用户说"新建模块"、"添加模块"、"创建一个新的学习章节"、"我想增加一个关于X的模块"时触发。负责创建模块目录结构、index.md,并同步更新主页 index.html 和 layouts/default.html 的导航。即使用户只是说"我想增加一个讲XX的章节",也应当触发此技能。
ranxi2001/zero2Agent
基于 CDP 原生 WebSocket 抓取牛客网面经文章。当用户说"抓牛客"、"爬牛客面经"、"nowcoder 抓取"、"抓取面经列表"时触发。通过 Chrome 调试端口直接连接已登录的浏览器会话,支持首页、话题、搜索分页和详情全文抓取,输出 Markdown。
Works with
Categories
检查并修复 zero2Agent 项目中 mermaid 图表的语法问题。当用户说"mermaid 渲染错误""图表语法检查""mermaid 不显示""flowchart 报错""检查 mermaid"时触发。也适用于用户提到某篇文章的 mermaid 图无法渲染、显示 syntax error 的场景。. Mermaid Check is an agent skill from ranxi2001/zero2Agent.
Mermaid Check fits situations like: tasks that involve Diagrams.
Run `npx skills add ranxi2001/zero2Agent --skill mermaid-check -a claude-code`. Or copy the skill folder (.agents/skills/mermaid-check in ranxi2001/zero2Agent) into .claude/skills/mermaid-check in your project. Claude Code loads it when a task matches its description.
Run `npx skills add ranxi2001/zero2Agent --skill mermaid-check -a codex`. Or copy the skill folder (.agents/skills/mermaid-check in ranxi2001/zero2Agent) into .agents/skills/mermaid-check in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ranxi2001/zero2Agent --skill mermaid-check -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mermaid-check, .gemini/skills/mermaid-check, .github/skills/mermaid-check and .opencode/skills/mermaid-check in your project.
Going by SKILL.md and its folder, Mermaid Check needs the command-line tools its instructions call (npm, npx and python3). Our summary lists: Python 3; Node.js.
SKILL.md contains no URLs. Its commands use npm and npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
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.
Mermaid Check is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.4k tokens (SKILL.md is roughly 5.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Mermaid Check: Archify Diagrams (tt-a1i/archify, 82k stars), Diagram Design (cathrynlavery/diagram-design, 49k 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.
ranxi2001 (a GitHub user) maintains it in ranxi2001/zero2Agent, which has 715 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on October 10, 2026.
Source: ranxi2001/zero2Agent on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.