agentleFS
flopperjflopperj/dotfiles-core/.claude/skills/mermaid-diagrams/SKILL.md

mermaid-diagrams

Skill3 starsChanged 11 days agoMITView on GitHub

Generate PNG images from Mermaid syntax using mermaid-cli (mmdc). Supports flowcharts, sequence diagrams, ER diagrams, class diagrams, and more. Can update markdown files to replace mermaid code blocks with image links for Google Docs compatibility. Use when the user wants to convert mermaid to PNG, generate diagram images, export diagrams for docs, or says "mermaid to PNG", "diagram image", or "export diagram".

  • Installs packages

69 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use analytics-metrics, aws-account-management and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • hoodiniSkill

    analytics-metrics

    Build data visualization and analytics dashboards. Use when creating charts, KPI displays, metrics dashboards, or data visualization components. Triggers on analytics, dashboard, charts, metrics, KPI, data visualization, Recharts.

    Also in 3 projects that use this

  • hoodiniSkill

    aws-account-management

    Manage AWS accounts, organizations, IAM, and billing. Use when setting up AWS Organizations, managing IAM policies, controlling costs, or implementing multi-account strategies. Triggers on AWS Organizations, AWS IAM, AWS billing, Cost Explorer, SCPs, multi-account, AWS SSO, Identity Center.

    Also in 3 projects that use this

  • wpankSkill

    professional-communication

    Write effective professional messages for software teams. Use when drafting emails, Slack/Teams messages, meeting agendas, status updates, or translating technical concepts for non-technical audiences. Triggers on email, slack, teams, message, meeting agenda, status update, stakeholder communication, escalation, jargon translation.

    Also in 3 projects that use this

  • LangChainSkill

    langchain

    Build agents with a prebuilt architecture and integrations for any model or tool. Use when creating tool-calling agents, switching model providers, or adding structured output.

    Also in 3 projects that use this

  • imehrSkill

    railway

    Railway.com deployment and management - deployment, logs, migrations, troubleshooting, monorepo strategies, security, and CLI reference. Use when deploying to Railway, configuring services, managing environment variables, or debugging deployment issues.

    Also in 3 projects that use this

  • +7 more from hoodini

The file

Files
SKILL.md

Mermaid Diagrams

Generate PNG diagrams from Mermaid syntax using mmdc.

Prerequisites

Check if mmdc is installed:

if ! command -v mmdc &> /dev/null; then
  echo "mermaid-cli (mmdc) not found."
fi

Install options (if not found):

Option 1 — Global install (recommended for frequent use):

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

Option 2 — Use via npx (no global install required):

npx -p @mermaid-js/mermaid-cli mmdc -i input.mmd -o output.png

For more information, see the mermaid-cli GitHub repo.

Chrome Configuration

PNG generation requires Chrome/Puppeteer. If you encounter errors about Chrome not being found, set the PUPPETEER_EXECUTABLE_PATH environment variable to use your system Chrome:

export PUPPETEER_EXECUTABLE_PATH="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"

Or prefix individual commands:

PUPPETEER_EXECUTABLE_PATH="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" mmdc -i diagram.mmd -o diagram.png -e png

Quick Commands

Generate PNG from .mmd file (light mode default)

mmdc -i diagram.mmd -o diagram.png -t default -b white -e png -s 4

Generate from stdin

cat << 'EOF' | mmdc --input - -o output.png -t default -b white -e png -s 4
graph TD
    A[Start] --> B[End]
EOF

Update markdown with diagram images

mmdc -i template.md -o output.md -t default -b white -e png -s 4

This extracts mermaid code blocks from markdown, generates numbered image files, and replaces blocks with ![diagram](./output-N.png) references.

Custom image output directory

mmdc -i template.md -o docs/README.md -a docs/images/ -t default -b white -e png -s 4

Default Configuration

  • Theme: default (light colors)
  • Background: white
  • Scale: 4 (4x resolution for crisp images)

For dark mode (only when requested): -t dark -b transparent

Additional Resources

  • For CLI options and troubleshooting, see reference.md
  • For diagram type examples, see examples.md

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.