RepoTrending
Về bảng xếp hạng
GitHubKhácHTML

cathrynlavery/diagram-design

29 loại sơ đồ biên tập cho Claude Code. HTML + SVG độc lập. Không có bóng, không có độ dốc Mermaid.

14k sao858 fork

README

Diagram Design. Editorial diagrams your designer won't hate.

An agent skill that draws diagrams as one self-contained HTML + SVG file, in your brand.
51 diagram types. No shadows. No Mermaid slop.

GitHub stars skills.sh installs CI Plugin version MIT license

cathrynlavery/diagram-design on Trendshift

Trang web · Gallery · Nhật ký thay đổi

cài đặt · Nó làm gì · Bắt đầu nhanh · Match your brand · Import · Xuất khẩu · Đóng góp

npx skills add cathrynlavery/diagram-design



A prompt typed into an agent session becomes a finished architecture diagram, then a plain first-pass diagram is redrawn with the skill, then the gallery of diagram types

Ask your agent in plain words:

  • "Make me an architecture diagram of my app: frontend, backend, database, Redis cache."
  • "I need a quadrant showing Q2 projects by impact vs effort."
  • "Give me a sequence of a bearer call with token refresh on 401."
  • "Onboard diagram-design to https://yoursite.com" (pulls your palette and fonts so every diagram after this one matches your site)

The agent picks the type, states its plan, and writes one .html file you can open by double-clicking.


cài đặt

Works with any host that reads Agent Skills, including Cursor, Claude Code, Codex, Qoder, GitHub Copilot, Gemini CLI, Cline, Windsurf and Amp:

npx skills add cathrynlavery/diagram-design

In Claude Code, the plugin marketplace gets you updates and the slash commands:

/plugin marketplace add cathrynlavery/diagram-design
/plugin install diagram-design@diagram-design

Official builds come only from this repository. LittleMight, Cathryn Lavery's company, publishes the plugin directory listings; a listing under any other name is an unofficial copy. RIÊNG TƯ.md lists what the skill sends over the network.

Claude Code: turn on auto-update

After installing, run /plugin, mở Chợ, chọn thiết kế sơ đồ, và chọn Bật tự động cập nhật. Claude Code tắt tính năng tự động cập nhật theo mặc định cho các thị trường của bên thứ ba; sau lần chuyển đổi này, nó sẽ làm mới thị trường và cài đặt plugin ở chế độ nền sau khi khởi động. Chạy /reload-plugins khi được nhắc hoặc để phiên tiếp theo tải bản cập nhật.

Cursor, Cline, Gemini CLI, Windsurf, Amp, Zed, Warp, Roo, Kilo and other Agent Skills hosts

The cross-agent skills CLI resolves this repository, detects skills/diagram-design/SKILL.md, and installs the whole skill (references/, assets/, scripts/) into every host root you select, including Cursor's:

npx skills add cathrynlavery/diagram-design

When the selected roots resolve to more than one skills directory, the CLI asks for an installation method and recommends Symlink: one canonical copy, linked into each root, so a later update reaches all of them at once. Pass --copy for independent copies per host instead. A selection that resolves to a single directory is copied, because the distinction is immaterial there. Where symlinks are unavailable (Windows without Developer Mode) the CLI falls back to copies and reports which roots it copied.

This is a standalone install, separate from the marketplaces below: it does not follow marketplace updates automatically. Pull merged updates with npx skills update diagram-design. It also installs the Agent Skill only, so the /export-diagram, /import-mermaid, /import-plantuml, /profilevà /doctor command surfaces stay with the native packages. On a host that has one of the marketplaces below, prefer the marketplace.

Di chuyển một lần: độc lập hiện có npx skills add copy will not start following the Codex marketplace automatically. Remove that standalone copy, then use the Codex marketplace commands. Likewise, uninstall a personal Cowork copy and reinstall Diagram Design from your organization's marketplace. Future marketplace version bumps then flow through each client's native update path.

Codex
codex plugin marketplace add cathrynlavery/diagram-design
codex plugin add diagram-design@diagram-design

Codex làm mới các thị trường Git được định cấu hình khi khởi động. Để tìm nạp ngay lập tức, hãy chạy codex plugin marketplace upgrade diagram-design và bắt đầu một phiên mới.

Qoder

Clone the repository, validate the native plugin, and install it locally:

git clone https://github.com/cathrynlavery/diagram-design.git
qoder plugins validate ./diagram-design
qoder plugins install ./diagram-design
qoder plugins list

Qoder loads the canonical skills/diagram-design/ tree and the shared command definitions directly; no Qoder-specific copy is maintained. For Qoder IDE, build a bounded ZIP from the tracked plugin surfaces and import it through Extensions → Plugins → Add Plugins → Upload Plugin:

git -C diagram-design archive --format=zip \
  --output=../diagram-design-qoder.zip HEAD \
  .qoder-plugin commands skills LICENSE

Start a new task after installing or updating the plugin.

GitHub Copilot
copilot plugin marketplace add cathrynlavery/diagram-design
copilot plugin install diagram-design@diagram-design

Copilot cài đặt kỹ năng Thiết kế Sơ đồ được chia sẻ cùng với các khả năng bác sĩ, xuất, nhập và lập hồ sơ từ thị trường kho lưu trữ hiện có. Xác nhận phát hiện với copilot skill list (hoặc /skills in an interactive session), then ask for a diagram in natural language. To fetch a merged update, run copilot plugin marketplace update diagram-design, sau đó copilot plugin update diagram-design@diagram-design.

Nhà máy Droid
droid plugin marketplace add https://github.com/cathrynlavery/diagram-design
droid plugin install diagram-design@diagram-design --scope user

Droid theo dõi các plugin Git bằng cam kết thay vì phiên bản hiển thị của tệp kê khai. Để tìm nạp bản cập nhật đã hợp nhất, hãy chạy droid plugin marketplace update diagram-design, sau đó droid plugin update diagram-design@diagram-design --scope uservà bắt đầu một phiên mới.

