Agent skill

Excalidraw Architecture Diagrams

by ooiyeefei in ooiyeefei/ccc

Generates architecture diagrams as .excalidraw files by analyzing a codebase, with optional PNG or SVG export through Playwright.

MITAuto-check passedDevelopment

Install Excalidraw Architecture Diagrams

skills CLI
$ npx skills add ooiyeefei/ccc --skill excalidraw -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ooiyeefei/ccc excalidraw --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ooiyeefei/ccc.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/excalidraw .claude/skills/excalidraw && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
excalidraw
GitHub stars
494
Token cost
~2k tokens
SKILL.md length
680 words
Files
8 (incl. references)
Skills in repo
22
Repo updated
First seen
Licence
MIT

At a glance

Generates architecture diagrams as .excalidraw files by analyzing a codebase, with optional PNG or SVG export through Playwright.

  • Works in 11 steps: NEVER Use Diamond Shapes → Labels Require TWO Elements → Elbow Arrows Need Three Properties → …
  • Generating an architecture diagram for a codebase
  • SKILL.md covers Quick Start, Critical Rules, Element Types and Workflow, plus 6 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

The agent analyzes a codebase in any language or framework, picks out components, services, databases and APIs, maps their relationships and data flows, and writes valid .excalidraw JSON with generated ids and labels. It can then export PNG or SVG with Playwright. Nothing needs to exist beforehand: no earlier diagrams, Terraform or particular file types. Discovery hints cover monorepos with workspace configs and microservices with docker-compose or Kubernetes manifests.

Four rules address quirks of hand-written Excalidraw JSON. Never use diamond shapes, because their arrow connections break, so use styled rectangles. Labels need two elements, a shape with a bound-elements reference plus a text element. Elbow arrows need three properties for clean right angles, and arrows must start and end at shape edges, not centers. Reference files cover arrows, colors, examples, export, the JSON format and validation.

When your agent uses it

  • Generating an architecture diagram for a codebase
  • Visualizing services, databases and data flows as an editable Excalidraw file
  • Exporting an existing .excalidraw file to PNG or SVG

Example prompts

  • “Generate an architecture diagram for this project.”
  • “Create an excalidraw diagram of the system and export it as a PNG.”
  • “Convert docs/system.excalidraw to SVG.”

Requirements

  • Playwright for PNG or SVG export

Workflow steps

11 steps, taken from the step headings in SKILL.md.

  1. NEVER Use Diamond Shapes
  2. Labels Require TWO Elements
  3. Elbow Arrows Need Three Properties
  4. Arrow Edge Calculations
  5. Analyze Codebase
  6. Plan Layout
  7. Generate Elements
  8. Add Connections
  9. Add Grouping (Optional)
  10. Validate and Write
  11. Export to PNG/SVG (Optional)

What it can do on your machine

Read from SKILL.md and the folder at commit c0fd926. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • excalidraw.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Excalidraw Architecture Diagrams loads about 2k tokens when it runs, and up to ~10k if it reads all its reference files. Until then it costs about 84 tokens; SKILL.md has 680 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~84
When it runs · the whole SKILL.md, loaded when a task matches
~2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~10k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ooiyeefei/ccc at commit c0fd926, republished under its MIT licence (© ooiyeefei). 680 words, ~1,956 tokens.

Download SKILL.mdSave it as .claude/skills/excalidraw/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
excalidraw
description
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 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:

  1. Analyze the codebase (any language/framework)
  2. Identify components, services, databases, APIs
  3. Map relationships and data flows
  4. Generate valid .excalidraw JSON with dynamic IDs and labels
  5. 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 MeaningRectangle Style
