excalidraw
БесплатноБез исполняемых скриптовНе проверенGenerate architecture diagrams as .excalidraw files from codebase analysis, with optional PNG/SVG export. Use when the user asks to create architecture…
от dirnbauer★ 33 звезды на GitHubОб этом скилле
Excalidraw Diagram Generator
Generate architecture diagrams as .excalidraw files directly from codebase analysis, with optional export to PNG and SVG.
Quick Start
User just asks:
"Generate an architecture diagram for this project"
"Create an excalidraw diagram of the system"
"Visualize this codebase as an excalidraw file"
Claude Code will:
- Analyze the codebase (any language/framework)
- Identify components, services, databases, APIs
- Map relationships and data flows
- Generate valid
.excalidrawJSON with dynamic IDs and labels - Optionally export to PNG and/or SVG using Playwright
No prerequisites: Works without existing diagrams, Terraform, or specific file types.
Critical Rules
1. NEVER Use Diamond Shapes
Diamond arrow connections are broken in raw Excalidraw JSON. Use styled rectangles instead:
| Semantic Meaning | Rectangle Style |
|---|---|
| Orchestrator/Hub | Coral (#ffa8a8/#c92a2a) + strokeWidth: 3 |
| Decision Point | Orange (#ffd8a8/#e8590c) + dashed stroke |
2. Labels Require TWO Elements
The label property does NOT work in raw JSON. Every labeled shape needs:
// 1. Shape with boundElements reference
{
"id": "my-box",
"type": "rectangle",
"boundElements": [{ "type": "text", "id": "my-box-text" }]
}
// 2. Separate text element with containerId
{
"id": "my-box-text",
"type": "text",
"containerId": "my-box",
"text": "My Label"
}
3. Elbow Arrows Need Three Properties
For 90-degree corners (not curved):
{
"type": "arrow",
"roughness": 0, // Clean lines
"roundness": null, // Sharp corners
"elbowed": true // 90-degree mode
}
4. Arrow Edge Calculations
Arrows must start/end at shape edges, not centers:
| Edge | Formula |
|---|---|
| Top | (x + width/2, y) |
| Bottom | (x + width/2, y + height) |
| Left | (x, y + height/2) |
| Right | (x + width, y + height/2) |
Detailed arrow routing: See references/arrows.md
Element Types
| Type | Use For |
|---|---|
rectangle |
Services, databases, containers, orchestrators |
ellipse |
Users, external systems, start/end points |
text |
Labels inside shapes, titles, annotations |
arrow |
Data flow, connections, dependencies |
line |
Grouping boundaries, separators |
Full JSON format: See references/json-format.md
Workflow
Step 1: Analyze Codebase
Discover components by looking for:
| Codebase Type | What to Look For |
|---|---|
| Monorepo | packages/*/package.json, workspace configs |
| Microservices | docker-compose.yml, k8s manifests |
| IaC | Terraform/Pulumi resource definitions |
| Backend API | Route definitions, controllers, DB models |
| Frontend | Component hierarchy, API calls |
Use tools:
Glob→**/package.json,**/Dockerfile,**/*.tfGrep→app.get,@Controller,CREATE TABLERead→ README, config files, entry points
Step 2: Plan Layout
Vertical flow (most common):
Row 1: Users/Entry points (y: 100)
Row 2: Frontend/Gateway (y: 230)
Row 3: Orchestration (y: 380)
Row 4: Services (y: 530)
Row 5: Data layer (y: 680)
Columns: x = 100, 300, 500, 700, 900
Element size: 160-200px x 80-90px
Other patterns: See references/examples.md
Step 3: Generate Elements
For each component:
- Create shape with unique
id - Add
boundElementsreferencing text - Create text with
containerId - Choose color based on type
Color palettes: See references/colors.md
Step 4: Add Connections
For each relationship:
- Calculate source edge point
- Plan elbow route (avoid overlaps)
- Create arrow with
pointsarray - Match stroke color to destination type
Arrow patterns: See references/arrows.md
Step 5: Add Grouping (Optional)
For logical groupings:
- Large transparent rectangle with
strokeStyle: "dashed" - Standalone text label at top-left
Step 6: Validate and Write
Run validation before writing. Save to docs/ or user-specified path.
Validation checklist: See references/validation.md
Step 7: Export to PNG/SVG (Optional)
After writing the .excalidraw file, ask the user if they want PNG, SVG, or both exports.
Uses Playwright MCP tools and @excalidraw/utils to programmatically render the diagram — no manual upload to excalidraw.com needed.
Requires: Playwright MCP tools (browser_navigate, browser_run_code, browser_close).
Full export procedure: See references/export.md
Quick Arrow Reference
Straight down:
{ "points": [[0, 0], [0, 110]], "x": 590, "y": 290 }
L-shape (left then down):
{ "points": [[0, 0], [-325, 0], [-325, 125]], "x": 525, "y": 420 }
U-turn (callback):
{ "points": [[0, 0], [50, 0], [50, -125], [20, -125]], "x": 710, "y": 440 }
Arrow width/height = bounding box of points: ```
Установить excalidraw в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл excalidraw?
Generate architecture diagrams as .excalidraw files from codebase analysis, with optional PNG/SVG export. Use when the user asks to create architecture diagrams, system diagrams, visualize codebase structure, generate excalidraw files, export excalidraw diagrams to PNG or SVG, or convert .excalidraw files to image formats.
Как установить скилл excalidraw?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл excalidraw запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic