Agent skill

Excalidraw Generator

by luongnv89 in luongnv89/skills

Generate diagrams as valid Excalidraw JSON — flowcharts, architecture, ER diagrams, mind maps, sequence diagrams, wireframes, C4 models, and more.

MITAuto-check passedDevelopment

Install Excalidraw Generator

skills CLI
$ npx skills add luongnv89/skills --skill excalidraw-generator -a claude-code

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

GitHub CLI
$ gh skill install luongnv89/skills excalidraw-generator --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/luongnv89/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/diagram-generator/excalidraw-generator .claude/skills/excalidraw-generator && 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-generator
GitHub stars
131
Token cost
~2.6k tokens
SKILL.md length
1,373 words
Files
12 (incl. references)
Skills in repo
37
Repo updated
First seen
Licence
MIT

At a glance

Generate diagrams as valid Excalidraw JSON — flowcharts, architecture, ER diagrams, mind maps, sequence diagrams, wireframes, C4 models, and more.

  • Works in 4 steps: Understand → Propose → Generate → …
  • Draw.io/Mermaid output
  • SKILL.md covers When to Use, Environment Check, Repo Sync Before Edits… and Core Workflow, plus 7 more sections
  • Calls git

What it does

Excalidraw Generator is an agent skill from luongnv89/skills. Generate diagrams as valid Excalidraw JSON — flowcharts, architecture, ER diagrams, mind maps, sequence diagrams, wireframes, C4 models, and more. Don't use for draw.io/Mermaid output, slide decks, or pixel-perfect brand graphics.

Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 15 other files, including reference files (for example `agents/json-fixer.md`, `agents/json-generator.md` and `agents/json-validator.md`).

It sits in Development, covering Diagrams. It works with Excalidraw, draw.io, Mermaid and Git. The repository describes itself as: Supercharge your AI agents/bots with reusable skills. The licence is MIT.

When your agent uses it

  • Draw.io/Mermaid output
  • Pixel-perfect brand graphics

Example prompts

  • “/excalidraw-generator”

Workflow steps

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

  1. Understand
  2. Propose
  3. Generate
  4. Validate

What it can do on your machine

Read from SKILL.md and the folder at commit 891c720. 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

    Shell commands in SKILL.md call:

    • git

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

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    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 Generator loads about 2.6k tokens when it runs, and up to ~12k if it reads all its reference files. Until then it costs about 63 tokens; SKILL.md has 1,373 words of instructions outside code blocks.

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

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 luongnv89/skills at commit 891c720, republished under its MIT licence (© luongnv89). 1,373 words, ~2,582 tokens.

