utils/diagram

Extract and validate Mermaid diagrams in Markdown files with auto-fix guidance.

Updated Jan 25, 2026
One-click install
npx skills add https://github.com/codihaus/claude-skills --skill utils-diagram
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: utils/diagram
Source: https://github.com/codihaus/claude-skills/tree/main/skills/utils/diagram
Command: npx skills add https://github.com/codihaus/claude-skills --skill utils-diagram

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Diagram validation and repair for Mermaid diagrams embedded in Markdown, reducing manual checks and drift in documentation.

Core Features & Use Cases

  • Extract Mermaid blocks from Markdown files.
  • Validate diagrams using mermaid-cli and report issues with location and error type.
  • Auto-fix common Mermaid errors guided by the provided error references, then re-validate.
  • Use case: ensure all diagrams in product docs remain valid after edits or PRs.

Quick Start

Validate and fix Mermaid diagrams in a Markdown file by running the diagram validation workflow.

Frequently Asked Questions about utils/diagram

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate Mermaid diagrams embedded in Markdown files?

To validate Mermaid diagrams in Markdown, you extract diagram blocks and check them using the mermaid-cli. This process reports validation issues with specific locations and error types to help you track down syntax problems.

Can I automatically fix common Mermaid syntax errors in my documentation?

Yes, you can auto-fix common Mermaid syntax errors using guided error references. After applying the automated fixes, the workflow re-validates the diagrams to ensure the Markdown documentation remains accurate and fully compliant.

What is the best way to ensure Markdown diagrams remain valid after documentation edits?

The best way to keep Markdown diagrams valid after edits is to run an automated validation workflow. This extracts Mermaid blocks, checks them with mermaid-cli, and applies auto-fix guidance to prevent diagram drift in product docs.

Does this diagram validation workflow require installing mermaid-cli separately?

Yes, diagram validation relies on the mermaid-cli to check extracted Mermaid blocks. You need the CLI environment set up to execute the validation checks and report the exact location and type of any syntax issues found.

Why do my Mermaid diagrams break when edited across multiple Markdown files?

Mermaid diagrams break across multiple Markdown files due to manual editing drift and syntax inconsistencies. Automating extraction and validation catches these common errors immediately, providing auto-fix guidance to restore diagram validity.