/d2:d2from d2
Creates, validates, renders, or revises D2 diagrams (architecture, flow, dependency, sequence, data) using d2-mcp. Outputs PNG, SVG, or ASCII artifacts.
Ships in d2. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use the connected d2-mcp tools. If they are unavailable, explain that the MCP connection must be installed; do not claim a diagram was rendered. Discover compile-d2, render-d2, and fetch_d2_cheat_sheet; clients may add a prefix or normalize hyphens to underscores.
Inspect the advertised tool schemas before selecting options. This workflow targets the refreshed server; older releases may lack layout choices, structured diagnostics, or native PNG. If a requested feature is unavailable, explain the version limitation and use only options the connected server advertises.
fetch_d2_cheat_sheet when syntax or supported features are uncertain. Write the complete D2 source. Keep labels short, group related nodes, and make arrow direction meaningful. Start with dagre; try elk for dense hierarchies or tala when its layout improves readability.compile-d2 with code and the intended layout/options. Read isError and structuredContent.error, including one-based diagnostic locations. Fix the source and validate again. Do not retry unchanged invalid input or silently remove requested content.render-d2 with the same complete source/options. Prefer PNG for viewing, SVG for a scalable downloadable artifact, and ASCII for text-only output. Inspect the returned artifact when the client permits; report rendering success separately from visual inspection.code works with local or remote servers and agents without files. file_path means a relative .d2 file on the server, within its configured input root; it does not upload a client file. Use exactly one input. Resolve imports into self-contained source for a remote server unless its operator has configured the required files.document_id and revision only if a configured server advertises a document backend; handles work only within that backend and its authorization namespace.urn:sha256:... identifies returned content; it is not a download URL. A returned file: path is server-local. Do not invent a hosted artifact link.output_name only when the user wants a server-local artifact and the server has an output root. Overwrite needs both server opt-in and explicit request intent. Saving returned bytes with client file tools does not require server output configuration.board_path when selecting a nested board; inspect the tool schema for its path representation. One render returns one artifact, not a board collection.Do not deploy a server, change client permissions, enable asset/file access, or provision storage merely to complete a diagram.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub h0rv/d2-mcp --plugin d2Other plugins' skills for the same job