d2

Installation
SKILL.md

D2 — Diagram Composition Policies

Global rules for all D2 diagram generation. Every specialist and generation flow MUST enforce these. They are not optional.

CRITICAL — Every Diagram Must

  1. Use snake_case IDsapi_gw: "API Gateway", NOT "API Gateway" as ID. Emojis go in labels only.
  2. Set direction explicitlydirection: right for flows, direction: down for hierarchies. If unsure, use direction: right. Never omit.
  3. Stay at one abstraction level — don't mix context actors with component internals.
  4. Stay under visual budget — max 12 top-level nodes, 7 per group, 3 nesting levels, 4 outgoing edges.

Abstraction Levels

Every diagram operates at exactly ONE of these levels:

Installs
8
GitHub Stars
56
First Seen
Apr 21, 2026
d2 — diegomarino/claude-toolshed