diagram
Skill này làm gì
Skill này cho agent biết khi nào một sơ đồ hoặc hình minh họa đơn giản sẽ giải thích một ý kỹ thuật tốt hơn văn bản. Skill dành cho người cần hiểu luồng mã chạy thế nào hoặc các phần ghép lại với nhau ra sao.
Khi nào nên dùng
- ✓Khi một giải thích bằng văn bản về luồng hoặc cấu trúc mã khó theo dõi.
- ✓Khi bạn muốn thấy các phần của một hệ thống gọi hoặc phụ thuộc vào nhau thế nào.
- ✓Khi bạn muốn một sơ đồ đơn giản cho một thay đổi trong tài liệu hoặc câu trả lời chat.
Liên kết skill
https://github.com/Yeachan-Heo/oh-my-claudecode/blob/main/skills/diagram/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Bạn có thể cho tôi thấy quá trình đăng nhập chạy qua mã của chúng tôi thế nào, bằng sơ đồ đơn giản nhất mà vẫn rõ ràng không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent chọn một góc nhìn phù hợp với câu hỏi, chẳng hạn mã giả, cây lời gọi, cây file, hoặc sơ đồ Mermaid. Nó bỏ qua hình minh họa khi văn xuôi đã trả lời đủ câu hỏi.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Diagrams are load-bearing, not decoration. Reach for one only when prose forces the reader to hold a whole shape in their head at once — then pick the smallest view that lets them see the shape instead of reconstructing it from sentences. Everything here renders in the conversation as text blocks or Mermaid; at most one artifact file is ever written.
The vocabulary
Pick one view; two at most. More is noise.
Pseudocode — logic without language noise. Reduces a decision to its branching shape:
on(request)
if state file locked by another writer
queue and return pending
acquire lock
write
release
Call tree — runtime control flow. Depth shows who owns the flow; annotate where the interesting edge is:
acquireStateFileLockSync()
resolveLockPath()
openExclusive()
writePid()
Component tree — UI or module structure, with the boundaries that matter annotated inline:
<SettingsPage> (src/routes/settings)
<SessionList> (owns its fetches)
<DangerZone>
<ConfirmButton> (disabled until typed confirmation)
File tree — where responsibility lives; keep it shallow, one annotation per directory:
src/
├── hooks/ # hook registry + types
├── tools/ # MCP tool handlers
└── workflow/ # registry + projections
Mermaid — interaction between parties, dataflow, or state transitions:
sequenceDiagram
participant CLI
participant Hook
participant State
CLI->>Hook: PreToolUse
Hook->>State: read mode
Hook-->>CLI: allow / deny + facts
Diff — the shape of a change when the surrounding structure already exists. Match the diff to the topic:
a component change:
<SettingsPage>
<SessionList />
<DangerZone>
+ <ConfirmButton />
</DangerZone>
a file-layout change:
src/tools/
-└── state-tools.ts
+└── state-tools/
+ ├── handlers.ts
+ └── schema.ts
a control-flow change:
commit()
stage()
hashBlobs()
+ writeObject()
updateRef()
+ acquireStateFileLock()
a state-machine change:
on(request)
- write immediately
+ if locked
+ queue and return pending
+ acquire lock
+ write
+ release
The whole block — when elision would hide who owns what or the order things run in, show the complete unit once, copyable:
export function isRegistryEnabled(): boolean {
const flag = process.env.OMC_WORKFLOW_REGISTRY;
return flag !== '0' && flag !== 'false';
}
When text runs out
A UI layout, a before/after comparison, or a concept too dense for Mermaid: write one focused HTML file — a diagram, an infographic, or a few slides — styled after the product's own colors, type, and components, filled with real labels and data, working on desktop and mobile. Open it with the platform opener (start on Windows, open on macOS, xdg-open on Linux) and stop there: one artifact, not a gallery.
Discipline
- Place each visual directly beside the two or three sentences it supports.
- Carry only the calls, files, props, states, and boundaries that answer the current question — every extra node is a decoding tax on the reader.
- If the honest answer fits in one sentence, write the sentence.
Câu hỏi thường gặp
Nó có luôn thêm sơ đồ không?
Không. Nó chỉ thêm khi văn xuôi buộc bạn phải giữ toàn bộ hình dạng trong đầu.
Nó dùng những loại sơ đồ nào?
Mã giả, cây lời gọi, cây thành phần, cây file, sơ đồ Mermaid và diff.
Nó có tạo tệp hình ảnh không?
Nhiều nhất một tệp artifact được viết, và hầu hết hình minh họa xuất hiện dưới dạng khối văn bản trong chat.
Chi tiết
Mô tả gốc của tác giả
Use the smallest visual when prose must carry structure—control flow, call depth, module ownership, or change shape: pseudocode, call tree, component/file tree, Mermaid diagram, or diff. Skip it when prose already answers the question.
Độ phổ biến
- Sao GitHub
- 41k
- Vị trí xếp hạng
- #7001
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
agent-doc-discipline
41kDạy agent của bạn viết hướng dẫn mà các agent AI khác có thể tự làm theo, với các quy tắc có thể kiểm tra và lý do rõ ràng đằng sau mỗi quy tắc.
ai-slop-cleaner
41kGiúp agent của bạn dọn dẹp mã do AI viết mà chạy được nhưng cồng kềnh hoặc lặp lại, loại bỏ mã thừa mà không thay đổi những gì nó làm.
architecture-survey
41kGiúp agent của bạn xem xét cấu trúc một codebase và liệt kê các phần ngày càng khó thay đổi, kèm bằng chứng, mà không tự thay đổi gì.
ask-navigator
41kGiúp agent của bạn biến một dự án còn mơ hồ thành bản đồ các câu hỏi quyết định rõ ràng, rồi giải quyết từng câu một cho đến khi con đường trở nên rõ.
Skill tương tự
technical-documentation
394kGiúp agent của bạn viết và rà soát tài liệu kỹ thuật cùng file hướng dẫn cho agent, rõ ràng để mọi người và công cụ AI đều dễ làm theo.
architecture-decision-records
280kGiúp agent của bạn ghi lại các quyết định quan trọng về cấu trúc dự án, giúp hiểu lý do đằng sau các lựa chọn và giữ lịch sử thay đổi rõ ràng.
code-tour
280kGiúp agent của bạn tạo các hướng dẫn đọc code từng bước, có tham chiếu chính xác đến file và dòng, hữu ích cho phần giới thiệu, giải thích và rà soát.