by sparklabx
Teach your AI to draw correct, beautiful draw.io diagrams — declarative layout engine, ground-truth stencils, structural validator, vision self-check. AWS · Azure · GCP · Databricks · BPMN. Zero dependencies.
# Add to your Claude Code skills
git clone https://github.com/sparklabx/drawio-ai-kitGuides for using ai agents skills like drawio-ai-kit.
drawio-ai-kit is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by sparklabx. Teach your AI to draw correct, beautiful draw.io diagrams — declarative layout engine, ground-truth stencils, structural validator, vision self-check. AWS · Azure · GCP · Databricks · BPMN. Zero dependencies. It has 438 GitHub stars.
drawio-ai-kit's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/sparklabx/drawio-ai-kit" and add it to your Claude Code skills directory (see the Installation section above).
drawio-ai-kit is primarily written in JavaScript. It is open-source under sparklabx on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh drawio-ai-kit against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
An orchestration and validation framework enabling AI agents to generate structurally precise and aesthetically standardized draw.io diagrams, optimized for AWS, Azure & GCP architectures.
It mitigates common AI agent hallucinations (such as generating non-existent stencil IDs that result in empty shapes) using three key components:
mxgraph.aws4.*) to their respective taxonomies and canonical color palettes.rules/principles.md).Exposed to the AI via the zero-dependency drawio-ai CLI.
One diagram per platform — all generated end-to-end by the kit: no hand-placed coordinates, real stencils, validated, vision-checked. Full set in examples/.
Full install — the CLI plus all 5 Domain Skills (AWS, Azure, GCP, Databricks, BPMN) — in one line:
npm i -g github:sparklabx/drawio-ai-kit && npx skills add sparklabx/drawio-ai-kit
Restart your agent, then try: "draw an AWS 3-tier web app".
The first command puts the drawio-ai binary on PATH (installs straight from
GitHub — not yet on the npm registry; see INSTALL.md to pin a version
or install from a clone). The second registers the Domain Skills with your agent
(the skills CLI auto-detects Claude Code, Codex, Gemini CLI, …) — without it the
agent never picks the kit up on its own.
npx skills add sparklabx/drawio-ai-kit --skill drawio-aws (--list previews all 5)drawio-ai render (the vision self-check); Graphviz enables vendor/autolayout.py for large graphs. Details in INSTALL.md.Short answer: yes — and you don't have to take my word for it.
postinstall (or any lifecycle) hooks — nothing runs on npm install. Zero runtime dependencies. No sudo, no curl | bash, no remote code.@modelcontextprotocol/sdk) was removed at 1.0.0. The package is now fully self-contained.npm uninstall -g drawio-ai-kit # remove the CLI
npx skills remove drawio-aws # remove a domain skill (repeat for each)
To report a security issue, see SECURITY.md.
Define a diagram topology (pipeline/hierarchy/network/hubspoke/hybrid/mesh/sequence), declare the nested structure, and the layout engine programmatically computes spatial coordinates (x/y/w/h) — frames auto-size to fit their children, while rows and columns auto-space. You define the logical topology, not raw pixels.
import { Diagram } from "./src/builder.mjs";
import { group, icon, box, renderTree } from "./src/layout-engine.mjs";
const d = new Diagram("network");
const tree = group("region", "group_region", "Region", { dir: "row" }, [
group("vpc", "group_vpc", "VPC", { dir: "col" }, [
icon("alb", "elastic_load_balancing", "ALB"),
icon("ec2", "ec2", "EC2"),
]),
]);
renderTree(d, tree); // engine lays everything out + sizes the page
d.title("My VPC");
d.link("alb", "ec2"); // edges by id; router picks straight/corridor
const res = d.validate(); // names real? colors/nesting/labels clean?
// d.mxfile("My VPC") → write to .drawio, export PNG, then vision self-check
Icon names are retrieved from drawio-ai search to prevent name fabrication; edge routing, container sizing, alignment, and contextual corner styles are dynamically computed. The AI agent defines the logical layout and iterates via a render-analyze-rectify loop (vision-based self-correction). Example: examples/aws/build_mesh.mjs (zero manual coordinates).
At 1.0.0 the MCP server and bespoke installer were removed. To migrate:
claude mcp add ... mcp-server.mjs to npm i -g github:sparklabx/drawio-ai-kit.drawio-cloud-architect skill with the 5 thin Domain Skills — all at once with npx skills add sparklabx/drawio-ai-kit, or per domain with --skill drawio-aws etc.drawio-ai render → PNG → Read.npm uninstall -g drawio-ai-kit + remove each skill via the skills tooling.examples/)Each file builds one common architecture via the layout engine (zero hardcoded coordinates) — copy one as a starting point. Examples are organized into domain subfolders — see examples/README.md for the full index. Run any with node examples/<dir>/<file> → writes to out/*.drawio.
examples/aws/
| Example | Type | Architecture |
|---|---|---|
build_pipeline.mjs |
pipeline | Layered data analytics pipeline (ingest → process → store → serve) + cross-cutting band |
build_landingzone.mjs |
hierarchy | AWS Landing Zone / Control Tower org & OUs |
build_vpc.mjs |
network | VPC Multi-AZ 3-tier (ALB spanning AZs) |
build_vpc_routing.mjs |
network | Subnets + route tables + VPC Endpoint (Gateway) → S3 |
build_vpc_eks.mjs |
network | VPC with Bastion, NAT, EKS, Auto Scaling worker nodes |
build_vpc_efs.mjs |
network | VPC with Amazon EFS (a mount target per AZ) |
build_web3tier.mjs |
network | 3-tier web app (Edge → Web → App → Data) |
build_eventdriven.mjs |
hubspoke | Serverless event bus (EventBridge hub → consumers) |
build_serverless.mjs |
sequence | Serverless web app, numbered request walkthrough |
build_hybrid.mjs |
hybrid | On-prem ↔ AWS over Direct Connect + VPN, mirrored DR |
build_mesh.mjs |
mesh | Multi-account connectivity / service mesh |
build_iam_accounts.mjs |
hierarchy | Multi-account IAM + cross-account assume-role |
examples/azure/ · gcp/ · databricks/ · multicloud/ · bpmn/
| Example | Type | Architecture |
|---|---|---|
azure/build_azure_vnet.mjs |
network | Azure N-tier: Subscription → Resource Group → VNet → Subnet tiers |
azure/build_azure_hub_spoke_lz.mjs |
network | CAF hub-spoke landing zone (Management Groups, hub + spoke VNets, reserved subnets, peering, private endpoints) |
gcp/build_gcp_vpc.mjs |
network | GCP global VPC across two regions (Project → global VPC → regional Subnets) |
gcp/build_gcp_shared_vpc_landing_zone.mjs |
network | Shared VPC landing zone (host/service projects, regional Cloud Router/NAT, Interconnect, PSC, VPC-SC) |
databricks/build_lakehouse.mjs |
pipeline | Databricks lakehouse medallion (Bronze/Silver/Gold) + Unity Catalog |
databricks/build_platform.mjs |
hybrid | Databricks control-plane vs data-plane deployment topology |
databricks/build_data_intelligence_platform.mjs |
pipeline | Databricks Data Intelligence Platform reference (signature bands, medallion, foundation) |
databricks/build_mlops.mjs |
pipeline | Databricks MLOps — Git provider + Dev/Staging/Prod workspaces + Unity Catalog + Lakehouse |
multicloud/build_multicloud.mjs |
hybrid | On-prem + AWS + Azure composed through a neutral interconnect |
bpmn/build_bpmn.mjs |
bpmn | BPMN swimlane process (pool → lanes × phases) |
.nvmrc pins the current LTS) — orchestration and validation layer: CLI and validator (src/). Supported runtimes include Node 20, 22 (LTS), or 24..python-version) — data ingestion and compilation pipeline: catalog generator + icon-pack builder (scripts/build_pack.py, stdlib only).Install the dependencies:
nvm install --lts && nvm use --lts # or: brew install node
brew install python@3.11 # then: python3.11 --version
| Command | Purpose |
|---|---|
search |
Find a stencil by keyword/category → returns the exact name + ready-to-paste draw.io style (verbatim from the index: real names, official colors, connection points). |
style |
Get the full style for one stencil by exact name. |
validate |
Lint XML: unknown stencils, dangling edges, missing aspect=fixed, recolored AWS icons, broken AWS group nesting, geometry (overlap / child spills its frame / stacked arrowheads), plus an aesthetic audit (font/palette/fan-out/icon-size). |
audit |
Aesthetic audit only (font/palette/fan-out/icon-size). |
render |
Render the XML to PNG (drawio-ai render <file> -o out.png). Needs the draw.io desktop CLI; set DRAWIO_CLI to override the path. |
logo |
Logo for non-AWS brands (AI/LLM + some) as an image style, via vendor/aiicons.py |