🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

generate mermaid diagrams

by @chunhualiao

Generate consistent, template-based Mermaid diagrams for technical content. Supports 12 diagram types (architecture, flowchart, sequence, concept-map, radial...

πŸ’‘ Examples

Generated Architecture Diagram

%%{init: {'theme':'base', ...}}%%
graph TB
    subgraph "Agent System"
        Gateway[Gateway Process]
        Session[Session Manager]
        Tools[Tool Registry]
    end

User((User)) Provider((LLM Provider))

User -->|Request| Gateway Gateway -->|Route| Session Session -->|Select Tool| Tools Tools -->|Execute| Provider

Output: Clean, consistent, professional diagram with uniform styling across all chapters.

βš™οΈ Configuration

Automated Installation (Recommended)

Run the installation script to automatically install and verify mermaid-cli:

cd $SKILL_DIR  # Path to skill-mermaid-diagrams directory
./scripts/install-deps.sh

The script will:

  • Check Node.js version (>= 18.0.0 required)
  • Install or upgrade mermaid-cli to latest version
  • Verify installation and version compatibility
  • Provide troubleshooting guidance if needed
  • Manual Installation

    Alternatively, install Mermaid CLI globally:

    npm install -g @mermaid-js/mermaid-cli
    

    Verify installation:

    mmdc --version  # Should be >= 11.0.0
    

    πŸ“‹ Tips & Best Practices

    1. Consistent counts: Use same --max value for all chapters (e.g., 3) 2. Review before commit: Run validator on all outputs before pushing 3. Version control: Commit both .mmd source and .svg/.png renders 4. Iterate templates: If diagrams look wrong, adjust template then regenerate 5. Manual touch-ups: Edit .mmd files directly for fine-tuning, then re-render with mmdc

    View on ClawHub
    TERMINAL
    clawhub install skill-mermaid-diagrams

    πŸ§ͺ Use this skill with your agent

    Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

    πŸ” Can't find the right skill?

    Search 60,000+ AI agent skills β€” free, no login needed.

    Search Skills β†’