obsidian-excalidraw-cli
Skill này làm gì
Skill này cho phép AI làm việc với các bản vẽ Excalidraw trong ứng dụng Obsidian đang chạy, qua giao diện dòng lệnh của nó. Skill có thể tạo, kiểm tra, chỉnh sửa và kết xuất bản vẽ. Skill dành cho người dùng Obsidian muốn AI thay đổi sơ đồ của họ.
Khi nào nên dùng
- ✓Khi bạn muốn AI tạo hoặc chỉnh sửa một bản vẽ Excalidraw trong Obsidian.
- ✓Khi bạn cần một ảnh xuất của bản vẽ cho một ghi chú hoặc tài liệu.
- ✓Khi bạn muốn kiểm tra rằng một thay đổi bản vẽ thực sự đã được lưu.
Liên kết skill
https://github.com/zsviczian/obsidian-excalidraw-plugin/blob/master/docs/AITrainingData/excalidraw-cli/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
“Thêm một sơ đồ luồng có nhãn vào bản vẽ onboarding.excalidraw trong Obsidian của tôi, rồi xuất nó thành ảnh.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill yêu cầu Obsidian đọc bản vẽ, áp dụng thay đổi với một ID yêu cầu duy nhất, kiểm tra thay đổi đã được lưu, rồi xuất ảnh để xem xét. Nó dùng đường dẫn bản vẽ chính xác.
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.
Use a local terminal with Obsidian running and CLI enabled (API 1.12.2+). Always put vault="<name or ID>" before the command. Native root: obsidian-excalidraw-plugin. Start with obsidian vault="<vault>" obsidian-excalidraw-plugin:help, then :schema action=create. All results use apiVersion 1. Check ok, mutation and persistence; process exit zero alone does not prove success. Put large requests in a visible vault-relative JSON file and pass input="<file>". Inline json is for small requests. Requests in files include apiVersion:1; the native command supplies command. The in-process ea.executeCLI request also includes command. Use exact drawing paths including extensions. Never assume an active drawing. :open explicitly creates a tab and can run configured drawing scripts. Loop: :read source=live detail=elements (or detail=images to inventory) → :apply with expectedRevision and a unique requestId → check persistence=saved → :export → inspect the image file. For duplicate views use the view ID from :open or :read. Refresh after STALE_REVISION; retry BUSY with the same requestId only when refused before execution; unknown outcomes require read-back. New skeleton IDs are local labels; use returned idMap actual IDs for updates. Updates reject identity, bindings and asset internals. Every write requires requestId. Repeat the identical effective request to retrieve its receipt; different content with the same ID fails. :result requestId=<id> recovers a receipt after lost stdout. Receipts expire after 15 minutes/reload; unknown outcome requires read-back before another write. :api surface=ea name=<method> gives existing EA signatures. :api surface=lib lists the supported installed Lib reference; advanced exports remain available to scripts. :icons query=<name> discovers installed canonical Lucide names (paged); create icons / apply op=lucide insert editable native groups. groupMap maps logical icon aliases to groupId/elementIds; idMap remains single-element only. Defaults: size=96, strokeColor=#1e1e1e, roughness=1, opacity=100; optional strokeWidth is final scene units. No trusted script is required. :script requires trusted=true and an explicit existing local script file. utils.input contains args; utils.excalidrawLib is the installed runtime. Await all work; completion does not imply saved drawing. One-shot EA is cleaned up; utility prompts fail INTERACTION_REQUIRED. Trusted code can still invoke other interactive APIs: this is not a sandbox, timeout cancellation or transaction. Export names an explicit out=.svg/.png; overwrite=true is required for existing outputs. Live exports never implicitly save. Disk exports require local Vault assets; use a loaded live source or placeholders for remote assets. For cheap previews: :read detail=images, then :export imagePolicy={"default":"placeholder","rules":[{"ids":["wanted-id"],"mode":"original"}]}. This is lossless for the underlying drawing, not the preview. imageMetadata apply operations set bounded descriptive label/tags, with null clearing; request-only imagePolicy.labels does not persist. Thumbnail mode uses thumbnailMaxDimension=512 by default; only PNG/JPEG/WebP with safe preflight dimensions are decoded (24 MiB / 16 million pixels maximum). maxWidth/maxHeight/maxPixels bound output dimensions; maxArtifactBytes caps final bytes. Source revision covers originals; representationId identifies the preview. SVG width controls display size, not embedded raster payload size; use imagePolicy for that. Use :schema for exact fields, operation limits, and runnable examples. Do not edit compressed drawing Markdown directly or install another Excalidraw CLI.
Câu hỏi thường gặp
Obsidian có cần đang chạy không?
Có. Cần mở Obsidian và đã bật giao diện dòng lệnh của nó.
Làm sao nó tránh lặp lại một thay đổi?
Mỗi lần ghi có một ID yêu cầu duy nhất, nên lặp lại cùng yêu cầu sẽ trả về cùng biên nhận thay vì tạo thêm một thay đổi.
Một lần chạy không lỗi đã đủ để tin tưởng chưa?
Chưa. Skill nói rằng cần kiểm tra thay đổi đã được lưu, vì một tiến trình thoát sạch không chứng minh là thành công.
Chi tiết
Mô tả gốc của tác giả
Create, inspect, edit and render Obsidian Excalidraw drawings through the running app's native CLI.
Độ phổ biến
- Sao GitHub
- 7.8k
- Vị trí xếp hạng
- #12829
- Giấy phép
- AGPL-3.0
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
Skill tương tự
knowledge-automation
394kGiúp agent của bạn thiết lập tác vụ định kỳ đưa nội dung mới vào kho Knowledge theo lịch, rồi kiểm tra tác vụ có chạy không.
knowledge-source-ingest
394kGiúp agent của bạn cập nhật Knowledge vault với các mục mới từ kênh chat, nguồn tin hoặc hộp thư, mà không thêm lại những gì đã có.
benchmark
280kGiúp agent của bạn đo tốc độ và hiệu suất của code, hữu ích để đảm bảo mọi thứ nhanh và tìm ra những chỗ chậm.