Excalidraw diagram
GitHub用于在 Kun 平台创建和迭代 Excalidraw 图表,支持私有聊天室及 Canvas 场景,提供工具路由、工作流及视觉设计规范。
Trigger Scenarios
Install
npx skills add KunAgent/Kun --skill Excalidraw diagram -g -y
SKILL.md
Frontmatter
{
"id": "excalidraw-diagram",
"name": "Excalidraw diagram",
"description": "Create and iterate Excalidraw diagrams on Kun Work, Design, Code, and private-chat room canvases."
}
Excalidraw diagram for Kun
Copyright (c) 2026 KunAgent. Licensed under the MIT License.
Use this skill when the turn says the canvas engine is Excalidraw, the user asks for an Excalidraw sketch, or they invoke /excalidraw. If the turn is a Kun ShapeOps / HTML canvas, leave this skill unused and follow diagram-design instead.
In a private-chat room there is no pre-opened board: call design_open_excalidraw first (pass a stable boardId slug for a second diagram), then use the host-returned scenePath from that tool result. design_open_excalidraw / design_apply_excalidraw are only available to writable GUI private chats; read-only rooms and non-GUI surfaces keep their existing tool policy.
Tool routing
| Tool | Use |
|---|---|
write / edit |
Mutate the canonical scenePath JSON. |
load_skill_asset |
Load one reference at a time. |
design_apply_excalidraw |
Reload the open board from that file, export the PNG sidecar, and wait for the renderer receipt. |
Read |
Inspect the PNG sidecar after an applied receipt. |
Never call design_update_shapes, design_create_screen, design_create_diagram, design_arrange, or HTML screen tools on an Excalidraw board.
Workflow
- Load
references/kun-scene.mdand use thescenePathfrom the turn. Do not invent a sibling.excalidrawfile. - Load
references/color-palette.mdbefore choosing fills or strokes. - Decide simple vs comprehensive. Comprehensive diagrams need research, evidence artifacts, and section-by-section writes.
- Map each concept to a distinct visual pattern (fan-out, convergence, timeline, tree, cycle, assembly). Avoid equal card grids.
- Load
references/element-templates.mdandreferences/json-schema.mdonly when writing JSON. - Empty board: write a complete scene. Existing user strokes: upsert by element
id; do not replace unrelated elements unless the user asked to redraw. - Build large diagrams one section per edit. Use descriptive ids (
auth_box,arrow_to_db) and section seed ranges (100xxx, 200xxx). - After each section, call
design_apply_excalidraw. TreatQueued/Acceptedas unapplied. Read the PNG sidecar only after a renderer receipt reports applied. - Audit the PNG: clipped text, overlaps, arrows through nodes, unbalanced whitespace. Edit JSON, apply, and re-read until the composition is showable.
Craft
- Diagrams should argue visually. Structure must still communicate if labels were removed.
- Default to free-floating text. Add rectangles only when the shape carries meaning.
roughness: 0,opacity: 100,fontFamily: 3. Elementtextholds readable words only.- Colors come from the palette. Do not invent new hex values.
Boundaries
- Do not use Python, Playwright, or a browser renderer. Kun exports the PNG.
- Do not emit Excalidraw JSON in assistant text.
- Do not load every reference at once.
Version History
- 9e4b90f Current 2026-09-27 19:10


