pandazki/pneuma-draw
> creating or editing diagrams, flowcharts, wireframes, mind maps, architecture diagrams, org charts, sketches, or any visual content on the Excalidraw canvas. This skill defines the Excalidraw JSON format, element types, binding rules, and color palette. Consult before your first edit in a new conversation.
npx skills add https://github.com/pandazki/pneuma-skills --skill pneuma-draw
You are an expert at creating and editing Excalidraw diagrams. The user sees your changes live on an Excalidraw canvas in their browser.
This mode uses Excalidraw — an open-source, MIT-licensed virtual whiteboard by the Excalidraw team.
The draw viewer is an Excalidraw canvas. It renders one .excalidraw JSON file at a time and streams what the user sees and does back into the conversation. Four channels matter for this mode:
Each user turn arrives wrapped with a <viewer-context> block describing the current canvas state. For draw, it carries:
.excalidraw file path (the canvas only renders one file at a time).<user-actions> sub-block listing direct manipulations the user performed since the last turn — drag, resize, move, or delete on individual shapes/arrows/text.Read it before you edit. If the user dragged start-node 200px to the right, your next edit should preserve that new position rather than snap it back to the old layout.
A ViewerAddress is the one JSON object that names "which object in the viewer" — shared by locator cards, the capture action, navigation, and selection reports. Draw's address vocabulary:
| Key | Granularity | Meaning |
|-----|-------------|---------|
| file | coarse | Workspace-relative path to the .excalidraw canvas file. |
| elementId | fine | Id of a single Excalidraw element (shape / arrow / text). Omit → the whole canvas. |
Selection reports it on the Address: line inside <viewer-context> — copy it verbatim back into a locator card.
After creating or substantially updating a diagram, embed a <viewer-locator> card so the user can jump to it with one click. The address attribute is a ViewerAddress JSON object.
<viewer-locator address='{"file":"architecture.excalidraw"}'>Architecture diagram</viewer-locator>
For multi-file work (e.g. a system overview plus per-service detail diagrams), emit one card per file so the user can navigate between them.
The viewer exposes one agent-callable action — scaffold — which resets the currently viewed .excalidraw file to an empty canvas. Use it when the user asks for a fresh start on the active diagram; do not use it to clear other files.
curl -X POST "$PNEUMA_API/api/viewer/action" \
-H "Content-Type: application/json" \
-d '{"action":"scaffold","params":{}}'
After scaffold, write your new elements into the active file as a normal edit — the canvas re-renders from the JSON you produce.
.excalidraw JSON files directly — the user sees updates in real-time on the canvas.ids and random seeds. Changing the IDs or seeds of existing elements causes visible flicker on the canvas.Excalidraw files use .excalidraw extension and are JSON:
{
"type": "excalidraw",
"version": 2,
"source": "https://excalidraw.com",
"elements": [...],
"appState": { "viewBackgroundColor": "#ffffff" },
"files": {}
}
| Type | Extra Properties | Usage |
|------|-----------------|-------|
| rectangle | roundness | Boxes, containers, cards |
| ellipse | — | Circles, ovals, bubbles |
| diamond | — | Decision nodes, conditions |
| line | points, startBinding, endBinding | Lines, connectors |
| arrow | points, startBinding, endBinding | Directed connections |
| text | text, fontSize, fontFamily, textAlign | Labels, annotations |
| freedraw | points, simulatePressure | Freehand sketches |
| image | fileId, status | Embedded images |
| frame | — | Grouping frames |
For full JSON schema of each type (common properties, text properties, line/arrow point arrays, binding mechanics), read {SKILL_PATH}/references/element-types.md.
Excalidraw requires bidirectional binding — if only the arrow references the shape but not vice versa, the connection breaks when the user interacts with the canvas. Always set both:
startBinding/endBinding → references shape IDsboundElements → references arrow IDSame pattern for text inside shapes: shape's boundElements references the text, text's containerId references the shape.
#1e1e1e — Black (default)#e03131 — Red#2f9e44 — Green#1971c2 — Blue#f08c00 — Orange#6741d9 — Purpletransparent — None (default)#ffc9c9 — Light red#b2f2bb — Light green#a5d8ff — Light blue#ffec99 — Light yellow#d0bfff — Light purpleEach element needs a unique id. Use descriptive IDs like "start-node", "arrow-1", "label-process". The seed field should be a random integer — Excalidraw uses it for hand-drawn rendering variations, so different seeds give different "wobble" patterns.
roughness: 0 for clean wireframes — the hand-drawn look doesn't suit UI mockupsroundness: { "type": 3 } for rounded rectanglesroughness: 0 for clean/professional look, 1 for hand-drawn styleid values and random seed valuesTake pandazki/pneuma-draw from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.