Download SKILL.mdSave it as .claude/skills/excalidraw-generator/SKILL.md (or your agent's skills folder). This skill also uses 11 other files; get the full folder from GitHub.
name
excalidraw-generator
description
Generate diagrams as valid Excalidraw JSON — flowcharts, architecture, ER diagrams, mind maps, sequence diagrams, wireframes, C4 models, and more. Don't use for draw.io/Mermaid output, slide decks, or pixel-perfect brand graphics.
license
MIT
effort
high
metadata.version
1.5.0
metadata.author
Luong NGUYEN <luongnv89@gmail.com>

Excalidraw Diagram Generator

Generate professional diagrams as valid Excalidraw JSON. Every request flows through four phases — Understand, Propose, Generate, Validate — before the file is written. The body stays lean to respect the agent's context budget; depth lives in references/.

Part of the diagram-generator suite. For precise, editable-in-draw.io output, use drawio-generator instead; the diagram-generator umbrella routes between the two.

When to Use

The frontmatter description sets triggers and exclusions. Output: a .excalidraw file, plus a companion .md only on request.

Environment Check

If the Agent tool is available, use subagents per Subagent Architecture for large diagrams; fresh-context validation avoids single-pass context overflow. Without it (e.g., Claude.ai), run every phase inline and self-review against the 10 checks.

Repo Sync Before Edits (mandatory)

Run this once: before reading an existing .excalidraw file (Iteration), otherwise before the Phase 4 write. The sync target is the output file's directory.

  1. Run repo="$(git -C "<output dir>" rev-parse --show-toplevel)". If it fails, skip the sync and record sync: skipped (not a git repo).
  2. Run git -C "$repo" remote get-url origin. If it fails, skip steps 3–7 and record sync: skipped (no origin).
  3. Run branch="$(git -C "$repo" rev-parse --abbrev-ref HEAD)". If it prints HEAD, skip steps 4–7 and record sync: skipped (detached HEAD).
  4. Run git -C "$repo" status --porcelain. If the output is empty, run git -C "$repo" fetch origin && git -C "$repo" pull --rebase origin "$branch".
  5. If the output is not empty, run git -C "$repo" stash push -u -m "excalidraw-generator pre-sync", then the same fetch and pull, then git -C "$repo" stash pop.
  6. If fetch or pull fails before a rebase starts (network, authentication, or a missing remote branch), do not retry. Run git -C "$repo" stash pop when step 5 stashed, record sync: failed (<first error line>), and continue. The Final Report repeats it on the Uncertainty: line.
  7. If the rebase conflicts, run git -C "$repo" rebase --abort, then git -C "$repo" stash pop when step 5 stashed. If the stash pop conflicts, leave the stash in place. In both cases do not write the file; stop and ask the user how to continue. With no answer, the status is BLOCKED.

This skill commits nothing.

Core Workflow

Phase 1: Understand

Confirm what to draw before generating anything.

  • Clear request — restate it in one sentence and propose a visualization type.
  • Ambiguous input — ask about entities, relationships, flow direction, style.
  • Code, data, schemas, or files — extract structure (SQL → ER, steps → flowchart; full mapping in references/diagram-types.md).
Phase 2: Propose

Present the numbered plan below.

  • If the request names the diagram type and every element, or the user says "just do it", state the defaults you chose in one line and proceed to Phase 3. Defaults: hand-drawn, roughness: 1, Virgil font (fontFamily: 1), best-fit layout.
  • Otherwise, wait for the user to confirm or change the plan. Do not generate JSON before the user answers.
  1. Diagram type — catalogue in references/diagram-types.md; offer numbered alternatives if several fit.
  2. Key elements — list the nodes and shapes.
  3. Layout — e.g. (A) Top-to-bottom, (B) Left-to-right, (C) Radial.
  4. Style — rendering style (hand-drawn, sketchy, clean) and a color scheme that fits the purpose; variants in references/style-and-iteration.md. No fixed palette.
  5. Estimated complexity — small (<10 elements), medium (10–30), large (>30).
Phase 3: Generate

Compose the .excalidraw document in memory (raw JSON, no wrapper). Phase 4 writes the file.

Output path: use the path the user gave. Otherwise use a descriptive kebab-case name ending in .excalidraw (auth-flow.excalidraw) in the current working directory. If that file exists and the user did not ask to update it, confirm with the user before you overwrite it; to update it, follow Iteration.

Start from the envelope in references/excalidraw-format.md → Top-Level Structure (type, version, source, elements, appState, files); set theme and viewBackgroundColor to suit the diagram. That file holds the full element schema and field defaults.

Critical rules every element must follow:

  • Include every required field from references/validation-checks.md → Check 2.
  • Use descriptive kebab-case IDs (node-api-gateway).
  • Size each container to fit its bound text (Check 10); grow the shape, never shrink the text below fontSize: 16.
  • Bind text and arrows in both directions (containerId ↔ boundElements, startBinding/endBinding ↔ boundElements).

Embedding in Markdown: only when asked, write the .excalidraw file first, then a companion .md holding the same JSON in a fenced block tagged excalidraw.

Phase 4: Validate

Run all 10 checks on the in-memory JSON before writing the file. See references/validation-checks.md for checks, the Check 10 formula, and fixes.

  1. Run the 10 checks. If all pass, run Repo Sync, write the file, and give the Final Report with status COMPLETE.
  2. If a check fails, fix it and re-run all 10 checks. A failure of check 1 or 8 needs a Phase 3 regeneration, not a patch. Stop after 3 fix cycles.
  3. If checks 1–6 pass but a check from 7–10 still fails after cycle 3, run Repo Sync, write the file, and report PARTIAL with the failed check numbers.
  4. If a check from 1–6 still fails after cycle 3, do not write the file. Report BLOCKED with the failed checks.

The 10 checks: (1) JSON envelope, (2) required fields, (3) unique IDs, (4) text bindings, (5) arrow bindings, (6) arrow points, (7) overlaps, (8) semantic completeness, (9) readable text, (10) shape-to-text fit — the most common failure.


Show full SKILL.md (492 more words)Show less

Expected Output

For "draw a flowchart of the user login process": a login-flow.excalidraw file written to disk (raw JSON), then the Final Report. A bound shape-and-label pair is in references/excalidraw-format.md → Minimal bound-text example.

Final Report

End every run, stops included, with this compact text block. A Phase 1–2 question that awaits the user's answer does not end the run; if the user ends the run without answering, report BLOCKED. Status is COMPLETE (file written, 10/10 checks pass), PARTIAL (file written, a check from 7–10 failed), or BLOCKED (no file written). Fill rules, PARTIAL and BLOCKED examples, and reader checks: references/final-report.md. Example:

Result: COMPLETE. Wrote login-flow.excalidraw (6 shapes, 6 text labels, 5 arrows).
Evidence: /abs/path/login-flow.excalidraw. Validation 10/10 checks passed (inline, 1 cycle). sync: skipped (not a git repo)
Uncertainty: Rendering in Excalidraw untested. Assumed top-to-bottom flow; the request gave no direction.
Decision: No approval needed.

Acceptance Criteria

Verify these for every run:

  • A .excalidraw file is written to disk and its JSON parses with top-level type, version, elements, appState, files, unless the status is BLOCKED.
  • Checks 1–7, 9 and 10 in references/validation-checks.md pass, or the Final Report lists each failed check.
  • Every entity and relationship in the user's request is represented in the output (check 8).
  • The Final Report opens with Result: and its status, and has Evidence:, Uncertainty: and Decision: lines. Evidence: cites only checks that ran; 10/10 appears only when all 10 passed.
  • The Final Report passes the four reader checks in references/final-report.md (result findable, facts and assumptions separated, claims traceable, next decision clear). Without a human reviewer's answer, human understanding is unconfirmed.

Edge Cases

  • Empty or vague input ("make a diagram"): ask targeted clarifying questions before generating — never produce a placeholder.
  • Large diagram (>30 elements): run the Subagent Architecture loop; cap at 3 fix cycles.
  • Very large diagram (>50 elements): warn that one canvas will be crowded; offer frames, several files, or an overview first, and wait for the choice.
  • Ambiguous relationships: ask for direction and cardinality before generating.
  • Unsupported diagram type (e.g., a chart that needs real axis scales): explain the limitation and propose the closest supported type from references/diagram-types.md.
  • User supplies an existing .excalidraw file: follow Iteration — never regenerate it from scratch.

More edge cases: references/style-and-iteration.md.


Step Completion Reports

After each phase, print a short status report with that phase's checks; the template and per-phase checks are in references/step-reports.md. The Validate report precedes the Final Report; it does not replace it.

Iteration

When iterating on an existing diagram, read the file and modify the JSON in memory. Preserve element IDs that haven't changed (request patterns: references/style-and-iteration.md → Iteration). Run Phase 4 on the result before rewriting the file; a BLOCKED result leaves the original file untouched.


Subagent Architecture

Large diagrams (>30 elements) run this loop; others run inline. Detail: references/style-and-iteration.md → Subagent Architecture.

  1. Generate — spawn agents/json-generator.md with the confirmed plan.
  2. Validate — spawn agents/json-validator.md; it reports PASS/FAIL for all 10 checks.
  3. Fix — on NEEDS_FIX, spawn agents/json-fixer.md, which patches and never regenerates. If it returns ready_for_validation: false (check 1 or 8), re-spawn the generator instead. Each fix or regeneration is one cycle; stop at 3.
  4. The main agent applies Phase 4 steps 1–4 to the returned JSON and last validator report.

© luongnv89, 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 11 other files (references) in skills/diagram-generator/excalidraw-generator of luongnv89/skills.

  • SKILL.md
  • agents/json-fixer.md
  • agents/json-generator.md
  • agents/json-validator.md
  • docs/README.md
  • evals/evals.json
  • references/diagram-types.md
  • references/excalidraw-format.md
  • references/final-report.md
  • references/step-reports.md
  • references/style-and-iteration.md
  • references/validation-checks.md

Open the folder on GitHubat commit 891c720

Compare with similar skills

Excalidraw Generator 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 Generator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Excalidraw Generator this skillluongnv89/skills131—~2.6kAutomated safety check: PassMIT
Diagram Designcathrynlavery/diagram-design47k1 repos~7.5kAutomated safety check: PassMIT
System Design Artifact IntakeHoangNguyen0403/agent-skills-standard571—~1.3kAutomated safety check: PassMIT
Draw.io Diagram StudioAgents365-ai/drawio-skill10k—~2.4kAutomated safety check: NotesMIT
Excalidraw Skillyctimlin/mcp_excalidraw2.5k—~4.6kAutomated safety check: PassMIT
Mermaid Diagramsjjmartres/opencode1336 repos~1.9kAutomated safety check: PassMIT

Similar skills

  • Diagram Design

    cathrynlavery/diagram-design

    Creates branded diagrams, from architecture, flowchart and sequence to charts and maps, as self-contained HTML with inline SVG, with import from draw.io, Mermaid and Excalidraw.

    47k GitHub starsUsed in 1 repo~7.5k tokens
    DevelopmentAuto-check passed
  • System Design Artifact Intake

    HoangNguyen0403/agent-skills-standard

    Ingest a provided design artifact - screenshot, drawio, Mermaid, PlantUML, Excalidraw, slides, PDF, or IaC - into a reviewable fact sheet.

    571 GitHub stars~1.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Draw.io Diagram Studio

    Agents365-ai/drawio-skill

    Creates and edits editable draw.io diagrams from descriptions, code, infrastructure files, SQL and API schemas, with sync, review, test and export tools.

    10k GitHub stars~2.4k tokensUpdated 7 days ago
    DevelopmentAuto-check: notes
  • Excalidraw Skill

    yctimlin/mcp_excalidraw

    Excalidraw canvas toolkit for creating, editing, and refining diagrams on a live canvas.

    2.5k GitHub stars~4.6k tokensUpdated 4 days ago
    DevelopmentAuto-check passed
  • Mermaid Diagrams

    jjmartres/opencode

    Helps an agent pick the right Mermaid diagram type and write the syntax for class, sequence, flow, ER, C4, state and other software diagrams.

    133 GitHub starsUsed in 6 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Drawio Skill

    yuanchen-home/cumcm-step-review

    A skill your agent uses when the user requests diagrams, flowcharts, architecture diagrams, ER diagrams, UML / sequence / class diagrams, SysML / MBSE diagrams (block definition, internal block…

    319 GitHub stars~11k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed

More from luongnv89/skills

All 37 skills in this repo
  • Dont Make Me Think

    luongnv89/skills

    Review UI usability using Steve Krug's principles and produce a scannable report.

    131 GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Herdr Agent

    luongnv89/skills

    Manage AI agent fleets in Herdr: tile root + sub-agents in one tab, start/prompt/wait/read/monitor via the herdr agent CLI, steer any pane; help lists every operation.

    131 GitHub stars~4.8k tokensUpdated today
    Auto-check passed
  • Ollama Optimizer

    luongnv89/skills

    Optimize Ollama configuration for the current machine's hardware.

    131 GitHub stars~4.1k tokensUpdated today
    Auto-check: notes
  • Security Setup

    luongnv89/skills

    Install local-first security hardening: pre-commit secret detection, offline dependency scans, static analysis, reports, and gated free CI.

    131 GitHub stars~4.5k tokensUpdated today
    Auto-check passed
  • SEO AI Optimizer

    luongnv89/skills

    Audit and optimize websites for technical SEO, content SEO, and AI bot accessibility.

    131 GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Tasks Generator

    luongnv89/skills

    Generate sprint-based development tasks from a PRD. An agent skill from luongnv89/skills.

    131 GitHub stars~3.8k tokensUpdated today
    Auto-check passed

Categories

Questions about Excalidraw Generator

What does Excalidraw Generator do?

Generate diagrams as valid Excalidraw JSON — flowcharts, architecture, ER diagrams, mind maps, sequence diagrams, wireframes, C4 models, and more. Excalidraw Generator is an agent skill from luongnv89/skills. Generate diagrams as valid Excalidraw JSON — flowcharts, architecture, ER diagrams, mind maps, sequence diagrams, wireframes, C4 models, and more.

When should I use Excalidraw Generator?

Excalidraw Generator fits situations like: draw.io/Mermaid output; pixel-perfect brand graphics.

How do I install Excalidraw Generator in Claude Code?

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

How do I install Excalidraw Generator in Codex?

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

Can I use Excalidraw Generator 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 luongnv89/skills --skill excalidraw-generator -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-generator, .gemini/skills/excalidraw-generator, .github/skills/excalidraw-generator and .opencode/skills/excalidraw-generator in your project.

What does Excalidraw Generator need to run?

Going by SKILL.md and its folder, Excalidraw Generator needs the command-line tools its instructions call (git).

Does Excalidraw Generator access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Excalidraw Generator 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 Generator use?

Excalidraw Generator is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Excalidraw Generator use?

About 2.6k tokens (SKILL.md is roughly 10k 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 9.6k tokens, read only when the agent opens those files.

What are the alternatives to Excalidraw Generator?

Skills that share tags, products or a category with Excalidraw Generator: Diagram Design (cathrynlavery/diagram-design, 47k stars), System Design Artifact Intake (HoangNguyen0403/agent-skills-standard, 571 stars), Draw.io Diagram Studio (Agents365-ai/drawio-skill, 10k stars) and Excalidraw Skill (yctimlin/mcp_excalidraw, 2.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Excalidraw Generator?

luongnv89 (a GitHub user) maintains it in luongnv89/skills, which has 131 GitHub stars. The repository holds 37 skills in this directory. The repository was last updated on October 9, 2026.

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