---
name: diagrams-as-code
description: "Create, validate, and export technical diagrams with Mermaid (default) or D2."
license: MIT
metadata:
  kind: task
  author: Médéric HURIER (Fmind)
  source: github.com/fmind/dot/tree/main/skills/diagrams-as-code
  created: "2026-09-16"
  updated: "2026-09-16"
---

# Diagrams as Code

Choose the simplest diagram that explains the system. Mermaid is the default for Markdown and GitHub; preserve existing D2 sources or use D2 for a standalone composition. [Fmind visuals](../fmind-visuals/SKILL.md) owns decks, branding, and terminal demos.

## Workflow

Read only the matching guide and its required resources. Use a known guide directly when shared prerequisites are not needed.

## Task guides

<!-- guides:start -->

- [d2](references/d2.md): D2 sources, standalone layouts, theming, and exports.
- [mermaid](references/mermaid.md): Markdown and GitHub diagrams, syntax validation, and rendering.

<!-- guides:end -->
