关键字 · DIAGRAM
stack-diagram: describe your stack in one sentence and get an architecture diagram with official logos
Open-source skill: say what your stack is in one sentence and Claude Code, Codex or Cursor draws an architecture diagram with official logos, light and dark.
Want an architecture diagram of your project, without dragging boxes around a drawing tool and hunting for logos? stack-diagram is a skill for coding agents: describe your stack in a sentence and it draws an architecture diagram with official logos.
For example: "Diagram our stack: Next.js and a Hono API on Vercel. Postgres on Neon, auth with Clerk, payments with Stripe. GitHub Actions deploys." It draws all of that for you. It's open source (MIT license), made by caru-ini, with around 2,500 stars on GitHub.
01What you get
- Official logos, fetched for you: from svgl, then devicon, then gilbarbara/logos, or the brand's own repository. AWS, Google Cloud, Azure and Kubernetes get their own official icons.
- No arrows through text: lines are routed around labels, and the agent renders the diagram and checks it before handing it over.
- The format you need: a self-contained HTML file (the default), PNG, a dependency-free React component, or an Artifact.
- Light and dark: every diagram is rendered in both themes, and tiles stay white so logos keep their own colors.
- Not just clouds: it also draws dev tooling (like pnpm, Turborepo and Vitest) and AI apps (like a vector database plus Claude).
02How to install
For Claude Code, Codex, Cursor and other agents that support skills, run:
- npx skills add caru-ini/stack-diagram
In the Claude apps (claude.ai or desktop): download stack-diagram.zip from the GitHub Releases page and upload it as a skill.
It needs Python 3.9+ and network access for the logos. PNG export uses Playwright with Chromium.
03How to use it
- Step 1: tell the agent your stack in a sentence or two: which services you use and how they connect. For example: "Draw our app on AWS: CloudFront in front of S3 and an ALB in a public subnet. Fargate, RDS and ElastiCache sit in a private subnet."
- Step 2: wait for it to draw. It checks the result itself, then hands you an HTML file.
- Step 3: ask for another format if you want one, like a PNG or a React component.
- Step 4: share it. The HTML file has its fonts and logos inlined, so it renders anywhere without a network. Publish it as a Claude artifact and share the link, or drop it into a repo or wiki.
04Good to know
- License: the code and docs are MIT; the bundled fonts are SIL Open Font License 1.1.
- Logos are not bundled with the skill. They are downloaded when the diagram is built, from svgl, devicon (MIT), gilbarbara/logos (CC0) and the cloud providers' official icon sets, so you need a network connection.
- The logos are the brands' trademarks, so keep each brand's usage rules in mind when you use them in your own diagrams.
05Links
What is the next useful tool?
Every video has a full guide. Follow @serrinion to see new ones first.