Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

d2

БесплатноБез исполняемых скриптовНе проверен

Use this skill when the user wants to create diagrams from text — architecture diagrams, flowcharts, sequence diagrams, network topologies, or any technical…

javimoschот javimosch★ 58 звёзд на GitHub

Об этом скилле

d2 Plugin

Declarative diagram scripting language. Write diagrams as simple text and render to SVG, PNG, or PDF.

Commands

Compile

  • d2 compile svg input.d2 output.svg — Compile to SVG
  • d2 compile svg input.d2 output.svg --theme 1 --layout elk — With theme and layout
  • d2 compile png input.d2 output.png --scale 2 — Compile to PNG at 2x resolution
  • d2 compile pdf input.d2 output.pdf — Compile to PDF

Watch

  • d2 watch start input.d2 — Watch file and recompile on changes

Options

  • --theme 0-6 — Theme selection (0: Default, 1: Dark, 3: Terminal, etc.)
  • --layout dagre|elk|tala — Layout engine
  • --pad 100 — Padding in pixels
  • --scale 1 — Canvas scale factor
  • --bundle — Embed dependency icons as base64 URIs

Full Access

  • d2 _ _ — Passthrough for advanced options

Usage Examples

  • "Turn this architecture description into a diagram"
  • "Generate a flowchart from my d2 file"
  • "Create a network topology diagram as PNG"
  • "Watch a d2 file and auto-recompile when I edit it"
  • "Render this sequence diagram with dark theme"

Installation

curl -fsSL https://d2lang.com/install.sh | sh -s --

Key Features

  • Text-based: Diagrams are plain text, version-controllable
  • Multiple outputs: SVG, PNG, PDF
  • Themes: Built-in themes including dark mode
  • Layout engines: dagre (default), elk, tala
  • Watch mode: Hot reload on file changes
  • Custom fonts: Embed TTF fonts
  • Non-interactive: All operations are one-shot CLI commands

Example .d2 File

backend -> database: queries
backend -> cache: reads
client -> backend: HTTP

Установить d2 в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл d2?

Use this skill when the user wants to create diagrams from text — architecture diagrams, flowcharts, sequence diagrams, network topologies, or any technical diagram. Compile .d2 files to SVG, PNG, or PDF.

Как установить скилл d2?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл d2 запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить d2 с