|
| 1 | +--- |
| 2 | +name: create-excalidraw-diagram |
| 3 | +description: Build a production-ready `.excalidraw` scene from architecture, flow, or product requirements. |
| 4 | +--- |
| 5 | + |
| 6 | +# Create Excalidraw diagram |
| 7 | + |
| 8 | +## Trigger |
| 9 | + |
| 10 | +Use when a user wants a new Excalidraw diagram from plain-language requirements. |
| 11 | + |
| 12 | +## Required Inputs |
| 13 | + |
| 14 | +- Diagram objective (what decision or flow it should communicate) |
| 15 | +- Preferred diagram type (architecture, sequence, flowchart, wireframe, timeline, etc.) |
| 16 | +- Output file path for the `.excalidraw` document |
| 17 | +- Optional style constraints (dark/light mode, color accents, level of detail) |
| 18 | + |
| 19 | +## Workflow |
| 20 | + |
| 21 | +1. Convert requirements into a compact scene plan: |
| 22 | + - Identify containers, nodes, and edge relationships. |
| 23 | + - Group elements by functional area. |
| 24 | +2. Translate the scene plan into Excalidraw elements: |
| 25 | + - Use clear labels and consistent spacing. |
| 26 | + - Keep directional flow obvious (typically left-to-right or top-to-bottom). |
| 27 | +3. Create or update the target `.excalidraw` file as valid JSON: |
| 28 | + - Include required top-level keys: `type`, `version`, `source`, `elements`, `appState`, `files`. |
| 29 | + - Ensure `elements` includes only valid object entries. |
| 30 | +4. Verify usability: |
| 31 | + - No major overlaps. |
| 32 | + - Labels are concise and readable. |
| 33 | + - Color usage is purposeful and accessible. |
| 34 | +5. Provide a short explanation of the structure and any assumptions. |
| 35 | + |
| 36 | +## Guardrails |
| 37 | + |
| 38 | +- Do not wrap `.excalidraw` JSON content in markdown code fences. |
| 39 | +- When editing an existing file, preserve existing element IDs unless replacement is intentional. |
| 40 | +- Prefer incremental updates to full scene rewrites. |
| 41 | +- Keep diagram scope focused on the stated objective. |
| 42 | + |
| 43 | +## Output |
| 44 | + |
| 45 | +- A saved `.excalidraw` file matching the requested scenario. |
| 46 | +- A concise change summary (what was added/updated and why). |
0 commit comments