Skip to content

Commit 31e1cbf

Browse files
cursoragentn2parko
andcommitted
Add Excalidraw Cursor plugin with skills and rule
Co-authored-by: n2parko <n2parko@users.noreply.github.com>
1 parent 46c85c6 commit 31e1cbf

9 files changed

Lines changed: 202 additions & 0 deletions

File tree

.cursor-plugin/marketplace.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@
3232
"name": "ralph-loop",
3333
"source": "ralph-loop",
3434
"description": "Iterative self-referential AI loops using the Ralph Wiggum technique."
35+
},
36+
{
37+
"name": "excalidraw",
38+
"source": "excalidraw",
39+
"description": "Create and iterate Excalidraw diagrams from architecture, flow, and product requirements."
3540
}
3641
]
3742
}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Official Cursor plugins for popular developer tools, frameworks, and SaaS produc
1111
| [Cursor Team Kit](cursor-team-kit/) | Developer Tools | Internal-style workflows for CI, code review, shipping, and testing |
1212
| [Create Plugin](create-plugin/) | Developer Tools | Meta workflows for creating Cursor plugins with scaffolding and submission checks |
1313
| [Ralph Loop](ralph-loop/) | Developer Tools | Iterative self-referential AI loops using the Ralph Wiggum technique |
14+
| [Excalidraw](excalidraw/) | Developer Tools | Create and iterate Excalidraw diagrams from architecture, flow, and product requirements |
1415

1516
## Repository structure
1617

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "excalidraw",
3+
"displayName": "Excalidraw",
4+
"version": "1.0.0",
5+
"description": "Create and iterate Excalidraw diagrams from architecture, flow, and product requirements.",
6+
"author": {
7+
"name": "Cursor",
8+
"email": "plugins@cursor.com"
9+
},
10+
"homepage": "https://github.com/cursor/plugins",
11+
"repository": "https://github.com/cursor/plugins",
12+
"license": "MIT",
13+
"keywords": [
14+
"excalidraw",
15+
"diagram",
16+
"whiteboard",
17+
"architecture",
18+
"flowchart"
19+
],
20+
"category": "developer-tools",
21+
"tags": [
22+
"visualization",
23+
"diagramming",
24+
"planning"
25+
],
26+
"skills": "./skills/",
27+
"rules": "./rules/"
28+
}

excalidraw/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Changelog
2+
3+
All notable changes to this plugin are documented in this file.
4+
5+
## [1.0.0] - 2026-02-25
6+
7+
### Added
8+
9+
- Initial release of the Excalidraw plugin.
10+
- Two skills for creating and iterating `.excalidraw` diagrams.
11+
- One always-applied integrity rule for `.excalidraw` file updates.

excalidraw/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Cursor
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

excalidraw/README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Excalidraw plugin
2+
3+
Build and iterate Excalidraw diagrams directly from product and engineering context.
4+
5+
## Installation
6+
7+
```bash
8+
/add-plugin excalidraw
9+
```
10+
11+
## Components
12+
13+
### Skills
14+
15+
| Skill | Description |
16+
|:------|:------------|
17+
| `create-excalidraw-diagram` | Create a new `.excalidraw` diagram from architecture, UX, or workflow requirements |
18+
| `iterate-excalidraw-diagram` | Apply targeted updates to an existing `.excalidraw` file while preserving structure |
19+
20+
### Rules
21+
22+
| Rule | Description |
23+
|:-----|:------------|
24+
| `excalidraw-file-integrity` | Keeps `.excalidraw` edits valid, incremental, and readable |
25+
26+
## Typical flow
27+
28+
1. Ask Cursor to draft or update a diagram from your requirements.
29+
2. Review the generated `.excalidraw` file in Excalidraw.
30+
3. Request focused iterations (layout, labels, grouping, styling) until ready.
31+
32+
## License
33+
34+
MIT
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
description: Keep `.excalidraw` documents valid, readable, and safe to iteratively edit.
3+
alwaysApply: true
4+
globs: ["**/*.excalidraw"]
5+
---
6+
7+
# Excalidraw file integrity
8+
9+
When creating or editing `.excalidraw` files:
10+
11+
1. Always output valid JSON with the expected top-level scene shape (`type`, `version`, `source`, `elements`, `appState`, `files`).
12+
2. Preserve existing element IDs for untouched elements to keep diffs reviewable and connectors stable.
13+
3. Avoid large rewrites for small requests; prefer minimal, targeted modifications.
14+
4. Keep labels concise and scene layout readable (reasonable spacing, limited overlap).
15+
5. Do not include markdown code fences or extra prose inside `.excalidraw` files.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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).
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
name: iterate-excalidraw-diagram
3+
description: Refine an existing Excalidraw file by applying focused, reversible diagram edits.
4+
---
5+
6+
# Iterate Excalidraw diagram
7+
8+
## Trigger
9+
10+
Use when a user requests improvements to an existing `.excalidraw` file (layout cleanup, labeling, regrouping, or structural changes).
11+
12+
## Required Inputs
13+
14+
- Path to the existing `.excalidraw` file
15+
- Requested changes (add/remove nodes, reroute edges, regroup sections, styling)
16+
- Any constraints (preserve specific IDs, keep color palette, avoid moving certain areas)
17+
18+
## Workflow
19+
20+
1. Inspect the current scene:
21+
- Identify target elements and related connectors.
22+
- Confirm unchanged areas that must be preserved.
23+
2. Apply changes incrementally:
24+
- Modify only relevant elements.
25+
- Keep IDs stable for untouched elements.
26+
3. Rebalance the layout:
27+
- Resolve overlaps and crossing connectors when practical.
28+
- Maintain consistent spacing and readable labels.
29+
4. Validate final JSON structure and scene integrity.
30+
5. Summarize exactly what changed and what was intentionally preserved.
31+
32+
## Guardrails
33+
34+
- Preserve semantic flow unless the user explicitly requests re-architecture.
35+
- Avoid deleting elements that may be referenced by connectors without replacement.
36+
- Keep edits reversible and easy to review in version control.
37+
38+
## Output
39+
40+
- Updated `.excalidraw` file with targeted improvements.
41+
- Brief delta summary highlighting changed sections and rationale.

0 commit comments

Comments
 (0)