stack-diagram README

项目的 README,来自 github.com/caru-ini/stack-diagram。合并为一个 markdown 文件:README.md。

stack-diagram

Release License skills.sh

Describe your stack in a sentence. Get an architecture diagram with official logos.

Architecture diagram: a user reaches Next.js on Vercel over HTTPS; Next.js calls a Hono API in the same Vercel deployment over RPC; Hono queries Neon over SQL and calls Clerk for sessions and Stripe for checkout; GitHub Actions deploys

Diagram our stack: Next.js and a Hono API on Vercel. Postgres on Neon, auth with Clerk, payments with Stripe. GitHub Actions deploys.

npx skills add caru-ini/stack-diagram

Works with Claude Code, Codex, Cursor and other agents that support skills. In the Claude apps, upload stack-diagram.zip from Releases as a skill.

More examples

Monorepo tooling diagram: a developer pushes to GitHub Actions, which runs Turborepo and publishes to npm; inside the pnpm workspace, Lefthook runs Biome before each commit and Turborepo runs Biome and Vitest

Dev tooling, not just clouds

Draw our monorepo tooling: a pnpm workspace with Turborepo, Biome, Vitest and Lefthook. GitHub Actions runs CI and publishes to npm.
AI app diagram: a user asks Next.js on Vercel, which runs a vector search on Supabase pgvector and sends a prompt to Claude; Inngest syncs Notion docs every night and stores embeddings in Supabase

AI apps

Draw our docs chatbot: Next.js on Vercel searches Supabase pgvector and answers with Claude. Inngest syncs Notion every night.
AWS diagram: a user reaches CloudFront over HTTPS; CloudFront serves static paths from S3 and sends API paths to an ALB in a VPC's public subnet; the ALB forwards to Fargate in a private subnet, which queries RDS over SQL and uses ElastiCache as a cache

AWS, with AWS's own icons

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.
Google Cloud diagram: a user reaches Cloud Load Balancing over HTTPS; the load balancer serves static paths from Cloud Storage and sends API paths to GKE in one region of a VPC; GKE queries Cloud SQL over SQL and uses Memorystore as a cache

Google Cloud, with Google's own icons

Draw our app on Google Cloud: a global load balancer in front of Cloud Storage and GKE. GKE, Cloud SQL and Memorystore run in one region of a VPC.
Azure diagram: a user reaches Azure Front Door over HTTPS; Front Door serves static paths from Azure Blob Storage and sends API paths to Azure App Service in the Japan East region; App Service queries Azure SQL Database over SQL and uses Azure Managed Redis as a cache, both through private endpoints in a virtual network

Azure, with Microsoft's own icons

Draw our app on Azure: Front Door in front of Blob Storage and App Service. App Service reaches Azure SQL and Managed Redis through private endpoints in a VNet.

Light and dark

Every diagram is rendered in both themes. Tiles stay white so logos keep their own colors, and group labels switch to the brand's dark-theme logo.

The monorepo tooling diagram cut diagonally: light theme on the upper left, dark theme on the lower right

Share it as an artifact

The diagram is one HTML file with 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. The PNGs and the React component are rendered from the same file.

The docs chatbot diagram as an HTML page in a browser window, with a title, a short description, the diagram, a legend and a footer

After drawing, the agent offers once to post the diagram to the public gallery at https://stacks.caru.moe. It shows what will be public (the light and dark PNGs, an English title, the tech stack and a display name) and posts only after you say yes twice. Your prompt is never sent. A GitHub login is optional and never shown; it only lets you delete the post later. The site's source is in site/.

What you get

Requires Python 3.9+ and network access for the logos. PNG export uses Playwright with Chromium.

Star history

Chart of GitHub stars for caru-ini/stack-diagram over time

Licenses and trademarks

stack-diagram (caru-ini/stack-diagram)

正在搜索数据库…

这是什么?这是一个智能体技能。只需用一句话描述你的技术栈,它就能生成带有官方品牌标志的架构图,可在 Claude Code、Codex、Cursor 以及其他支持技能的智能体中使用。
这是独立的应用,还是我的编程智能体运行的东西?它是一个打包好的“智能体技能”,内含说明文件和脚本,由兼容的编程智能体加载并执行,而不是你自己启动的独立应用程序。
我该如何把它添加到我的智能体中?从项目的 Releases 页面下载 stack-diagram.zip,然后在 Claude 应用内将其作为技能上传;其他支持技能的智能体也以相同方式加载。
要让它运行,我需要先安装什么?需要 Python 3.9+ 和网络连接,技能才能获取品牌标志;若要生成 PNG,还需安装 Playwright 及 Chromium 浏览器。
这些标志是内置的,还是每次都需要联网?标志并未内置在技能中,而是在构建时从 svgl、devicon、gilbarbara/logos 或 AWS 官方图标包等来源实时下载,因此每次都需要联网。
这张图可以输出成哪些格式?可以输出为内联了字体和标志的独立 HTML 文件(默认),也可以是 PNG、不依赖其他库的 React 组件,或 Claude artifact;所有格式都由同一个源文件渲染而来。
它支持浅色和深色主题吗?支持,每张图都会同时渲染两种主题。图块保持白色,以便标志保留其原有颜色;分组标签则切换为品牌的深色主题标志版本。
除了云基础设施,我还能用它做别的吗?可以。README 中给出了更多示例,比如绘制 pnpm/Turborepo/Biome/Vitest 单体仓库(monorepo),或 Next.js + Supabase + Claude AI 应用的技术栈。
它如何避免箭头与标签交叉混乱?连线会绕开标签布线,因此箭头永远不会穿过文字;智能体还会在交付前先渲染并检查图表。
作者
caru-ini
大小
3.4 MB
星标
2.6K
时长
17天
提交 · 90 天