diagrams-as-code

diagrams-as-code is a skill for Claude Code, Codex from fmind/dot. It costs 20 tokens per session (413 once invoked), scanned A, original, MIT.

A method for creating technical diagrams from text using Mermaid or D2. Mermaid is commonly used in Markdown and GitHub, while D2 is suited to standalone diagram layouts.

In plain words
What is it for?
Use it to create, validate, render, and export diagrams that explain software systems and their relationships.
Why use it?
It keeps diagrams reviewable as source code and helps choose the appropriate format. It also catches syntax problems before exporting an image.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions AGENTS.md.

Good fit Use it to create, validate, render, and export diagrams that explain software systems and their relationships.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fmind/dot/diagrams-as-code
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add fmind/dot --skill diagrams-as-code
Clone the repo
git clone --depth 1 https://github.com/fmind/dot

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for diagrams-as-code

README.md
[![agentmods](https://agentmods.dev/badge/skills/fmind/dot/diagrams-as-code/github.svg)](https://agentmods.dev/skills/fmind/dot/diagrams-as-code)
Your own site
<a href="https://agentmods.dev/skills/fmind/dot/diagrams-as-code"><img src="https://agentmods.dev/badge/skills/fmind/dot/diagrams-as-code/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for diagrams-as-code

Your own site · 80×15
<a href="https://agentmods.dev/skills/fmind/dot/diagrams-as-code"><img src="https://agentmods.dev/badge/skills/fmind/dot/diagrams-as-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 413 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00020 $0.00413
Opus 5.5 $0.00008 $0.00165
Sonnet 5.5 $0.00004 $0.00083
Haiku 4.5 $0.00002 $0.00041

Measured today against content hash 2cb508dc2028, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

diagrams-as-code scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

The scan reads SKILL.md. This mod also ships 1 executable file (references/svg/scripts/check_svg.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/diagrams-as-code/SKILL.md · 36 lines

What it actually says

Diagrams as Code

Choose the simplest picture that explains the system, or none when prose, a list, or a table is more direct. This skill owns the format choice; fmind-visuals owns brand, decks, and terminal demos.

Need Format Why
Technical docs: AGENTS.md, skills, architecture, contributor, reference Mermaid Renders in Markdown and GitHub; maintainers edit structure
User docs: README, documentation-site landing and concept pages, courses SVG Composed, branded illustration that carries one concept
Existing .d2 sources, Fmind article diagrams, bespoke standalone layouts D2 Containers, layers, and exports Mermaid cannot express

Workflow

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

Task guides

  • d2: D2 sources, standalone layouts, theming, and exports.
  • mermaid: Technical-doc diagrams in Markdown and GitHub: syntax, validation, and rendering.
  • svg: Hand-authored SVG illustrations for READMEs and user docs: composition, branding, embedding, and visual checks.
Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed 2cb508dc2028
  2. 3d ago Changed b4df845a4691
  3. 4d ago Changed 52ca86eae3b8
  4. 9d ago Changed 46b94afd5032
  5. 11d ago Changed 6c7d1d152cc6
  6. 12d ago Changed · +7 lines · -2 tokens per session 4c9ac8f23a62
  7. 14d ago Changed ae1b1d260ab5
  8. 29d ago First seen · 29 lines · 22 tokens per session scan A 1751b405512b

Subscribe to this mod's changes

diagrams-as-code is a skill published in the GitHub repository fmind/dot (11 stars, last pushed yesterday), licensed MIT. It adds 20 tokens to every session and 413 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-17.

Related

Other skills, from other repositories

fmind-visuals

Apply the Fmind visual identity and route slide or diagram work to Slidev, Mermaid, LikeC4, or D2. Use for Fmind talks, decks, article diagrams, architecture visuals, and www.fmind.dev assets.

fmind/dotfiles · 53 tokens

mermaid

Create, theme, validate, and embed Mermaid diagrams as the default text-based diagram format for GitHub, Slidev, documentation, and technical communication.

fmind/dotfiles · 33 tokens

d2

Create, theme, validate, and export D2 diagrams when an existing D2 source or a bespoke standalone composition is a better fit than the default Mermaid workflow.

fmind/dotfiles · 35 tokens

product-design-review

Critique customer interface flows using interaction, visual, responsive, keyboard and screen-reader accessibility, content, and runtime evidence. Use for UX audits, design reviews, UI polish, onboarding, empty states, or redesign.

fmind/dotfiles · 47 tokens

dotfiles-bootstrap

Bootstrap a workstation with the dotfiles framework. Takes a GitHub user / owner+repo / explicit clone URL and runs dot init (which shells out to chezmoi) with the right safety prompts. Honors the active agent profile (ask / plan / apply / audit) so it defaults to dry-run in safer modes and full apply in apply.

sebastienrousseau/dotfiles · 88 tokens

vibe

Delegate a coding task to a cheap AI model (Mistral Vibe by default, but any provider Vibe knows about — DeepSeek, Gemini Flash, etc.) and supervise the result via git diff. Claude orchestrates, the cheap model codes. Claude consumes 500-1500 tokens per delegation regardless of how many file reads the delegate does…

sebastienrousseau/dotfiles · 137 tokens