@GitHub_Daily: 需要跟同事讲解项目系统架构,光说不画图效果有限,自己动手画又费时间还画得不好看。 archify,一个能装进 Claude Code、Codex CLI 和 opencode 的 Agent Skill,把一段大白话描述直接变成一张架构图…
摘要
archify 是一个能装进 Claude Code、Codex CLI 和 opencode 的 Agent Skill,可将大白话描述直接生成系统架构图、工作流程图、时序图、数据流向图和生命周期状态图,支持深色/浅色主题切换和多种格式导出。
查看缓存全文
缓存时间: 2026/07/01 16:11
需要跟同事讲解项目系统架构,光说不画图效果有限,自己动手画又费时间还画得不好看。
archify,一个能装进 Claude Code、Codex CLI 和 opencode 的 Agent Skill,把一段大白话描述直接变成一张架构图。
能画系统架构图、工作流程图、时序图、数据流向图和生命周期状态图这五种技术图,深色浅色主题一键切换。
GitHub:http://github.com/tt-a1i/archify
生成的是单个自包含的 HTML 文件,不装额外依赖打开浏览器就能看,图能直接复制粘贴到 Slack 或 Notion 里。
也能导出到 4 倍分辨率的 PNG、JPEG、WebP,或者矢量 SVG。
经常需要跟同事讲清楚架构、写技术文档配图的朋友,用 Claude Code 顺手就能画,比手动画图省不少事。
tt-a1i/archify
Source: https://github.com/tt-a1i/archify

Archify
Generate beautiful architecture, technical workflow, sequence, data-flow, and lifecycle diagrams in chat. Switch dark / light. Copy to clipboard or export crisp up-to-4× PNG / JPEG / WebP / SVG.
Archify is an agent skill for Claude, Codex CLI, and opencode. It turns a plain-English description of your system or process into a polished, self-contained technical diagram — a single HTML file you can open, toggle themes on, copy to the clipboard, and export at maximum resolution.
- No design skills needed — describe your architecture in English, get a diagram
- Workflow, sequence, data-flow, and lifecycle diagrams too — technical flows, approvals, tool calls, CI/CD, runbooks, request call chains, data pipelines, PII boundaries, and state machines can be drawn
- Built-in theme toggle — one click between dark and light, persists across sessions
- Copy PNG to clipboard — one click, paste straight into Slack / Notion / GitHub
- Ultra-crisp image export — PNG / JPEG / WebP rendered natively at up to 4× source resolution (no upsampling blur), or SVG for true vector
- SVG follows system dark/light — exported SVGs ship with both variable sets +
@media (prefers-color-scheme), so dropping one into a GitHub README makes it follow the reader’s color preference (no more two PNGs wrapped in<picture>) - Self-contained HTML — the generated file has zero dependencies, share by sending it
- Iterate by chat — “add Redis”, “move auth to the left”, “use emerald for the API”
Project page: tt-a1i.github.io/archify
Preview
Same diagram, two themes, one click to switch:
| Dark | Light |
|---|---|
![]() | ![]() |
The Export menu — Copy PNG to clipboard plus 4 download formats (all raster exports at up to 4× source resolution):

Live example: examples/web-app.html — open in a browser, press T to toggle theme, E to open Export. Append ?theme=light or ?openExport=1 to the URL for deterministic screenshots.
Diagram types
Archify now has five primary outputs:
| Type | Good for | How to ask |
|---|---|---|
| Architecture | System components, cloud resources, databases, caches, services, boundaries, security groups | Describe the system structure |
| Workflow | Request lifecycles, approval flows, tool calls, CI/CD, runbooks, incident response | Describe participants, step order, and key branches |
| Sequence | API call chains, request lifecycles, cache fallback, auth checks, async trace, service interactions | Describe who calls whom, in what order, and what returns |
| Data Flow | Data pipelines, ETL/ELT, analytics events, PII isolation, warehouse sync, lineage, downstream consumers | Describe sources, processing stages, storage, sensitivity boundaries, and consumers |
| Lifecycle | State machines, order/task/deployment/agent-run lifecycles, wait states, retries, cancellation, timeout, terminal states | Describe states, transition events, retry paths, and terminal outcomes |
Workflow is not trying to replace every general-purpose flowchart. It is a technical communication diagram: swimlanes, semantic colors, a clear happy path, and secondary async / approval / trace paths.
Use archify to draw a workflow:
User submits a request -> Agent plans -> Approval Gate if needed -> Tool Call -> Trace Log -> Final Reply
Open the example here: examples/workflow-agent-tool-call-rendered.html.