Claude Cowork (organization marketplace)

Thị trường của tổ chức GitHub hiện yêu cầu kho lưu trữ riêng tư hoặc nội bộ, vì vậy trước tiên hãy phản ánh kho lưu trữ công khai này thành kho lưu trữ do tổ chức của bạn sở hữu. trong Cài đặt tổ chức → Plugin, chọn Thêm plugin → GitHub, kết nối máy nhân bản đó và kích hoạt Tự động đồng bộ hóa từ menu thị trường. Đồng bộ hóa tự động chạy khi yêu cầu kéo chứa phiên bản plugin được hợp nhất với nhánh mặc định của máy nhân bản; các cú đẩy trực tiếp không kích hoạt webhook. Cài đặt Diagram Design từ thị trường tổ chức kết quả.

Pi
pi install https://github.com/cathrynlavery/diagram-design

Chạy /reload trong một phiên Pi mở. Pi cung cấp kỹ năng để khớp các yêu cầu sơ đồ; sử dụng /skill:diagram-design để gọi nó một cách rõ ràng. Pi cũng tải /export-diagram, /import-mermaid, /import-excalidraw, /import-plantuml, /profilevà /doctor mẫu nhắc nhở. Việc cài đặt Git không được ghim là có chủ ý: Pi không có tính năng làm mới gói tự động, vì vậy hãy chạy pi update --extensions để kéo các bản cập nhật đã hợp nhất.

Kiro

Nhập Kỹ năng đại lý từ URL thư mục con của kho lưu trữ:

https://github.com/cathrynlavery/diagram-design/tree/main/skills/diagram-design

Kiro sao chép các kỹ năng đã nhập vào .kiro/skills/ cho một không gian làm việc hoặc ~/.kiro/skills/ trên toàn cầu, vì vậy hãy nhập lại URL để nhận bản cập nhật. Các đại lý tùy chỉnh khai báo tài nguyên nên bao gồm skill://diagram-design/**/SKILL.md.

Mã mở

Sao chép hoặc liên kết tượng trưng skills/diagram-design/ để .opencode/skills/diagram-design trong một dự án hoặc ~/.config/opencode/skills/diagram-design trên toàn cầu. OpenCode không có gói thị trường Thiết kế sơ đồ; chỉ cập nhật các bản cài đặt được sao chép khi bạn thay thế thư mục từ một lần kiểm tra mới hơn.

Editable install (customize the style guide in a clone)

Cài đặt được quản lý thuận tiện nhưng thay đổi thành references/style-guide.md có thể được thay thế bằng các bản cập nhật gói. Hồ sơ đã lưu trong ~/.diagram-design/profiles/ tồn tại các bản cập nhật và các dự án có .diagram-design điểm đánh dấu không bị ảnh hưởng. Sao chép repo và cài đặt đường dẫn cục bộ nếu bạn dự định tùy chỉnh trực tiếp hướng dẫn về kiểu làm việc:

git clone [email protected]:cathrynlavery/diagram-design.git ~/code/diagram-design

# Pi: register the checkout as a local package
pi install ~/code/diagram-design

# Claude Code: symlink the inner skill
ln -s ~/code/diagram-design/skills/diagram-design ~/.claude/skills/diagram-design

# Other Agent Skills hosts: create only the roots you use
mkdir -p ~/.agents/skills ~/.cursor/skills ~/.cline/skills ~/.kiro/skills ~/.config/opencode/skills ~/.copilot/skills
ln -s ~/code/diagram-design/skills/diagram-design ~/.agents/skills/diagram-design
ln -s ~/code/diagram-design/skills/diagram-design ~/.cursor/skills/diagram-design
ln -s ~/code/diagram-design/skills/diagram-design ~/.cline/skills/diagram-design
ln -s ~/code/diagram-design/skills/diagram-design ~/.kiro/skills/diagram-design
ln -s ~/code/diagram-design/skills/diagram-design ~/.config/opencode/skills/diagram-design
ln -s ~/code/diagram-design/skills/diagram-design ~/.copilot/skills/diagram-design

Kỹ năng được chia sẻ tồn tại ở skills/diagram-design/. Pi phát hiện ra nó thông qua tiêu chuẩn của repo skills/ package directory; Claude Code, GitHub Copilot, Codex, Factory Droid, Cursor, and other Agent Skills-compatible tools use the same files.


Làm thế nào nó so sánh

Mermaid / PlantUML draw.io / Excalidraw Thiết kế sơ đồ
You make it by Writing text Dragging shapes by hand Describing it to your agent
Layout Automatic Manual Placed by the agent on a 4px grid, with CI checks for overlaps and clipping
Look The renderer's theme Whatever you draw One opinionated editorial style, matched to your brand
đầu ra Text that renders on GitHub An editable .drawio hoặc .excalidraw tập tin One HTML file with inline SVG, exportable to SVG or PNG
Change it later Edit the text Edit the canvas Ask the agent again, or edit the SVG
Existing diagrams Redraws Mermaid, draw.io, Excalidraw and PlantUML files

The downsides are real. Output quality depends on the model you run it with, and the same prompt can lay out differently twice. The result is not an editable source format: there is no text to diff in a pull request and no canvas to drag a box on. For docs that live in Git and change every sprint, Mermaid is still the better fit. Diagram Design is for the diagram you are going to publish.


Tại sao tôi xây dựng nó

I wanted diagrams I actually liked for my blog posts on littlemight.com. Every time I needed one, whether an architecture sketch, a flowchart, or a pyramid of what matters most, I'd ask Claude and get back a generic rounded-box thing that looked nothing like the rest of the site. I'd either fight with Figma for 30 minutes or skip the diagram.

The model already understood the content. What it was missing was taste, so I wrote the taste down: one accent color for the one or two things that matter, 1px hairlines, no shadows, every coordinate on a 4px grid.

