/mermaid:mermaid-validatefrom mermaid
Validates Mermaid diagram syntax in markdown files or directories. Reports pass/fail per file with error details.
Ships in mermaid. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
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.mdWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub diegomarino/claude-toolshed --plugin mermaid6 skills in this plugin
/mermaidInternal routing hub for mermaid diagram skills/mermaid-architectScan a codebase and auto-generate relevant diagrams from its structure/mermaid-configChange theme, output format, or check plugin dependencies/mermaid-diagramGenerate a Mermaid diagram from a text description/mermaid-renderRender .mmd or .md files to SVG imagesOther plugins' skills for the same job