Note
本文档由 WeHub 基于上游 README 翻译整理,属于社区翻译,非官方中文文档。
English · 原始项目 · 上游 README
原作者、版权与许可证归属以原始项目及本仓库 LICENSE 文件为准。
需要架构图?让 AI 为你生成一张。
使用 Claude.ai 搭配这项特殊技能,可在数秒内生成专业的架构图。描述你的系统,Claude 会创建精美的深色主题架构图,输出为可在任意浏览器中打开的独立 HTML 文件。
⚠️ 适用于 Free、Pro、Max、Team 和 Enterprise 套餐(需先在 Settings → Capabilities 中启用 Code Execution)
architecture-diagram.zip📚 需要帮助?请参阅下方的完整安装指南。
你只需要一份系统的文字描述。任选其一即可:
选项 A:让 AI 分析你的代码库
在 Cursor、Claude Code、Windsurf 或 ChatGPT 中打开你的代码,然后提问:
Analyze this codebase and describe the architecture. Include all major
components, how they connect, what technologies they use, and any cloud
services or integrations. Format as a list for an architecture diagram.
选项 B:自行撰写
只需列出你的组件及其连接方式:
- React frontend talking to a Node.js API
- PostgreSQL database
- Redis for caching
- Hosted on AWS with CloudFront CDN
选项 C:请求典型架构
没有特定系统?让 Claude 提供一个起点:
What's a typical architecture for a SaaS application?
将步骤 2 的输出粘贴到 Claude(已安装 Architecture Diagram Generator skill):
Use your architecture diagram skill to create an architecture diagram from this description:
[PASTE YOUR ARCHITECTURE DESCRIPTION HERE]
就这么简单!Claude 会生成可在任意浏览器中打开的美观 HTML 文件。
然后!你可以通过聊天轻松迭代。让 Claude:Please update XYZ,即可实时看到架构图更新。你也可以让 Claude 修复架构图中的任何问题。
Web 应用:
Create an architecture diagram for a web application with:
- React frontend
- Node.js/Express API
- PostgreSQL database
- Redis cache
- JWT authentication
AWS serverless:
Create an architecture diagram showing:
- CloudFront CDN
- API Gateway
- Lambda functions (Node.js)
- DynamoDB
- S3 for static assets
- Cognito for auth
微服务:
Create an architecture diagram for a microservices system with:
- React web app and mobile clients
- Kong API Gateway
- User Service (Go), Order Service (Java), Product Service (Python)
- PostgreSQL, MongoDB, and Elasticsearch databases
- Kafka for event streaming
- Kubernetes orchestration
在任意现代浏览器中打开 HTML 文件,使用页眉中的工具栏:
无需安装。无需命令行。打开文件并点击即可。
| Component Type | Color | Use For |
|---|---|---|
| Frontend | Cyan | Client apps, UI, edge devices |
| Backend | Emerald | Servers, APIs, services |
| Database | Violet | Databases, storage, AI/ML |
| Cloud/AWS | Amber | Cloud services, infrastructure |
| Security | Rose | Auth, security groups, encryption |
| External | Slate | Generic, external systems |
⚠️ 适用于: Free、Pro、Max、Team 和 Enterprise 套餐
前提条件: 上传自定义 skill 前必须启用 Code Execution:
- Free / Pro / Max — 在 Settings → Capabilities 中开启
- Team / Enterprise — 管理员在 Organization settings → Skills 中启用
📚 初次使用 Claude Skills? 请参阅官方指南:Use Skills in Claude
architecture-diagram.ziparchitecture-diagram.zip 上传到 Project Knowledge解压到你的 skills 目录:
# Global skills
unzip architecture-diagram.zip -d ~/.claude/skills/
# Or project-local
unzip architecture-diagram.zip -d ./.claude/skills/
确保 Claude 可以访问这两个文件:
architecture-diagram/
├── SKILL.md # Skill instructions
└── resources/
└── template.html # Base template
Claude 会生成自包含的 HTML 文件,你可以:
每张生成的架构图包含:
该 skill 使用一致的设计系统,但 Claude 会按需调整:
生成的 HTML 结构:
<!DOCTYPE html>
<html>
<head>
<!-- Embedded styles, Google Fonts -->
</head>
<body>
<div class="container">
<div class="header"><!-- Title --></div>
<div class="diagram-container">
<svg><!-- Architecture diagram --></svg>
</div>
<div class="cards"><!-- Summary cards --></div>
<p class="footer"><!-- Metadata --></p>
</div>
</body>
</html>
#020617,带 40px 网格图案针对随时间展开的分步工作流——审批流程、runbook、自动化流水线,请参阅 process-flow-diagram-generator — 相同的设计语言,不同的图形语言。
MIT License — 可免费使用、修改和分发。
欢迎提出建议与改进!你可以:
Cocoon AI 📧 hello@cocoon-ai.com
Made with ❤️ by Cocoon AI