Động thái chất lượng cao nhất thường là xóa. Every node earns its place. The accent color is reserved for the 1 or 2 things the reader should look at first. Target density: 4/10.


Nó làm gì

51 diagram types, each in three static variants: minimal light, minimal dark, and full-editorial. Open any of them directly in a browser. There is no build step, JavaScript, or external image dependency.

Architecture
Kiến trúc
Linh kiện + kết nối
IT current-state
CNTT hiện trạng
Cảnh quan di sản + hiện đại hóa
Flowchart
Lưu đồ
Logic quyết định
Sequence
trình tự
Tin nhắn theo thời gian
State machine
Máy trạng thái
Trạng thái + chuyển tiếp
ER
mô hình dữ liệu/ER
Thực thể + trường
Timeline
Dòng thời gian
Sự kiện trên một trục
Swimlane
Đường bơi
Dòng chảy đa chức năng
Quadrant
Góc phần tư
Định vị hai trục
Radar chart
Radar/nhện
So sánh nhiều trục
Loop
Vòng/bánh đà
Chu trình củng cố + trung tâm chia sẻ
Nested
Lồng nhau
Phân cấp theo cách ngăn chặn
Tree
Cây
Cha mẹ → con cái
Org chart
Sơ đồ tổ chức
Quyền sở hữu + định tuyến
Layer stack
Ngăn xếp lớp
Trừu tượng xếp chồng
Venn
Venn
Đặt chồng chéo
Pyramid
Kim tự tháp/phễu
Thứ bậc xếp hạng hoặc rớt hạng
Bar chart
Biểu đồ thanh
So sánh phân loại
Treemap
Sơ đồ cây
Một phần toàn bộ theo khu vực
Line chart
Biểu đồ đường
Xu hướng theo thời gian
Gantt
Gantt
Nhiệm vụ + giai đoạn trên dòng thời gian
Scatter plot
Biểu đồ phân tán
Phân phối + tương quan
High-Level
Cấp cao
Ngăn xếp end-to-end trên một cụm
Process
Quy trình
Quy trình làm việc tuần tự nhiều tác nhân
Medallion
Huy chương
Lưu trữ dữ liệu nhiều tầng
Data flow
Luồng dữ liệu
Các bước quy trình trong phạm vi vai trò
DP integration
Tích hợp DP
Nguồn → cốt lõi → người tiêu dùng
DP security matrix
Ma trận bảo mật DP
Quyền truy cập theo từng vai trò
Sankey
Sankey
Số lượng chia + hợp nhất
Fishbone
xương cá
Các nguyên nhân được nhóm lại → một kết quả
Wardley map
Bản đồ Wardley
Chuỗi giá trị × sự phát triển
Kanban
Kanban
Công việc đang tiến hành theo tiểu bang
User journey
Hành trình của người dùng
Các giai đoạn, hành động + tình cảm
Deployment
Triển khai
Vùng, máy chủ + hiện vật
Dependency graph
Biểu đồ phụ thuộc
Fan-in, xếp hạng + chu kỳ
UML class
lớp UML
Lớp, phép toán + quan hệ kiểu
Story map
Bản đồ câu chuyện
Xương sống × lát phát hành
Database schema
Lược đồ cơ sở dữ liệu
Bảng vật lý + FK cột
Polar chart
Polar chart
Cyclic magnitude · linear radius
Waterfall
Waterfall
Tổng số chạy + cầu đã ký
Architecture delta
Architecture delta
Before · Changes · After topology
Exploded axonometric
Exploded axonometric
Parts pulled apart on one axis
Axonometric plan
Axonometric plan
Rooms and buildings on one plate
Heatmap
Heatmap
Value per row × column cell
Service blueprint
Service blueprint
Frontstage and backstage on a shared stage grid
SBGN
SBGN
Species, processes + compartments
Requirement traceability
Requirement traceability
Requirements → design → verification
Event modeling
Event modeling
Commands → events → read models
Steps
Steps
Numbered stages on one ordered rail
Unit Grid
Unit Grid
Equal discrete units
Schedule network
Schedule network
Critical paths and total float

Several types have named variants that share their reference: Line covers slopegraph, ridgeline, streamgraph and bump; Scatter covers bubble, beeswarm and box plot; Treemap covers marimekko; Dependency covers arc diagram.

Architecture can nest administrative bands and traffic boxes in one snapshot when the hierarchy itself is the claim: dashed rx=4 bands for billing and permissions, solid rx=8 boxes for networks, and managed services outside every subnet. See the containment example và type-architecture.md.

Architecture delta compares synchronized topologies through a Before · Changes · After ledger of added, removed, changed, moved, and rewired objects. See its tài liệu tham khảo và order-fulfilment example. Attribute-only comparisons remain tables; a single snapshot uses Architecture.

Exploded axonometric draws one object in 2:1 dimetric projection with its parts lifted apart at equal gaps: a phone teardown, an unboxing, an app stack, an AI agent stack, hoặc một mechanical keyboard. Every coordinate comes from one projection function, and the animated phone opens assembled and explodes once. See its tài liệu tham khảo.

Axonometric plan uses the same projection for one floor or one site: walls cut at desk height so every room reads from a single view, or buildings on a campus tagged by build phase. See the office floor, cái campus, cái coffee shop, cái fulfillment floor, cái phased campus animation, và tài liệu tham khảo.

SBGN draws a biological process as a bipartite species/process map: macromolecules and process squares inside a compartment, with consumption, production, reversible, and modulation arcs. See the carotenoid cleavage example và nó tài liệu tham khảo. Architecture and Nested remain the types for runtime systems and containment without reactions.

Duyệt qua thư viện trực tiếp: cathrynlavery.GitHub.io/diagram-design, or open skills/diagram-design/assets/index.html locally to flip through every diagram with light / dark / full-editorial tabs. Each type has one number, 01 to 51; its variants and worked examples carry the same number with a letter. The searchable diagram navigation starts open; click the preview to collapse it and use Diagrams to reopen it. The active diagram name and variant controls stay visible.


Onboarding: make it look like của bạn nhãn hiệu

The whole point is editorial diagrams in của bạn màu sắc và kiểu chữ, không phải là một mẫu chung chung.

Out of the box, diagrams render in a jet-black + tangerine palette (white-smoke paper, jet-black ink, a darkened tangerine accent that clears 4.5:1 contrast as text, blue-slate muted, silver hairlines). Good enough to screenshot straight away. Sixty seconds of onboarding is better: the skill pulls your brand from your website and applies it across every diagram.

dòng chảy

You:     "onboard diagram-design to https://yoursite.com"
Agent:   → fetches the homepage
         → extracts the dominant palette + font stack
         → maps detected values to semantic roles:
             paper, ink, muted, accent, link
         → shows a proposed diff
         → writes your tokens to references/style-guide.md
You:     "yes, apply it"

Bây giờ mọi sơ đồ mới đều sử dụng màu sắc của bạn. Màu giấy của trang web của bạn sẽ trở thành nền sơ đồ. Màu CTA của bạn trở thành điểm nhấn. Ngăn xếp phông chữ nội dung của bạn sẽ trở thành họ nhãn nút.

Đối sánh thương hiệu cũng tạo ra thông tin xác nhận về độ trung thực: URL được lấy mẫu, vai trò màu chính xác, họ và trọng lượng phông chữ, URL nguồn phông chữ và bất kỳ dự phòng nào. Phông chữ của trang web công cộng được sử dụng trực tiếp và được xác minh sau khi hiển thị thay vì được thay thế âm thầm bằng phông chữ hệ thống chung.

Những gì được trích xuất

Được phát hiện từ trang web của bạn Trở thành
<body> nền paper mã thông báo
Màu văn bản chính ink mã thông báo
Văn bản phụ / chú thích muted mã thông báo
Thẻ hoặc hộp đựng paper-2 mã thông báo
Màu sắc thương hiệu được sử dụng nhiều nhất (CTA, liên kết, tiêu đề) accent mã thông báo
<h1> họ phông chữ title phông chữ
<body> họ phông chữ node-name phông chữ
<code> / <pre> phông chữ sublabel phông chữ

Kiểm tra độ tương phản diễn ra tự động

Trước khi viết mã thông báo, kỹ năng này sẽ xác minh độ tương phản WCAG AA trên ink kết thúc paper. If your site has a color that fails contrast at diagram sizes (9 to 12px), it proposes an adjusted value and explains why. The default skin is held to the same contract in CI: text roles clear 4.5:1 and essential marks clear 3:1 on both light and dark paper.

Có thể truy cập theo mặc định

Mỗi mẫu sơ đồ đều cung cấp cho SVG nội tuyến một tên và mô tả có thể truy cập được: role="img", một cách giải quyết aria-labelledby, và con đầu lòng <title> / <desc> khe cắm. ID được đặt trước cho mỗi sơ đồ và biến thể, do đó, nhiều bản xuất SVG có thể được nội tuyến một cách an toàn trên một trang mà không có ID tên có thể truy cập trùng lặp. Thay vào đó, các biểu tượng mẫu trang trí được ẩn khỏi công nghệ hỗ trợ.

Offline fonts

By default a diagram loads Instrument Serif, Geist and Geist Mono from Google Fonts, the only network request it makes. Ask for system fonts (or set the font source to system in your style guide) and the file makes no network requests at all: the stacks fall back to the platform's own serif, sans and monospace faces. See Font source.

Ghi đè thủ công

Bạn muốn đặt mã thông báo bằng tay? Mở skills/diagram-design/references/style-guide.md and edit the table. Everything downstream reads from there: every diagram, the annotation primitive, and the gallery all use semantic role names (accent, not a hex value).

Cổng chạy đầu tiên

Kỹ năng này sẽ không âm thầm gửi các sơ đồ có giao diện mặc định vào một dự án có thương hiệu. Trong lần sử dụng đầu tiên trong một dự án mới, nó sẽ kiểm tra xem style-guide.md đã được tùy chỉnh. Nếu không, nó dừng lại và hỏi:

"Đây là sơ đồ đầu tiên của bạn trong dự án này. Hướng dẫn kiểu vẫn ở mặc định. Bạn muốn chạy phần giới thiệu, dán mã thông báo theo cách thủ công hay tiếp tục theo mặc định?"

Xem skills/diagram-design/references/onboarding.md để biết thông số kỹ thuật đầy đủ.

Làm việc với nhiều khách hàng

Đưa thương hiệu vào một lần, lưu kết quả dưới dạng hồ sơ được đặt tên, sau đó thêm .diagram-design điểm đánh dấu chứa profile: <slug> cho từng dự án của khách hàng. Đã đọc dự án đánh dấu ~/.diagram-design/profiles/<slug>.md trực tiếp, do đó, các không gian làm việc song song có thể sử dụng các nhãn hiệu khác nhau mà không ghi đè lên một cài đặt chung style-guide.md.

Thư viện hồ sơ được chia sẻ trên Claude Code, Codex, Factory Droid và Pi. sử dụng /diagram-design:profile trong Claude Code, /profile trong Factory Droid hoặc Pi hoặc hỏi bằng ngôn ngữ tự nhiên trên bất kỳ máy chủ nào. Xem profiles.md cho hợp đồng lưu trữ, đánh dấu và phục hồi.


Bắt đầu nhanh

# From a cloned checkout, open the gallery to see every diagram
open skills/diagram-design/assets/index.html       # macOS
xdg-open skills/diagram-design/assets/index.html  # Linux

Then ask your agent for a diagram, like the prompts at the top of this page. A sequence with token refresh uses the ALT combined-fragment grammar in type-sequence.md; xem example-sequence-oauth.html.