Orchestrator/HubCoral (#ffa8a8/#c92a2a) + strokeWidth: 3
Decision PointOrange (#ffd8a8/#e8590c) + dashed stroke
2. Labels Require TWO Elements

The label property does NOT work in raw JSON. Every labeled shape needs:

json
// 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):

json
{
  "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:

EdgeFormula
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

TypeUse For
rectangleServices, databases, containers, orchestrators
ellipseUsers, external systems, start/end points
textLabels inside shapes, titles, annotations
arrowData flow, connections, dependencies
lineGrouping boundaries, separators

Full JSON format: See references/json-format.md


Workflow

Step 1: Analyze Codebase

Discover components by looking for:

Codebase TypeWhat to Look For
Monorepopackages/*/package.json, workspace configs
Microservicesdocker-compose.yml, k8s manifests
IaCTerraform/Pulumi resource definitions
Backend APIRoute definitions, controllers, DB models
FrontendComponent hierarchy, API calls

Use tools:

  • Glob → **/package.json, **/Dockerfile, **/*.tf
  • Grep → app.get, @Controller, CREATE TABLE
  • Read → 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:

  1. Create shape with unique id
  2. Add boundElements referencing text
  3. Create text with containerId
  4. Choose color based on type

Color palettes: See references/colors.md

Step 4: Add Connections

For each relationship:

  1. Calculate source edge point
  2. Plan elbow route (avoid overlaps)
  3. Create arrow with points array
  4. 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

Show full SKILL.md (292 more words)Show less
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:

json
{ "points": [[0, 0], [0, 110]], "x": 590, "y": 290 }

L-shape (left then down):

json
{ "points": [[0, 0], [-325, 0], [-325, 125]], "x": 525, "y": 420 }

U-turn (callback):

json
{ "points": [[0, 0], [50, 0], [50, -125], [20, -125]], "x": 710, "y": 440 }

Arrow width/height = bounding box of points:

points [[0,0], [-440,0], [-440,70]] → width=440, height=70

Multiple arrows from same edge - stagger positions:

5 arrows: 20%, 35%, 50%, 65%, 80% across edge width

Default Color Palette

ComponentBackgroundStroke
Frontend#a5d8ff#1971c2
Backend/API#d0bfff#7048e8
Database#b2f2bb#2f9e44
Storage#ffec99#f08c00
AI/ML#e599f7#9c36b5
External APIs#ffc9c9#e03131
Orchestration#ffa8a8#c92a2a
Message Queue#fff3bf#fab005
Cache#ffe8cc#fd7e14
Users#e7f5ff#1971c2

Cloud-specific palettes: See references/colors.md


Quick Validation Checklist

Before writing file:

  • Every shape with label has boundElements + text element
  • Text elements have containerId matching shape
  • Multi-point arrows have elbowed: true, roundness: null
  • Arrow x,y = source shape edge point
  • Arrow final point offset reaches target edge
  • No diamond shapes
  • No duplicate IDs

Full validation algorithm: See references/validation.md


Common Issues

IssueFix
Labels don't appearUse TWO elements (shape + text), not label property
Arrows curvedAdd elbowed: true, roundness: null, roughness: 0
Arrows floatingCalculate x,y from shape edge, not center
Arrows overlappingStagger start positions across edge

Detailed bug fixes: See references/validation.md


Reference Files

FileContents
references/json-format.mdElement types, required properties, text bindings
references/arrows.mdRouting algorithm, patterns, bindings, staggering
references/colors.mdDefault, AWS, Azure, GCP, K8s palettes
references/examples.mdComplete JSON examples, layout patterns
references/validation.mdChecklists, validation algorithm, bug fixes
references/export.mdPNG/SVG export procedure via Playwright

Output

  • Location: docs/architecture/ or user-specified
  • Filename: Descriptive, e.g., system-architecture.excalidraw
  • Exports (optional): system-architecture.svg and/or system-architecture.png in same directory
  • Testing: Open .excalidraw in https://excalidraw.com or VS Code extension; .svg and .png can be viewed directly or embedded in documentation

© ooiyeefei, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 7 other files (references) in skills/excalidraw of ooiyeefei/ccc.

  • SKILL.md
  • README.md
  • references/arrows.md
  • references/colors.md
  • references/examples.md
  • references/export.md
  • references/json-format.md
  • references/validation.md

Open the folder on GitHubat commit c0fd926

Compare with similar skills

Excalidraw Architecture Diagrams next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Excalidraw Architecture Diagrams compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Excalidraw Architecture Diagrams this skillooiyeefei/ccc494—~2kAutomated safety check: PassMIT
Excalidraw Diagraminfometa/workbuddyskills346—~951Automated safety check: NotesNone
Whiteboard Videotrustfuture/simon-skills374—~1.8kAutomated safety check: NotesMIT
Whiteboard Video Factorywwwzhouhui/skills_collection283—~4.9kAutomated safety check: NotesNone
SVG Diagram GeneratorJimLiu/baoyu-skills26k1 repos~3.1kAutomated safety check: PassMIT
Excalidraw Diagram Studiotech-leads-club/agent-skills7k—~3.6kAutomated safety check: PassCC-BY-4.0

Similar skills

  • Excalidraw Diagram

    infometa/workbuddyskills

    Create Excalidraw diagrams for workflows, architectures, protocols, concepts, and system explanations.

    346 GitHub stars~951 tokensUpdated yesterday
    DevelopmentAuto-check: notes
  • Whiteboard Video

    trustfuture/simon-skills

    手绘白板风"边画边讲"讲解视频出片 skill(Excalidraw 风格逐笔动画 + 火山引擎配音 + 烧录字幕 + 品牌水印与片尾卡 + 横竖两张封面 + 各平台发布文案)。当用户说"做一期白板视频 / 边画边讲 / 手绘讲解视频 / 用 excalidraw 做视频 / whiteboard video",或要在本仓库里新建一期、改场景、换贴纸或真实…

    374 GitHub stars~1.8k tokensUpdated 15 days ago
    Media & CreativeAuto-check: notes
  • Whiteboard Video Factory

    wwwzhouhui/skills_collection

    手绘白板风"边画边讲"讲解视频出片 skill(Excalidraw 逐笔动画 + 火山/小米/edge-tts 配音 + 烧录字幕并逐段跟读高亮 + 品牌水印与片尾卡 + 三张封面 4:3 / 3:4 / 9:16 + 各平台发布文案:视频号 / 小红书 / 抖音 / B 站 /…

    283 GitHub stars~4.9k tokensUpdated 4 days ago
    Media & CreativeAuto-check: notes
  • SVG Diagram Generator

    JimLiu/baoyu-skills

    Creates standalone dark-themed SVG diagrams, including architecture, flowchart, sequence, structural, mind map, timeline and state machine types.

    26k GitHub starsUsed in 1 repo~3.1k tokens
    DevelopmentAuto-check passed
  • Excalidraw Diagram Studio

    tech-leads-club/agent-skills

    Generates Excalidraw diagram files from plain descriptions, choosing among flowcharts, mind maps, architecture, swimlane, class, sequence and ER diagrams.

    7k GitHub stars~3.6k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Archscribe

    lazypay/Archscribe

    Create premium hand-drawn architecture, workflow, and swimlane diagrams in a dark neon or light paper style, with editable Excalidraw sources, PNG/SVG previews, animated GIF/MP4 output, and…

    359 GitHub stars~1.9k tokensUpdated 2 mo ago
    DevelopmentAuto-check passed

More from ooiyeefei/ccc

All 22 skills in this repo
  • Turns meeting recordings into notes with a chain of custody from audio to claim, auditing transcripts for gaps and low-confidence numbers and names.

    494 GitHub stars~876 tokensUpdated 2 mo ago
    Auto-check passed
  • Builds marketing and explainer videos in Remotion from rendered scenes, with one real product capture as proof, and cuts them for each platform's formats.

    494 GitHub stars~2.9k tokensUpdated 2 mo ago
    Auto-check passed
  • Records a sharp product demo video by driving the real app with a browser agent, from storyboard to Xvfb capture and a narration script synced to the frames.

    494 GitHub stars~2.8k tokensUpdated 2 mo ago
    Auto-check passed
  • Sets up GA4 on a website and wires one real conversion event end to end, verified in DebugView before any money goes into ads.

    494 GitHub stars~2.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Builds or rewrites SaaS landing pages by researching the real product, positioning it against alternatives and writing buyer-focused copy, then implementing it in the codebase.

    494 GitHub stars~1.8k tokensUpdated 2 mo ago
    Auto-check passed
  • Meta Pixel Setup

    ooiyeefei/ccc

    Walks a site owner through installing the Meta Pixel, firing one conversion event and verifying it with the Pixel Helper before any ads run.

    494 GitHub stars~2.4k tokensUpdated 2 mo ago
    Auto-check passed

Questions about Excalidraw Architecture Diagrams

What does Excalidraw Architecture Diagrams do?

Generates architecture diagrams as .excalidraw files by analyzing a codebase, with optional PNG or SVG export through Playwright. excalidraw JSON with generated ids and labels. It can then export PNG or SVG with Playwright.

When should I use Excalidraw Architecture Diagrams?

Excalidraw Architecture Diagrams fits situations like: generating an architecture diagram for a codebase; visualizing services, databases and data flows as an editable Excalidraw file; exporting an existing .excalidraw file to PNG or SVG.

How do I install Excalidraw Architecture Diagrams in Claude Code?

Run `npx skills add ooiyeefei/ccc --skill excalidraw -a claude-code`. Or copy the skill folder (skills/excalidraw in ooiyeefei/ccc) into .claude/skills/excalidraw in your project. Claude Code loads it when a task matches its description.

How do I install Excalidraw Architecture Diagrams in Codex?

Run `npx skills add ooiyeefei/ccc --skill excalidraw -a codex`. Or copy the skill folder (skills/excalidraw in ooiyeefei/ccc) into .agents/skills/excalidraw in your project. Codex loads it when a task matches its description.

Can I use Excalidraw Architecture Diagrams in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ooiyeefei/ccc --skill excalidraw -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/excalidraw, .gemini/skills/excalidraw, .github/skills/excalidraw and .opencode/skills/excalidraw in your project.

What does Excalidraw Architecture Diagrams need to run?

SKILL.md names no scripts, command-line tools or credentials: Excalidraw Architecture Diagrams is instructions for the agent only. Our summary lists: Playwright for PNG or SVG export.

Does Excalidraw Architecture Diagrams access the network?

SKILL.md names 1 domain. As links in the text: excalidraw.com. This is read from the text; nothing was executed.

Is Excalidraw Architecture Diagrams safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Excalidraw Architecture Diagrams use?

Excalidraw Architecture Diagrams is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Excalidraw Architecture Diagrams use?

About 2k tokens (SKILL.md is roughly 7.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 8.2k tokens, read only when the agent opens those files.

What are the alternatives to Excalidraw Architecture Diagrams?

Skills that share tags, products or a category with Excalidraw Architecture Diagrams: Excalidraw Diagram (infometa/workbuddyskills, 346 stars), Whiteboard Video (trustfuture/simon-skills, 374 stars), Whiteboard Video Factory (wwwzhouhui/skills_collection, 283 stars) and SVG Diagram Generator (JimLiu/baoyu-skills, 26k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Excalidraw Architecture Diagrams?

ooiyeefei (a GitHub user) maintains it in ooiyeefei/ccc, which has 494 GitHub stars. The repository holds 22 skills in this directory. The repository was last updated on July 29, 2026.

Source: ooiyeefei/ccc on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.