一键导入
mermaid-validate
Validate Mermaid syntax in .md files or directories
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Validate Mermaid syntax in .md files or directories
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when checking Paperclip org health, reviewing agent efficiency, diagnosing token waste, verifying governance compliance, or before and after making org changes. Also use when agents seem idle or unproductive, costs spike, tasks stall, heartbeats fail silently, you see 409 conflicts, stale locks, blocked deadlocks, or suspect agents burning tokens with no progress.
This skill should be used when the user asks to "show dev-setup config", "change the worktrees directory", "update the port pattern", "configure dev-setup settings", or wants to view or update settings in .claude/dev-setup.json.
Generate dev server lifecycle scripts (start/stop/status/ports) from detected project structure
This skill should be used when the user asks to "create a worktree", "set up an isolated workspace", "create a branch for a feature", "start working on a new branch", or before executing an implementation plan that needs an isolated git workspace.
Scan a codebase and auto-generate relevant diagrams from its structure
Generate a D2 diagram from a text description
| name | mermaid-validate |
| description | Validate Mermaid syntax in .md files or directories |
| argument-hint | ["path"] |
| allowed-tools | Read, Bash |
User request: "$ARGUMENTS"
Check Mermaid syntax for all diagrams found in a given file or directory.
Resolve Plugin Path: Run once before executing any scripts:
find "$HOME/.claude/plugins/cache" -type d -name "mermaid" -path "*/skills/mermaid" 2>/dev/null | head -1
If empty, run fallback (for dev/repo usage):
find "$HOME" -maxdepth 8 -type d -name "mermaid" -path "*/skills/mermaid" 2>/dev/null | head -1
Use the returned path as PLUGIN_DIR in all steps below.
Ensure Dependencies:
bash "$PLUGIN_DIR/scripts/ensure-deps.sh"
If .claude/mermaid.json does not exist, display a one-time nudge before continuing:
First time using the mermaid plugin? Run
/mermaid-configto pick a theme and output settings. Using defaults for now (zinc-light,./diagrams).
Resolve Target Path:
.md files containing Mermaid blocks.Optional Config:
.claude/mermaid.json exists, read defaults:
output_directory (default: ./diagrams)Resolve output path:
output_directory is "same" AND an input file path is known:
OUTPUT_DIR=$(dirname {input_file}) (for a directory argument, use the directory itself)output_directory is "same" AND no argument was provided:
OUTPUT_DIR=./diagramsOUTPUT_DIR={output_directory}Validate:
node "$PLUGIN_DIR/scripts/extract_mermaid.js" <file> --validateReport:
$PLUGIN_DIR/references/guides/troubleshooting.md.$PLUGIN_DIR/references/guides/troubleshooting.md