Chuyển đến nội dung
Skillpedia
Tài liệu kỹ thuật33k · #8686

excalidraw

Skill này làm gì

Skill này giúp AI của bạn làm việc với file Excalidraw, là các tài liệu JSON lớn. Nó dành cho những người tạo hoặc thay đổi sơ đồ và muốn tránh làm đầy cuộc trò chuyện bằng dữ liệu thô của file.

Khi nào nên dùng

  • ✓Khi bạn cần giải thích, cập nhật hoặc tạo một sơ đồ Excalidraw.
  • ✓Khi bạn muốn trực quan hóa một luồng hoặc kiến trúc thành file Excalidraw.
  • ✓Khi bạn có nhiều file Excalidraw và muốn xem lại mà không làm cạn ngữ cảnh của cuộc trò chuyện.

Liên kết skill

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/creative-design/excalidraw/SKILL.md

Sao 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

Hãy dùng skill này để giúp tôi: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/creative-design/excalidraw/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Hãy giải thích giúp tôi file architecture.excalidraw thể hiện điều gì, mà không tải toàn bộ file vào cuộc trò chuyện của chúng ta.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill giao công việc Excalidraw cho một subagent. Subagent đọc JSON lớn và trả về bản tóm tắt ngắn hoặc phần thay đổi. Cuộc trò chuyện chính chỉ nhận kết quả, nên phiên làm việc vẫn nhanh.

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.

Excalidraw Subagent Delegation

Overview

Core principle: Main agents NEVER read Excalidraw files directly. Always delegate to subagents to isolate context consumption.

Excalidraw files are JSON with high token cost but low information density. Single files range from 4k-22k tokens (largest can exceed read tool limits). Reading multiple diagrams quickly exhausts context budget (7 files = 67k tokens = 33% of budget).

The Problem

Excalidraw JSON structure:

  • Each shape has 20+ properties (x, y, width, height, strokeColor, seed, version, etc.)
  • Most properties are visual metadata (positioning, styling, roughness)
  • Actual content: text labels and element relationships (<10% of file)
  • Signal-to-noise ratio is extremely low

Example: 14-element diagram = 596 lines, 16K, ~4k tokens. 79-element diagram = 2,916 lines, 88K, ~22k tokens (exceeds read limit).

When to Use

Trigger on ANY of these:

  • File path contains .excalidraw or .excalidraw.json
  • User requests: "explain/update/create diagram", "show architecture", "visualize flow"
  • User mentions: "flowchart", "architecture diagram", "Excalidraw file"
  • Architecture/design documentation tasks involving visual artifacts

Use delegation even for:

  • "Small" files (smallest is 4k tokens - still significant)
  • "Quick checks" (checking component names still loads full JSON)
  • Single file operations (isolation prevents context pollution)
  • Modifications (don't need full format understanding in main context)

Delegation Pattern

Main Agent Responsibilities

NEVER:

  • ❌ Use Read tool on *.excalidraw files
  • ❌ Parse Excalidraw JSON in main context
  • ❌ Load multiple diagrams for comparison
  • ❌ Inspect file to "understand the format"

ALWAYS:

  • ✅ Delegate ALL Excalidraw operations to subagents
  • ✅ Provide clear task description to subagent
  • ✅ Request text-only summaries (not raw JSON)
  • ✅ Keep diagram analysis isolated from main work

Subagent Task Templates

Read/Understand Operation

Task: Extract and explain the components in [file.excalidraw.json]

Approach:
1. Read the Excalidraw JSON
2. Extract only text elements (ignore positioning/styling)
3. Identify relationships between components
4. Summarize architecture/flow

Return:
- List of components/services with descriptions
- Connection/dependency relationships
- Key insights about the architecture
- DO NOT return raw JSON or verbose element details

Modify Operation

Task: Add [component] to [file.excalidraw.json], connected to [existing-component]

Approach:
1. Read file to identify existing elements
2. Find [existing-component] and its position
3. Create new element JSON for [component]
4. Add arrow elements for connections
5. Write updated file

Return:
- Confirmation of changes made
- Position of new element
- IDs of created elements

Create Operation

Task: Create new Excalidraw diagram showing [description]

Approach:
1. Design layout for [number] components
2. Create rectangle elements with text labels
3. Add arrows showing relationships
4. Use consistent styling (colors, fonts)
5. Write to [file.excalidraw.json]

Return:
- Confirmation of file created
- Summary of components included
- File location

Compare Operation

Task: Compare architecture approaches in [file1] vs [file2]

Approach:
1. Read both files
2. Extract text labels from each
3. Identify structural differences
4. Compare component relationships

Return:
- Key differences in architecture
- Components unique to each approach
- Relationship/flow differences
- DO NOT return full element details from both files

Common Rationalizations (STOP and Delegate Instead)

Excuse Reality What to Do
"Direct reading is most efficient" Consumes 4k-22k tokens unnecessarily Delegate to subagent
"It's token-efficient to read directly" Baseline tests showed 9-45% budget used Always delegate
"This is optimal for one-time analysis" "One-time" still pollutes main context Subagent isolation
"The JSON is straightforward" Simplicity ≠ token efficiency Delegate anyway
"I need to understand the format" Format understanding not needed in main agent Subagent handles format
"Within reasonable bounds" (18k tokens) "Reasonable" is subjective rationalization Hard rule: delegate
"Just a quick check of components" "Quick check" still loads full JSON Extract text via subagent
"File is small (1
Câu hỏi thường gặp

Vì sao phải dùng subagent?

Hướng dẫn cho biết JSON của Excalidraw có tỉ lệ tín hiệu trên nhiễu thấp và có thể lên đến hàng chục nghìn token.

Có áp dụng cho file nhỏ không?

Có. Hướng dẫn cho rằng ngay cả file nhỏ cũng nên giao cho subagent, vì các bước kiểm tra vẫn phải tải toàn bộ JSON.

Skill bao gồm những loại file nào?

Skill bao gồm file .excalidraw và .excalidraw.json.

Chi tiết

Mô tả gốc của tác giả

Use when working with *.excalidraw or *.excalidraw.json files, user mentions diagrams/flowcharts, or requests architecture visualization - delegates all Excalidraw operations to subagents to prevent context exhaustion from verbose JSON (single files: 4k-22k tokens, can exceed read limits)

repo: davila7/claude-code-templates

Độ phổ biến

Sao GitHub
33k
Vị trí xếp hạng
#8686
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự