Skip to content
Back to skills

Diagrams As Code

ASecurity

Create Typst, D2, LikeC4, Mermaid, SVG diagrams, Altair/Matplotlib charts, VHS demos, visual variants.

  • 14 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added September 23, 2026
ai-agentsgogitfrontenddocumentation

Works with

  • terminal
  • cli

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned December 2, 2026

npx -y skills add fmind/dot --skill diagrams-as-code --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Diagrams As Code?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Diagrams As Code
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/fmind-diagrams-as-code/badge)](https://www.skillsdirectory.com/skills/fmind-diagrams-as-code)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: diagrams-as-code
description: "Create Typst, D2, LikeC4, Mermaid, SVG diagrams, Altair/Matplotlib charts, VHS demos, visual variants."
license: MIT
metadata:
  kind: collection
  author: Médéric HURIER (Fmind)
  source: github.com/fmind/dot/tree/main/skills/diagrams-as-code
  created: "2026-09-16"
  updated: "2026-12-01"
---

# Diagrams as Code

Use diagrams for boundaries, flows, lifecycles, and comparisons (tables or lists when non-spatial). **Simple and pleasant is default:** show the plain mental model in **3 to 5 soft-colored boxes (~10 to 15 words total)** for flows, or a **dark-mode-safe framed mini C1/C2 card** (`1px #9AA0A6` rounded `#FFFFFF` card: inputs -> grouped core container with 3 crisp inner boxes -> outputs) for READMEs and architecture briefs, lifting raw flags or protocols into a bottom table.

Plot data charts only when a comparison or baseline adds real decision value; use large readable labels (`15` to `18pt` on full-width slides), stamp `[DRAFT]` on unverified draft charts, and default to an editorial bar or line chart with light scale, baseline line, winner highlight, and delta (reserve multi-container C4 graphs and dense diagnostics strictly for opt-in engineering docs). Apply client branding (ask if missing; never mix), keep existing identities, or use `~/.agents/DESIGN.md` ([fmind/theme](https://github.com/fmind/theme/blob/main/DESIGN.md)) and `~/.agents/themes/` (edit upstream only). Cut chrome, gradients, and AI imagery.

## Workflow

1. **Pick a guide below**: `typst` (default calm soft-colored flows and composed cards), `charts` (Altair or Matplotlib editorial plots), `mermaid` (GitHub/PR/Zensical fenced blocks), `d2` (opt-in routed architecture graphs and single-service C4 `layers:`), `likec4` (opt-in multi-container C4 models), `svg` (logos and marks), `recording` (VHS demos), `variants` (open look or rejected draft).
1. **Render and inspect**: keep editable sources and inspect PNG/SVG directly (open whitespace, `>= 12px` text, `>= 8pt` chart ticks, fonts, `>= 4.5:1` contrast, light/dark legibility).

## Task guides

<!-- guides:start -->

- [charts](references/charts.md): Plot quantitative data charts with Altair/vl-convert and Matplotlib: honest scales, CVD palettes, PNG/SVG.
- [d2](references/d2.md): Author D2 diagram sources, standalone layouts, theming, and vector/raster exports.
- [likec4](references/likec4.md): Author opt-in LikeC4 C4 architecture models, validate in CI, and build interactive static explorers.
- [mermaid](references/mermaid.md): Author portable Mermaid diagrams in Markdown and GitHub: frontmatter config, validation, and rendering.
- [recording](references/recording/GUIDE.md): Record reproducible, isolated terminal demos with VHS, ttyd, and FFmpeg.
- [svg](references/svg/GUIDE.md): Author self-contained SVG logos, geometric marks, and live-text visual checks.
- [typst](references/typst.md): Compose branded illustrations, concept diagrams, and cards in Typst stdlib with 2x PNG/SVG exports.
- [variants](references/variants/GUIDE.md): Generate numbered logo, cover, or illustration variants with light/dark contact sheets.

<!-- guides:end -->

## Documentation

- [fmind/theme](https://github.com/fmind/theme) (each guide links its upstream tool docs and releases).
- Companions: [write/typst-deck](../write/references/typst-deck/GUIDE.md), [write/doc](../write/references/doc/GUIDE.md), [docs/site](../docs/references/site/GUIDE.md), [docs/repository](../docs/references/repository/GUIDE.md), [web-frontend](../web-frontend/SKILL.md).

Files in this skill

  • SKILL.md966 B
  • references/d2.md2.6 KB
  • references/mermaid.md3.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.