Sequence diagrams explain a narrower interaction over time:
Use archify to draw a sequence diagram:
User opens a page, the frontend calls the API, the API verifies JWT, reads Redis, falls back to Postgres on cache miss, returns JSON, and emits trace.
Open the example here: examples/sequence-cache-miss-request.html.

Data Flow diagrams explain how data assets move and change:
Use archify to draw a data flow:
Web and Mobile emit analytics events, Edge API collects them, Consent Gate filters PII, Kafka carries accepted events,
Warehouse stores analytics tables, Feature Store derives daily features, Dashboards and an ML Model consume downstream data.
Open the example here: examples/dataflow-product-analytics.html.

Lifecycle diagrams explain how an object changes state:
Use archify to draw a lifecycle diagram:
Agent Run starts at Queued, moves through Planning, Executing, and Reviewing. It can pause at Needs Approval,
wait at Blocked, retry after Failed, end at Cancelled or Expired, or finish at Completed.
Open the example here: examples/lifecycle-agent-run.html.

What’s new
Archify is based on Cocoon-AI/architecture-diagram-generator v1.0 (dark-only, HTML output). 2.0 rewrote the template around a themeable CSS-variable system and added a client-side export pipeline. 2.1 added copy-to-clipboard + keyboard nav. 2.2 added a print stylesheet + local-font fallback. 2.3 fixed a long-standing upsampling bug and made every raster export genuinely sharp at 4× source resolution (the 1× / 2× / 4× selector introduced in 2.1 was removed at the same time — it only encouraged picking a soft-looking scale). 2.4 upgraded the SVG export to a dual-theme self-contained file — drop the same .svg into a GitHub README and it follows the reader’s dark/light preference automatically. 2.5 is a hardening release: a batch of verified renderer and validation bug fixes (template slot corruption, cross-lane lifecycle overlap detection, light-theme lane colors in PNG/SVG exports, Safari clipboard copy), LLM-ergonomic validation errors with numeric thresholds and fix suggestions, Mermaid accepted as an input dialect (mapped through SKILL.md prompts, not a parser), CJK-aware text measurement plus CJK font fallbacks, and a golden-file test suite with CI.
| Feature | v1.0 | 2.0 | 2.1 | 2.2 | 2.3 | 2.4 | 2.5 |
|---|---|---|---|---|---|---|---|
| Dark theme | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| Light theme | — | Toggle | Toggle | Toggle | Toggle + T shortcut | Same | Same |
| PNG / JPEG / WebP download | manual screenshot | 2× bitmap-upsampled | 1× / 2× / 4× selector (still upsampled) | same | 4× rasterized natively — no blur | Same | Light-export lane colors fixed |
| SVG download | — | Vector, styles inlined (single theme) | Same | Same | Same | Dual-theme self-contained (@media prefers-color-scheme) | Same (lane colors fixed) |
| Copy PNG to clipboard | — | — | Yes | Same | Yes (up to 4×) | Same | Safari fix |
| Keyboard shortcuts | — | — | T / E + menu nav | Same | Same | Same | Same |
| Accessibility | — | — | ARIA + focus-visible | Same | Same | Same | Same (+ menu a11y fixes) |
| Print stylesheet | — | — | — | Yes | Yes (+ landscape + 2-col cards) | Same | Same |
| Local-font fallback on export | — | — | — | Yes | Yes | Same | + CJK font fallback |
| Styling model | Inline fill / stroke | CSS custom properties + semantic classes | Same | Same | Same | Same | Same |
| Typed renderers + schema validation | — | — | — | — | — | — | Yes (with tests & CI) |
Quick start
1. Install the skill
Archify is packaged as an agent skill directory (archify/SKILL.md), so the same archify.zip works with Claude, Codex CLI, and opencode.
Claude.ai:
- Download
archify.zip - Go to Settings -> Capabilities -> Skills
- Click + Add and upload the zip file
- Toggle the skill on
Claude Code CLI:
# Global (all projects)
unzip archify.zip -d ~/.claude/skills/
# Or project-local
unzip archify.zip -d ./.claude/skills/
Codex CLI:
# Global (all projects)
unzip archify.zip -d ~/.agents/skills/
# Or project-local
unzip archify.zip -d ./.agents/skills/
opencode:
# Global (opencode-native)
unzip archify.zip -d ~/.config/opencode/skills/
# Or project-local
unzip archify.zip -d ./.opencode/skills/
# Also works: the shared agent directory used above for Codex
unzip archify.zip -d ~/.agents/skills/
The typed renderers (workflow / sequence / dataflow / lifecycle) rely on ajv for schema validation, which takes a one-time npm install in the installed skill directory. Many agent runtimes can run it automatically on first use, following the Setup instructions in SKILL.md — or run it yourself:
cd ~/.agents/skills/archify && npm install
Without the dependency the renderers skip schema validation (layout checks still run).
Claude.ai Projects (alternative):
Upload archify.zip to your Project Knowledge.
What each install surface can do:
| Install surface | Capability |
|---|---|
| Claude Code | Full — runs the typed renderers + schema validation |
| Codex CLI | Full — install to ~/.agents/skills/ or .agents/skills/ |
| opencode | Full — install to .opencode/skills/, .agents/skills/, or another supported skills directory |
| Claude.ai (zip upload) | Usually full — depends on whether the sandbox can npm install, which it typically can |
| Project Knowledge | Architecture mode only — no code execution, purely prompt-driven |
2. Describe your system
Any of these work:
Have AI analyze your codebase:
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.
Write it yourself:
- React frontend talking to a Node.js API
- PostgreSQL database
- Redis for caching
- Hosted on AWS with CloudFront CDN
Or ask for a typical architecture:
What's a typical architecture for a SaaS application?
3. Ask Claude to use the skill
Use your archify skill to create an architecture diagram from this description:
[PASTE YOUR ARCHITECTURE DESCRIPTION HERE]
That’s it. Claude generates an HTML file you can open in any browser. Iterate by chat: “add Redis”, “swap Postgres for MySQL”, “highlight the auth path”.
Using the output
Open the generated HTML in any browser. Top-right you’ll see two buttons:
- Theme button (Dark / Light) — one click flip, persisted across sessions. Shortcut: T.
- Export menu — opens a dropdown with five actions (Copy PNG + download PNG / JPEG / WebP / SVG). Shortcut: E.
Export menu
| Action | What it does |
|---|---|
| Copy PNG | Puts a PNG of the current diagram straight on your clipboard. Paste into Slack, Notion, GitHub, Figma. |
| Download PNG / JPEG / WebP | Saves a raster image. JPEG/WebP are painted over the current theme’s background (no alpha); PNG keeps transparency. |
| Download SVG | Vector export with all styles inlined, dual-theme self-contained. The file ships with both dark and light CSS variable sets plus a @media (prefers-color-scheme) rule — drop the same .svg into a GitHub README or blog and it follows the reader’s preference automatically. Still editable in Figma / Illustrator. Scales losslessly. |
Every raster export (Copy PNG, Download PNG/JPEG/WebP) is rendered natively by the browser at up to 4× the diagram’s intrinsic resolution (oversized diagrams step down to 3×/2× to stay within browser canvas limits) — the serialized SVG is given a width/height of 4 × viewBox, rasterized by the browser at that resolution, and drawn to the canvas at natural size (no upsampling). This produces genuinely crisp output for retina displays, slides, and print. There is no scale dial — maximum safe sharpness is always chosen automatically.
Keyboard
- T anywhere — toggle theme
- E anywhere — open the Export menu
- ↑ ↓ inside the menu — navigate actions
- Home / End — jump to first / last action
- Enter / Space — activate
- Esc — close menu
URL parameters
?theme=lightor?theme=dark— force a starting theme (deterministic screenshots, share links, embeds)?openExport=1— auto-open the Export menu on load (demo / docs screenshots)
Notes
- WebP support depends on your browser’s canvas encoder. If unavailable (older Safari), the menu item is dimmed and disabled. PNG and JPEG are universal.
- Clipboard support for images requires
ClipboardItem+navigator.clipboard.write(Chromium, Firefox 127+, Safari 16+). If unavailable, Copy PNG is dimmed. - Fonts in exports: raster images use the system monospace fallback (
ui-monospace/ Menlo / Consolas) because the sandboxed image-rendering context can’t fetch Google Fonts. Install JetBrains Mono locally for pixel-perfect rendering.
Example prompts
Web app:
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
Microservices:
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
Data flow / product analytics:
Use archify to draw a data flow:
- Web App and Mobile SDK produce clickstream events
- Edge API collects events
- Consent Gate filters identity and PII
- Kafka/Event Stream carries accepted events
- Warehouse stores normalized facts
- Feature Store derives daily feature vectors
- Dashboards and ML Model consume downstream data
State machine / lifecycle:
Use archify to draw a lifecycle diagram:
- A task starts at Queued
- Planning builds the plan
- Executing calls tools
- Reviewing checks quality
- Needs Approval and Blocked are wait states
- Failed can retry, while Cancelled / Expired / Completed are terminal states
Color palette
| 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 |
| Message Bus | Orange | Kafka, RabbitMQ, SNS, event buses |
| External | Slate | Generic, external systems |
Each color has coordinated dark-mode and light-mode variants that switch together via the theme toggle.
Technical details
- Styling: CSS custom properties on
:root+[data-theme="light"]; SVG elements reference semantic classes (c-frontend,t-muted,a-emphasis, etc.). Togglingdata-themeon<html>re-themes the entire diagram including gradient, grid, arrows, and mask rects. - Export pipeline: The SVG is cloned, host
<style>is inlined, and current theme variables are resolved and written into a:rootrule on the clone. For raster formats the clone’swidth/heightare set to4 × viewBoxso the browser rasterizes the vectors at target resolution natively; the canvas is sized to match and the image is drawn at natural size (no bitmap upsampling).toBlob(mime)then produces the file. JPEG gets an explicit background fill since it has no alpha. If the target resolution would exceed the browser’s canvas limits, the pipeline automatically falls back to 3× or 2× so the export still succeeds. - Self-contained output: Single HTML file, Google Fonts link + inline SVG + ~19 KB of embedded JS. No build step, no JS framework, no server — the generated HTML itself has zero dependencies (the typed renderers need
npm installfor ajv, see Install). - Browser support: Any modern browser (Chrome, Safari, Firefox, Edge). Needs
Image+canvas.toBlobwithimage/webpsupport for WebP export.
Attribution
Archify is a fork / rewrite of Cocoon-AI/architecture-diagram-generator (MIT, v1.0) by Cocoon AI. The original’s clean visual design — color palette, grid background, summary-card layout, JetBrains Mono typography — is preserved. All credit for the original aesthetic belongs to them.
Archify 2.x contributes:
- Refactor of the template to a CSS-variable theme system (dark + light)
- Theme toggle +
localStoragepersistence +prefers-color-schemedefault - Built-in PNG / JPEG / WebP / SVG export menu + copy to clipboard
- 4× native rasterization (fixes upsampling blur)
- Dual-theme self-contained SVG export (single file follows the host’s
prefers-color-scheme) - Keyboard navigation + accessibility semantics
- Print stylesheet + local-font fallback
- Updated
SKILL.mdto guide Claude toward class-based (themeable) diagrams
Both projects are MIT-licensed.
Roadmap
See ROADMAP.md.
Next up is v3.0 — JSON IR stabilization: a minimal diagram.json intermediate format so Claude can make local coordinate edits without drifting unrelated components, with git diff-friendly output and theme/palette swaps that don’t require re-rendering.
About Mermaid import: the automatic Mermaid parser route was cut after an experiment showed that auto-layout + archify CSS doesn’t look meaningfully better than native Mermaid (experiments/v3-mermaid-validation/RESULT.md). Archify’s aesthetic core is Claude’s layout judgment, not the CSS. You can still paste Mermaid code and have Claude lay out an archify-style diagram from scratch — it goes through the
SKILL.mdprompts, not a parser.The former v2.4 / v2.5 plans (
?exportScale=N, color-blind palettes, share links) were also dropped. See the ROADMAP “Not planned” section for the rationale.
License
MIT — free to use, modify, and distribute.
Contributing
Issues, PRs, and shared diagrams welcome.
相似文章
@XAMTO_AI: 用嘴说出来就能生成架构图?这个工具确实有点东西。 跟Claude说大白话,它直接给你输出架构图、流程图、时序图、数据流图……还支持深色浅色主题一键切换,多种格式导出,一个HTML文件全搞定。 不会画图的程序员有救了,不想画图的程序员也有救…
Archify 是一个 Claude Skill,允许用户用自然语言描述生成架构图、流程图、时序图等,支持深色/浅色主题切换和多格式导出。
@GitHub_Daily: 用 Claude Code 开发项目,代码库一大,每次探索代码结构都要扫一堆文件,工具调用多、速度慢,token 也跟着烧。 于是找到 CodeGraph 这个开源工具,给代码库预建一张语义知识图谱,让 Claude Code 直接查图而…
CodeGraph 是一个开源工具,为代码库预建语义知识图谱,让 Claude Code 直接查图而不是逐文件扫描,从而大幅减少工具调用次数(减少 92%)并提升探索速度(提升 71%),支持 19 种编程语言和 13 个框架。
@GitHub_Daily: 刚接手一个新项目,面对几十万行代码,光是理清文件之间的调用关系和整体架构,就得花上好几天,效率很低。 于是找到 Understand Anything 这个开源项目,把整个代码库生成一张可交互的知识图谱,直观地看清每个模块之间的关系。 通…
Understand Anything 是一个开源项目,通过多智能体流水线自动分析代码库,生成可交互的知识图谱,帮助开发者快速理清代码结构和模块关系,支持与 Claude Code、Cursor 等主流 AI 编程工具集成。
@0xQiYan: 还在手动画架构图?拖来拖去改半天? 收藏!今天必须安利这个skill——我最近装了个 `drawio-skill`,一句话就能生成专业图表,再也不用自己画了。 它的逻辑特别简单:你只用说人话(比如“画一个交易系统架构图”),它直接给你生成…
介绍 drawio-skill 工具,通过自然语言描述即可生成架构图、流程图、ER图等专业图表,支持多轮迭代和导出多种格式,大幅提升画图效率。
@Potatoloogs: 用 Claude Code、Cursor、Codex 理解大项目时,经常会遇到一个问题:每次提问,它都要重新读文件、找线索、拼上下文。 代码在 src,文档在 docs,设计说明、截图、论文、视频又散在别的目录里,资料很多,但关系没有沉淀…
Graphify 是一个面向 AI 编程助手的软件工程知识图谱工具,可以将代码、文档、图片等项目资料整理成可查询的关系图,帮助 AI 在理解大型项目时跳过反复读取文件的步骤。

