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.
npx agentmods add skills/fmind/dot/d2npx skills add fmind/dot --skill d2git clone --depth 1 https://github.com/fmind/dotWrote 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.
[](https://agentmods.dev/skills/fmind/dot/d2)<a href="https://agentmods.dev/skills/fmind/dot/d2"><img src="https://agentmods.dev/badge/skills/fmind/dot/d2.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00031 | $0.00725 |
| Opus 5 | $0.00015 | $0.00362 |
| Sonnet 5 | $0.00006 | $0.00145 |
| Haiku 4.5 | $0.00003 | $0.00072 |
Grade A, and why
d2 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 yesterday.
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.
How it starts
The opening of the file, as written. The whole thing — 44 lines — stays where its author put it; the contents beside it link to each section on GitHub.
D2 Diagram Standard
D2 is the specialist diagram tool: use it when the repository already owns .d2 sources, the diagram needs bespoke composition (nested containers, boards, scenarios, layers, steps), a standalone SVG, PNG, PDF, PPTX, GIF, or ASCII export is the deliverable, or Mermaid cannot express the visual cleanly. Tool choice lives in fmind-visuals.
Workflow
-
State the thesis: the visual claim, target medium, and expected reading size.
-
Write the smallest readable source: prefer containers, explicit directions, and short labels over manual coordinates.
-
Choose the layout: start with
dagre; tryelkonly when it produces a materially clearer topology (d2 layoutlists the engines). -
Apply the palette: an Fmind article diagram imports diagram.d2 and uses its classes on a light surface; elsewhere start from a built-in theme (
d2 themes) and apply the Fmind tokens throughtheme-overridesas in fmind-theme. -
Format, validate, and render, trusting the exit status rather than the presence of an output file:
d2 fmt diagram.d2 d2 validate diagram.d2 d2 diagram.d2 diagram.svg -
Inspect the export: clipping, crossings, font fallback, contrast, appendix behavior, and whether links or tooltips survive the target embedding.
Gotchas
- Raster by default: prefer SVG for web pages and documentation; use PNG only for raster-only destinations.
- Partial font sets: supply all eight
--font-*flags together with custom TTF files so missing weights do not silently fall back. - PNG and PDF need a browser: D2 rasterizes through a bundled Playwright download; when it is unavailable, keep the SVG and rasterize it with playwright instead of pinning an obsolete browser.
- Exported image as source: keep
.d2beside every generated artifact; the export is never the editable source. - Native rendering: switch to mermaid when the source must render inside GitHub or Slidev Markdown.
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.
- yesterday First seen · 44 lines · 31 tokens per session scan A c99e57b00fbb
d2 is a skill published in the GitHub repository fmind/dot (4 stars, last pushed today), licensed MIT. It adds 31 tokens to every session and 725 once invoked, about $0.0002 per session on Opus 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-03.
Other skills, from other repositories
go-stack
Build Go projects, libraries, CLIs, TUIs, web apps, or ADK agents with the standard package layout and pinned tooling.
python-stack
Build typed Python projects with uv, Ruff, ty, pytest, Litestar, and Typer. Use for packages, CLIs, web apps, tests, typing, or API verification.
k8s-local
Create and manage local Kubernetes clusters (k3d or kind) and deploy to them with kubectl, helm, helmfile, and skaffold. Use for local k8s cluster setup, dev loops, and debugging.
chezmoi
Manage chezmoi dotfiles: source naming, Go templates, age-encrypted secrets, and the edit-source then apply/diff workflow.
hugo
Canonical Hugo static-site stack with the Hextra docs theme — Hugo Modules, mise tasks, dprint, lefthook, and GitHub Pages deploy. Use for documentation sites, project docs, and static websites.
mise
Configure pinned mise tools and canonical install, format, check, test, build, and watch tasks shared by hooks and CI.