Command Palette

Search for a command to run...

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

engineer-design-diagram

БесплатноЗапускает вложенные скриптыНе проверен

Generate production-grade engineering design diagrams (architecture,\ \ sequence, delta, drift) as self-contained dark-themed HTML files with accessible\ \…

jeremylongshoreот jeremylongshore★ 2 961 звезда на GitHub

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

Engineer Design Diagram

Generates production-grade engineering design diagrams as single-file HTML with inline SVG, grounded in real repository topology. Credit: design palette + arrow-masking pattern inspired by Cocoon AI's architecture-diagram-generator (MIT). See THIRD_PARTY_LICENSES.md.

Overview

Most diagramming tools produce pretty pictures disconnected from reality. This skill does the opposite: it reads the actual repo (package manifests, docker-compose, k8s, terraform, import graph) and emits a diagram that reflects the real system. It also knows how the system changed — PR-diff mode highlights structural deltas, trace mode turns a stack/log into a sequence diagram, and drift mode detects when the architecture has wandered from a stored fingerprint.

Four modes share a common pipeline (DCI grounding → node/edge graph → template fill → fingerprint write). Output is a single self-contained HTML file that opens in any browser, plus a Mermaid text block for copy-paste into docs. Dark theme with semantic OKLCH color coding by component role. Accessible by default (ARIA, <title>/<desc>, reduced-motion, keyboard navigation).

Layout Philosophy — pick the shape before you draw

Dense technical systems want to render wide. This is how Anthropic docs, Linear docs, and Vercel architecture pages present multi-component systems: a sticky left rail for context (nav, invariants, legend) and a generous main column for the diagram itself. Mimic that pattern when your content is dense, and use the simpler single-SVG hero when it isn't.

Two supported output shapes, one decision up front:

Shape Use when Template
Single-SVG hero (classic) ≤8 nodes, one-screen takeaway, no sub-grouping, no accompanying explanation needed templates/base.html
Docs-layout page (widescreen) ≥8 nodes, multiple planes/groupings/sub-blocks, want invariants + detail cards + legend alongside the diagram templates/docs-layout.html

Widescreen-first for docs-layout. Target min-width: 1024px; do not add mobile breakpoints for docs-layout output — it's architecture documentation, not a landing page. The diagram needs horizontal breathing room. On narrow viewports the diagram stage scrolls horizontally inside its card while the sidebar stays visible.

Hybrid rendering in docs-layout mode: HTML/CSS for all node cards (easier to maintain, free hover states, content edits don't trigger collision math), SVG overlay positioned absolutely over the node grid for arrows only. Arrows are the one place SVG still wins — fixed pixel coords, clean arrowheads, no brittle CSS-line math. Pure-SVG stays the default for the single-hero shape because the payoff of HTML flex doesn't materialize at small node counts.

Layout-decision signal: if during Step 2 the graph has any of — (a) more than one semantic lane/plane, (b) subcomponent lists of 4+ items per node, (c) the user asks for "docs page" / "architecture page" / references Anthropic/Linear/Vercel docs as exemplars — pick docs-layout. Otherwise stay with single-SVG.

See docs-layout.md for the full widescreen spec (grid geometry, design tokens, sidebar anatomy, arrow overlay placement, hover states).

Prerequisites

  • Git repository (for generate/diff/watch modes)
  • At least one of: package.json, pyproject.toml, Cargo.toml, go.mod, docker-compose.yml, k8s/*.yaml, terraform/*.tf
  • Python 3.9+ (for scripts/fingerprint.py)
  • A browser to view output
  • Optional: kubectl (cluster introspection), terraform (state parsing), jq (manifest parsing)

Environment Detection (DCI)

!git rev-parse --show-toplevel 2>/dev/null || echo "not a git repo" !git rev-parse --short HEAD 2>/dev/null || echo "no-head"; git branch --show-current 2>/dev/null || echo "no-branch" !ls package.json pyproject.toml Cargo.toml go.mod requirements.txt docker-compose.yml Dockerfile 2>/dev/null | head -10 || echo "no manifests" !command -v jq >/dev/null 2>&1 && jq -r '.name,(.dependencies // {} | keys[]?)' package.json 2>/dev/null | head -20 || echo "no package.json / no jq" !docker compose config --services 2>/dev/null | head -30 || echo "no docker-compose" !find . -maxdepth 3 -type d \( -name k8s -o -name kubernetes -o -name manifests \) 2>/dev/null | head -5 || echo "no k8s dir" !find . -maxdepth 3 -name '*.tf' 2>/dev/null | head -10 || echo "no terraform"

Instructions

Step 1: Mode Detection

Parse the first token of $ARGUMENTS:

Invocation Mode Playbook
/design:generate or empty generate mode-playbooks.md#generate
/design:diff diff mode-playbooks.md#diff
/design:trace <path> trace [mode-playbooks.md#trace](referenc
Полный SKILL.md на GitHub

Установить engineer-design-diagram в Claude Code и Claude Desktop

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

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

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

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

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

Read
Write
Glob
Grep
Bash(git:*)
Bash(ls:*)
Bash(cat:*)
Bash(jq:*)
Bash(docker:*)
Bash(kubectl:*)
Bash(terraform:*)
Bash(python3:*)
Bash(xdg-open:*)
Bash(open:*)
Bash(wslview:*)
AskUserQuestion

Вложенные файлы

evals/evals.jsonexamples/aws-serverless.htmlexamples/microservices.htmlexamples/tiny-monorepo/expected-architecture.htmlreferences/THIRD_PARTY_LICENSES.mdreferences/accessibility.mdreferences/dci-block.mdreferences/docs-layout.mdreferences/drawing-rules.mdreferences/fingerprint-spec.mdreferences/mode-playbooks.mdreferences/troubleshooting.mdscripts/collect_dci.shscripts/fingerprint.pyscripts/open_in_browser.shscripts/validate_html.pytemplates/base.htmltemplates/docs-layout.htmltemplates/mermaid-fallback.htmltemplates/sequence.html

FAQ

Что делает скилл engineer-design-diagram?

Generate production-grade engineering design diagrams (architecture,\ \ sequence, delta, drift) as self-contained dark-themed HTML files with accessible\ \ inline SVG. Grounds every diagram in real repo topology via DCI \u2014 package\ \ manifests, docker-compose, k8s, terraform, import graph. Four modes: generate\ \ from a live repo, diff a PR, trace a stack into a sequence diagram, or watch for \ drift against a fingerprint. Semantic OKLCH palette; Mermaid fallback for large\ \ graphs. Use when visualizing system architecture, reviewing a PR for structural\ \ change, diagnosing an incident from a trace, onboarding to a codebase, or detecting\ \ architectural drift. Trigger with "/design:generate", "/design:diff", "\ /design:trace", "/design:watch", "draw the architecture", "diagram this PR"\ , "engineer design diagram", or "architecture diagram".

Как установить скилл engineer-design-diagram?

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

Скилл engineer-design-diagram запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

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

Сравнить engineer-design-diagram с