Công thức vận hành cho các bản cài đặt có thể chỉnh sửa, sơ đồ đầu tiên, thiết lập thương hiệu, nhập, xuất, xác thực, các mối nối Windows và lời nhắc có thể sử dụng lại đều có sẵn trong docs/cookbook.md.

You can also start from a template directly:

cp skills/diagram-design/assets/template.html my-diagram.html        # minimal light
cp skills/diagram-design/assets/template-full.html my-diagram.html   # editorial with summary cards
cp skills/diagram-design/assets/template-motion.html my-diagram.html # optional accessible motion

Các mẫu ngữ nghĩa và chuyển động tùy chọn

Khi hành vi quan trọng, kỹ năng sẽ chọn mẫu ngữ nghĩa trước tiên và loại hình ảnh thứ hai. Chín mẫu định tuyến bao gồm hàng đợi fan-in và tắc nghẽn, các vị trí giai đoạn lặp lại, chuyển đổi đầu vào không có cấu trúc, dấu vết chính sách được ghép nối, đường trải nhựa an toàn, danh mục quản trị, lớp bảo mật đền bù, phân tách khối có thể theo dõi và bản đồ giai đoạn vòng đời. Mỗi mẫu xác định trình kích hoạt, nguyên thủy, ngân sách, phản mẫu, dự phòng tĩnh và loại hình ảnh gần nhất trong semantic-patterns.md.

Chuyển động là tùy chọn và không tạo ra loại hình ảnh khác. animation.md định nghĩa none, reveal, stepvà loop các chế độ có khung hình đầu tiên tĩnh hoàn chỉnh, thời gian xác định và các điều khiển khi có tương tác. Đầu ra giảm chuyển động hiển thị khung hình tĩnh hoàn chỉnh và ẩn/tắt các điều khiển phát lại. Motion HTML sử dụng bộ điều khiển được xem xét chính xác từ template-motion.html; các tập lệnh nội tuyến tùy ý hoặc được sửa đổi, nội dung từ xa, nhập CSS và thuộc tính HTML thực thi đều bị từ chối. Mặc định là none: đầu ra thông thường vẫn tĩnh và không có tập lệnh. example-policy-trace-animated.html là ví dụ tương tác khép kín.


Import from draw.io, Mermaid, Excalidraw, or PlantUML

Already have diagrams in draw.io / diagrams.net, Mermaid, Excalidraw, or PlantUML? Point the skill at the source and it vẽ lại them: same content, this design system, at whatever size the destination needs.

Redrawn from a .drawio file

Tệp draw.io 12 nút được vẽ lại tại balanced chi tiết cho một bài viết trên blog. Sáu màu tô màu phấn của nguồn đã trở thành một điểm nhấn; tọa độ được kéo bằng tay của nó đã trở thành một lưới 4px.

/diagram-design:import-drawio platform.drawio
/diagram-design:import-drawio platform.drawio --size=slide-16x9 --detail=simplified --audience=executive
/diagram-design:import-drawio platform.drawio --detail=faithful --format=png --page=all
/diagram-design:import-mermaid README.md --diagram=all
/diagram-design:import-mermaid architecture.mmd --size=slide-16x9 --detail=simplified
/diagram-design:import-excalidraw whiteboard.excalidraw --size=slide-16x9 --detail=simplified
/diagram-design:import-plantuml sequence.puml
/diagram-design:import-plantuml classes.puml --size=slide-16x9 --detail=simplified

Hoặc chỉ cần hỏi: "vẽ lại file drawio này cho bộ bài của tôi", "tạo khối biên tập Mermaid này", "make this whiteboard sketch presentable", "redraw this PlantUML sequence"hoặc "この Mermaid をスライド用にきれいにして".

Reads the common containers draw.io writes (.drawio, .drawio.xml, .drawio.png with an embedded diagram, and .drawio.svg), including compressed payloads that look like base64 garbage in an editor. For Mermaid, it accepts .mmd, .mermaidvà một hoặc nhiều hàng rào mermaid blocks in Markdown. UTF-8 files may include a byte-order mark. For Excalidraw, it accepts .excalidraw và .excalidraw.json scene files (not .excalidraw.png/.excalidraw.svg exports). For PlantUML, it accepts .puml, .plantuml, .pu, and fenced plantuml / puml blocks in Markdown, for sequence and class diagrams only. It parses text only: no rendering, JavaScript, browser, network, PlantUML runtime, or followed click targets.

Bốn mặt số

Vấn đề không phải là chuyển đổi, đó là điều chỉnh đầu ra đến nơi nó sẽ đến. Cùng một tệp nguồn, ba sơ đồ khác nhau:

Quay số Tùy chọn Nó thay đổi cái gì
định dạng html · svg · png · html+png Có thể giao được. SVG cho Figma, PNG cho slide, HTML cho web.
Kích thước doc-inline · doc-wide · slide-16x9 · slide-4x3 · social-og · social-square · print-a4-landscape · print-a3-landscape · print-letter-landscape · fit các viewBox và đoạn đường nối kiểu: a projected slide gets 16px node names, not 12px.
Chi tiết faithful (24 nút, được khoanh vùng) · balanced (≤12) · simplified (≤7) How much of the source survives, via a fixed degrade ladder: decorations, then duplicates, then leaf clusters, then infrastructure.
khán giả engineer · mixed · executive các cách diễn đạt, không phải là số đếm. Auth Service / JWT · RS256 · :8443 → Auth Service / token check → Sign-in.

Mỗi lần nhập đều kết thúc bằng một sổ cái trung thực listing what got merged, collapsed, or dropped. You know the source; you'd notice anyway.

Detail: balanced · 12 source nodes → 8 drawn
Collapsed: "Token valid?" decision → edge label on Gateway → Auth
Dropped:   1 sticky note ("legacy path, to be retired"), unconnected in source
Kept in full: the request path (Web/Mobile → Gateway → Orders → Postgres)

