agentsclimarketplace

Mermaid config

Skill aksh-3141/claude-toolshed/plugins/mermaid/skills/mermaid-config

Provide and install pre-packaged plugins to extend Claude Code with new skills directly within your Claude environment.

Install
npx -y skills add aksh-3141/claude-toolshed --skill mermaid-config

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Change theme, output format, or check plugin dependencies

SKILL.md

5.7 KB, as published. Nobody here has run it

/mermaid-config

User request: "$ARGUMENTS"

Task

Interactive config wizard: view and update plugin settings, or run a dependency health check.

Config file

All settings are stored in .claude/mermaid.json in the current project directory.

Default values (used when file does not exist):

{
  "theme": "zinc-light",
  "output_directory": "./diagrams",
  "auto_validate": true,
  "auto_render": false,
  "output_format": "svg"
}

Process

Step 1: Resolve Plugin Path

PLUGIN_DIR=$(find "$HOME/.claude/plugins/cache" -type d -name "mermaid" -path "*/skills/mermaid" 2>/dev/null | head -1)

If empty:

PLUGIN_DIR=$(find "$HOME" -maxdepth 8 -type d -name "mermaid" -path "*/skills/mermaid" 2>/dev/null | head -1)

Use $PLUGIN_DIR in all subsequent commands.

Step 2: Read current config

If .claude/mermaid.json exists, read it. Otherwise use defaults above.

Step 3: If argument provided

If the user passed arguments (e.g. theme dracula or auto_render true), apply directly:

  • Parse as {setting} {value}
  • For theme: accept any of the 15 beautiful-mermaid theme names or custom
  • Validate value is allowed (see options below)
  • Update .claude/mermaid.json
  • Confirm: "✅ {setting} set to {value}"
  • Done.

Step 4: If no argument — show interactive menu

Display:

Current config (.claude/mermaid.json):

  1. theme             → {current}   (zinc-light, github-dark, dracula, … 15 themes + custom)
  2. output_directory  → {current}
  3. auto_validate     → {current}   (true | false)
  4. auto_render       → {current}   (true | false)
  5. output_format     → {current}   (svg)
  6. custom theme      → configure themeVariables
  7. Run health check

What would you like to change? (enter 1-7)

Step 5: Handle selection

If 1 (theme):

Available themes (beautiful-mermaid):

  Light:
   1. zinc-light           clean, neutral light
   2. github-light         GitHub-style light
   3. catppuccin-latte     warm pastel light
   4. nord-light           arctic light palette
   5. solarized-light      Solarized light
   6. tokyo-night-light    Tokyo Night light variant

  Dark:
   7. zinc-dark            clean, neutral dark
   8. github-dark          GitHub-style dark
   9. catppuccin-mocha     warm pastel dark
  10. nord                 arctic dark palette
  11. dracula              Dracula purple
  12. solarized-dark       Solarized dark
  13. tokyo-night          Tokyo Night
  14. tokyo-night-storm    Tokyo Night Storm variant
  15. one-dark             Atom One Dark

  16. custom               define your own colors

Enter 1-16:

Update theme in .claude/mermaid.json.

If 2 (output_directory): Ask for path. Update config.

Special values:

  • "same" — save output in the same directory as the input file. Falls back to ./diagrams when there is no input file reference (e.g. text-only /mermaid-diagram calls).

If 3 (auto_validate): Toggle true/false. Update config.

If 4 (auto_render): Toggle true/false. Update config.

If 5 (output_format):

Available formats:
  1. svg   — vector, only supported format

Enter 1:

Update output_format in .claude/mermaid.json.

If 6 (custom theme): Present the current values and prompt for each variable (leave blank to keep current):

Custom theme colors (beautiful-mermaid format):

  bg      → {current or #ffffff}   background color (required)
  fg      → {current or #1a1a2e}   foreground/text color (required)
  line    → {current or #666666}   arrow and line color (optional)
  accent  → {current or #4a90d9}   accent/highlight color (optional)
  muted   → {current or #999999}   muted text color (optional)

Accept a hex color (#rrggbb) for each. Set theme to "custom" and save all entered values under themeVariables in .claude/mermaid.json.

Example saved config:

{
  "theme": "custom",
  "themeVariables": {
    "bg": "#1a1b26",
    "fg": "#a9b1d6",
    "line": "#565f89",
    "accent": "#7aa2f7",
    "muted": "#565f89"
  }
}

If 7 (health check): See Health Check section below.

Step 6: Write updated config

Create .claude/ directory if it doesn't exist:

mkdir -p .claude

Write updated settings to .claude/mermaid.json (merge with existing, don't overwrite unrelated keys).

Confirm: "✅ Config saved to .claude/mermaid.json"


Health Check

Run when user selects option 7.

Check 1: Node.js

node --version 2>&1

✅ if v18.0.0 or higher | ❌ if not found or older → "Install Node.js 18+: https://nodejs.org"

Check 2: beautiful-mermaid (local node_modules)

ls "$PLUGIN_DIR/scripts/node_modules/beautiful-mermaid" 2>/dev/null && echo "found" || echo "not found"
  • ✅ if "found" → show version from $PLUGIN_DIR/scripts/node_modules/beautiful-mermaid/package.json

  • ❌ if "not found" → auto-install:

    npm install --prefix "$PLUGIN_DIR/scripts"
    

    Confirm: "✅ beautiful-mermaid installed"

Check 3: Render smoke test

printf 'flowchart TD\n    A --> B' | node "$PLUGIN_DIR/scripts/render.js" /dev/stdin --output /tmp/mermaid-health-check.svg 2>&1

✅ if exit 0 and /tmp/mermaid-health-check.svg contains <svg | ❌ if error → show the JSON error message

Output format

Mermaid plugin — dependency check

  ✅ Node.js v22.1.0      required runtime
  ✅ beautiful-mermaid     v1.1.3 — installed
  ✅ Render smoke test     SVG generated OK

Features:
  ✅ Generate diagrams    ✅ Validate    ✅ Render SVG
  ℹ️  PNG not supported   (use SVG — works everywhere Git renders markdown)

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.