What never carries over: source or renderer coordinates, source palette, source fonts, draw.io's diagonal connector spaghetti, Mermaid's automatic layout, Excalidraw's hand-drawn geometry, or PlantUML skinparams. What always does: components, relationships, grouping, and direction. See references/import-drawio.md, references/import-mermaid.md, references/import-excalidraw.md, references/import-plantuml.mdvà references/output-spec.md.


Xuất sang PNG / SVG

Diagrams ship as self-contained HTML, but you can export the diagram itself for Figma, slides, or social cards. SVG export also carries CDATA-wrapped diagram CSS, including selectors bound to the original SVG root, and preserves quoted selector values containing comment delimiters. Numeric character references in SVG text and attributes retain their HTML meaning (for example, &#128; stays €). Use the slash command for your agent:

Pi:

/export-diagram path/to/diagram.html
/export-diagram path/to/diagram.html --svg-only
/export-diagram path/to/diagram.html --png-only --scale=3
/export-diagram path/to/diagram.html --registry

Claude Code:

/diagram-design:export-diagram path/to/diagram.html
/diagram-design:export-diagram path/to/diagram.html --svg-only
/diagram-design:export-diagram path/to/diagram.html --png-only --scale=3
/diagram-design:export-diagram path/to/diagram.html --registry

Hoặc chỉ cần hỏi bằng ngôn ngữ tự nhiên:

"Export this diagram as SVG and PNG."
"Save my-diagram.html as PNG."
  • SVG extracts the <svg> node and injects Google Fonts so it renders standalone in browsers, Figma, and Illustrator. Animation bindings follow namespaced keyframes even when property names use CSS escapes. Pass --system-fonts to skip the font import for offline use.
  • PNG rasterizes the diagram via Playwright at 2× by default. One-time setup: pip install playwright && playwright install chromium.

Both formats are diagram-only: editorial cards and headers from -full các biến thể không được bao gồm. Để có ảnh chụp màn hình của bố cục biên tập đầy đủ, hãy sử dụng ảnh chụp màn hình in sang PDF hoặc toàn trang của trình duyệt của bạn. Xem skills/diagram-design/references/export.md để biết đầy đủ thủ tục.

Đối với HTML hỗ trợ chuyển động, hãy xuất trạng thái cuối cùng rõ ràng: mở ?motion=static, đợi đã document.fonts.readyvà xác nhận gốc chuyển động có data-frame="static" trước khi bắt giữ. sử dụng ?motion=step&step=N chỉ khi một khung trung gian được đặt tên được yêu cầu.


Kiến trúc

Tiết lộ tiến bộ. SKILL.md định tuyến hành vi trước khi cần, sau đó là bố cục. Các tham chiếu ngữ nghĩa, loại và hoạt ảnh chỉ tải khi có liên quan.

diagram-design/
├── .agents/plugins/marketplace.json  # Codex marketplace catalog
├── .claude-plugin/                   # Claude marketplace + plugin manifest
├── .codex-plugin/                    # Codex plugin manifest
├── .factory-plugin/                  # Factory Droid marketplace + plugin manifest
├── .qoder-plugin/                    # Qoder native plugin manifest
├── commands/
│   ├── export-diagram.md             # plugin export command
│   ├── import-drawio.md              # plugin draw.io import command
│   ├── import-mermaid.md             # plugin Mermaid import command
│   ├── import-excalidraw.md          # plugin Excalidraw import command
│   ├── import-plantuml.md            # plugin PlantUML import command
│   ├── profile.md                    # plugin client-profile command
│   └── doctor.md                     # plugin environment diagnostics command
├── prompts/
│   ├── export-diagram.md             # Pi `/export-diagram` prompt template
│   ├── import-mermaid.md             # Pi Mermaid import prompt template
│   ├── import-excalidraw.md          # Pi Excalidraw import prompt template
│   ├── import-plantuml.md            # Pi PlantUML import prompt template
│   ├── profile.md                    # Pi `/profile` prompt template
│   └── doctor.md                     # Pi `/doctor` diagnostics prompt template
├── skills/
│   └── diagram-design/
│       ├── SKILL.md                  # philosophy, selection guide, checklist
│       ├── references/               # loaded only when a type or primitive is chosen
│       │   ├── style-guide.md        # single source of truth for colors + fonts
│       │   ├── semantic-patterns.md  # behavior patterns independent of layout
│       │   ├── animation.md          # optional motion + accessibility contract
│       │   ├── onboarding.md         # the URL-to-tokens flow
│       │   ├── profiles.md           # named client profiles + project markers
│       │   ├── doctor.md             # environment diagnostics
│       │   ├── import-drawio.md      # draw.io redraw procedure
│       │   ├── import-mermaid.md     # Mermaid redraw procedure
│       │   ├── import-excalidraw.md  # Excalidraw redraw procedure
│       │   ├── import-plantuml.md    # PlantUML redraw procedure
│       │   ├── output-spec.md        # format × size × detail level
│       │   ├── export.md             # SVG / PNG export + sizing
│       │   ├── export-registry.md    # block-metadata JSON sidecar export
│       │   ├── primitives-core.md    # exact markup for nodes, arrows, labels
│       │   ├── layout-budget.md      # 4px grid + per-type budgets
│       │   ├── primitive-annotation.md
│       │   ├── primitive-icons.md
│       │   ├── primitive-sketchy.md
│       │   ├── primitive-terminal.md
│       │   ├── type-architecture.md
│       │   ├── type-architecture-delta.md
│       │   ├── type-axonometric-plan.md
│       │   ├── type-bar.md
│       │   ├── type-data-flow.md
│       │   ├── type-db-schema.md
│       │   ├── type-dependency.md
│       │   ├── type-deployment.md
│       │   ├── type-dp-integration.md
│       │   ├── type-dp-security-matrix.md
│       │   ├── type-er.md
│       │   ├── type-event-modeling.md
│       │   ├── type-exploded.md
│       │   ├── type-fishbone.md
│       │   ├── type-flowchart.md
│       │   ├── type-gantt.md
│       │   ├── type-heatmap.md
│       │   ├── type-high-level.md
│       │   ├── type-it-state.md
│       │   ├── type-journey.md
│       │   ├── type-kanban.md
│       │   ├── type-layers.md
│       │   ├── type-line.md
│       │   ├── type-loop.md
│       │   ├── type-medallion.md
│       │   ├── type-nested.md
│       │   ├── type-org-chart.md
│       │   ├── type-polar.md
│       │   ├── type-process.md
│       │   ├── type-pyramid.md
│       │   ├── type-quadrant.md
│       │   ├── type-radar.md
│       │   ├── type-requirement-traceability.md
│       │   ├── type-sankey.md
│       │   ├── type-sbgn.md
│       │   ├── type-scatter.md
│       │   ├── type-schedule-network.md
│       │   ├── type-sequence.md
│       │   ├── type-service-blueprint.md
│       │   ├── type-state.md
│       │   ├── type-steps.md
│       │   ├── type-story-map.md
│       │   ├── type-swimlane.md
│       │   ├── type-timeline.md
│       │   ├── type-tree.md
│       │   ├── type-treemap.md
│       │   ├── type-uml-class.md
│       │   ├── type-unit-grid.md
│       │   ├── type-venn.md
│       │   ├── type-wardley.md
│       │   └── type-waterfall.md
│       ├── scripts/
│       │   ├── drawio_extract.py     # draw.io → structured IR
│       │   ├── mermaid_extract.py    # Mermaid → structured IR
│       │   ├── excalidraw_extract.py  # Excalidraw → structured IR
│       │   ├── plantuml_extract.py   # PlantUML → structured IR
│       │   ├── export_svg.py         # standalone SVG export
│       │   ├── export_png.py         # Playwright PNG renderer
│       │   ├── self_check.py         # packaged output self-check (runs installed)
│       │   └── verify_geometry.py    # label, connector and port geometry (runs installed)
│       └── assets/
│           ├── index.html            # live gallery, tabbed
│           ├── icons.html            # icon library browser
│           ├── template*.html        # scaffolds for new diagrams
│           ├── example-<type>.html   # 3 variants per type
│           ├── example-loop-terminal.html
│           ├── example-quadrant-consultant.html
│           ├── example-import-drawio.html
│           ├── example-import-mermaid.html
│           ├── example-import-excalidraw.html
│           ├── example-import-plantuml.html
│           ├── example-policy-trace-animated.html
│           └── example-sequence-oauth*.html
├── scripts/                          # CI gates and build helpers (see CONTRIBUTING.md)
│   ├── lint-skin.py                  # palette, fonts, a11y, single-file safety
│   ├── lint-render.py                # Chromium rendered-layout checker
│   ├── verify-docs-sync.py           # routing, gallery, README and count sync
│   ├── verify-geometry.py            # repo entry point for the packaged geometry check
│   ├── render-canonical-screenshots.py  # deterministic per-type PNG catalog renderer
│   ├── build-readme-thumbs.py        # regenerates docs/screenshots/thumbs/
│   ├── verify-sbgn.py                # SBGN bipartite process + compartment gate
│   └── fixtures/                     # draw.io, Mermaid, Excalidraw and PlantUML test inputs
├── docs/cookbook.md                  # operator recipes for editable installs and common tasks
├── docs/adr/                         # short records of settled design decisions
├── docs/superpowers/                 # design specs and implementation plans (plans/, specs/)
├── docs/hero/                        # README demo GIFs (dark, light) and social preview image
├── docs/screenshots/                 # full-resolution images + source-digest manifest.json
├── docs/screenshots/thumbs/          # generated WebP previews the README renders
├── CHANGELOG.md                      # release history
└── CONTRIBUTING.md                   # validation gates and how each one works

Điều này giữ cho bối cảnh làm việc của tác nhân được chặt chẽ: các sơ đồ thường trình tải một loại tham chiếu; sơ đồ giàu hành vi thêm tham chiếu ngữ nghĩa được định tuyến; hoạt hình chỉ thêm hợp đồng khi được chọn.

Những gì tải khi

Khi khởi động, tác nhân chỉ nhìn thấy tên kỹ năng và mô tả. Khi một yêu cầu phù hợp, nó sẽ tải SKILL.md; các tham chiếu ngữ nghĩa, loại và hoạt ảnh chỉ được đưa vào khi có liên quan.

Bạn yêu cầu… Tải đại lý
"Làm cho tôi một sơ đồ" SKILL.md + references/type-flowchart.md
"Xây dựng sơ đồ kiến trúc" SKILL.md + references/type-architecture.md
"Show nested admin vs traffic scopes" SKILL.md + references/type-architecture.md
"Show what was added, removed, changed, moved, or rewired in this migration" SKILL.md + references/type-architecture-delta.md
"Show what's inside this device, exploded" SKILL.md + references/type-exploded.md
"Draw our office floor plan" SKILL.md + references/type-axonometric-plan.md
"Show how beta-carotene is cleaved in cytosol" SKILL.md + references/type-sbgn.md
"So sánh lý do tại sao hai yêu cầu chính sách này khác nhau" SKILL.md + references/semantic-patterns.md + references/type-flowchart.md
"Hoạt hình hóa dấu vết chính sách đó" Lựa chọn trước + references/animation.md
"Đưa kỹ năng này vào trang web của tôi" SKILL.md + references/onboarding.md + references/style-guide.md
"Sử dụng hồ sơ khách hàng Acme đã lưu của tôi" SKILL.md + references/profiles.md + ~/.diagram-design/profiles/acme.md
"Thêm chú thích biên tập vào sơ đồ này" SKILL.md + references/primitive-annotation.md
"Hãy cho tôi một phiên bản vẽ tay" SKILL.md + references/primitive-sketchy.md
"Hãy cho tôi một phiên bản terminal/CLI-window" SKILL.md + references/primitive-terminal.md
"Vẽ lại tập tin .drawio này cho bộ bài của tôi" SKILL.md + references/import-drawio.md + references/output-spec.md + tham chiếu của loại đã chọn
"Vẽ lại khối Mermaid này cho bộ bài của tôi" SKILL.md + references/import-mermaid.md + references/output-spec.md + tham chiếu của loại đã chọn
"Redraw this Excalidraw sketch for my deck" SKILL.md + references/import-excalidraw.md + references/output-spec.md + tham chiếu của loại đã chọn
"Redraw this PlantUML sequence for my deck" SKILL.md + references/import-plantuml.md + references/output-spec.md + tham chiếu của loại đã chọn
Lập sơ đồ tĩnh định kỳ (bất kỳ loại trực quan nào) SKILL.md + tham chiếu của một loại đó, cộng thêm references/primitives-core.md hoặc references/layout-budget.md chỉ khi nó cần đánh dấu chính xác hoặc hàng ngân sách cho mỗi loại

Cho dù có bao nhiêu loại tồn tại, tác nhân chỉ đọc loại bạn cần. Thêm một loại mới vào ngày mai và không có gì thay đổi.


Nó hoạt động nếu…

  • Tải một yêu cầu thông thường ("làm cho tôi một sơ đồ") SKILL.md, chính xác là một loại tham chiếu và nhiều nhất là hai tham chiếu cốt lõi (primitives-core.md, layout-budget.md) và không có gì khác.
  • Trước khi vẽ, tác nhân nêu rõ loại, mẫu, kích thước đã chọn và các vết cắt theo kế hoạch, sau đó kết xuất.
  • Đầu ra là một .html file that opens double-clicked, offline, with no network requests beyond Google Fonts, and none at all with system fonts.
  • Trình đọc màn hình thông báo tiêu đề và mô tả của sơ đồ; prefers-reduced-motion hiển thị khung tĩnh hoàn chỉnh.
  • python3 skills/diagram-design/scripts/self_check.py <file> bản in OK on the generated file (add --offline to also fail on the Google Fonts link).
  • After brand onboarding, new diagrams use your site's paper, ink, accent, and fonts, with a fidelity receipt naming each.

Nếu bất kỳ lỗi nào trong số này không thành công thì đó là một lỗi đáng được báo cáo.

Hệ thống thiết kế (trong một đoạn)

One accent color, 1 or 2 focal elements per diagram. Three font families: Instrument Serif (title + italic callouts), Geist sans (node names), Geist Mono (technical sublabels). 1px hairline borders, no shadows, max border-radius 10px. Every coordinate, width, and gap is divisible by 4. That rule is non-negotiable; it's what keeps the diagrams from feeling AI-generated. Mono is for technical content (ports, URLs, field types), not a blanket "dev" aesthetic. Accent-tinted focal nodes draw the eye to the 1 or 2 things that matter. Full spec in SKILL.md.


nguyên thủy


Khi nào không để sử dụng kỹ năng này

  • Diagrams that live in Git and change every sprint → Mermaid. It diffs, and GitHub renders it.
  • Sơ đồ unicode nhanh đối với tweet hoặc đầu ra đầu cuối → kỹ năng kiểu wiretext.
  • Danh sách bất cứ thứ gì → một cái bàn hoặc viên đạn.
  • So sánh trước/sau → một cái bàn.
  • "Sơ đồ" một hình dạng (a single box with a label) → just write the sentence.

Trước khi vẽ hãy hỏi: Liệu người đọc có học được nhiều điều hơn từ điều này hơn là từ một đoạn văn hay không? Nếu không, đừng vẽ.


Đóng góp

Contributions are welcome: new diagram types, import grammar support, examples, docs, and tooling. ĐÓNG GÓP.md covers the validation gates (skin lint, render lint, geometry and data-encoding verifiers, docs sync), how each one works, and the CI setup. Every pull request runs them on Linux, Windows, and macOS. See CODE_OF_CONDUCT.md for community standards and CHANGELOG.md cho lịch sử phát hành.


Giới thiệu

được thực hiện bởi Cathryn Lavery. Tôi viết về AI, tinh thần kinh doanh và thiết kế những thứ đẹp mắt tại littlemight.com, blog + newsletter.

Other things I've made:

  • ShipRank: a public leaderboard for lines shipped.
  • The Non-Technical Technical Dictionary: tech and AI terms explained in plain English, one analogy at a time.
  • BestSelf.co: the SELF Journal and other paper tools for getting things done. Started on Kickstarter in 2015, sold to private equity in 2022, bought back 14 months later (the story).

Nếu điều này hữu ích, gắn dấu sao cho repo và đến nói xin chào trên X.

Dự án cùng danh mục

sindresorhus/awesome

😎 Danh sách tuyệt vời về tất cả các loại chủ đề thú vị [LƯU Ý: Yêu cầu kéo tạm thời bị vô hiệu hóa cho đến khi tôi có cơ hội bắt kịp những chủ đề hiện có]

504k37k2 tháng trước
GitHubKhác

EbookFoundation/free-programming-books

:books: Sách lập trình được cung cấp miễn phí

402k67k1 ngày trước
GitHubKhácPython

practical-tutorials/project-based-learning

Danh sách các hướng dẫn dựa trên dự án được tuyển chọn

290k37k6 ngày trước
GitHubKhácPython

torvalds/linux

Cây nguồn nhân Linux

257k67k6 giờ trước
GitHubKhácC

TheAlgorithms/Python

Tất cả các thuật toán được triển khai trong Python

225k51k1 tháng trước
GitHubKhácPython

CyC2018/CS-Notes

:books: 技术面试必备基础知识、Leetcode、计算机操作系统、计算机网络、系统设计

187k51k8 ngày trước
GitHubKhácJavaScript
cathrynlavery/diagram-design — Repo Trending