diff --git a/.cursor-plugin/marketplace.json b/.cursor-plugin/marketplace.json index 918bb39..0a8a234 100644 --- a/.cursor-plugin/marketplace.json +++ b/.cursor-plugin/marketplace.json @@ -32,6 +32,11 @@ "name": "ralph-loop", "source": "ralph-loop", "description": "Iterative self-referential AI loops using the Ralph Wiggum technique." + }, + { + "name": "excalidraw", + "source": "excalidraw", + "description": "Create and iterate Excalidraw diagrams from architecture, flow, and product requirements." } ] } diff --git a/README.md b/README.md index 9aad033..fb84115 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ Official Cursor plugins for popular developer tools, frameworks, and SaaS produc | [Cursor Team Kit](cursor-team-kit/) | Developer Tools | Internal-style workflows for CI, code review, shipping, and testing | | [Create Plugin](create-plugin/) | Developer Tools | Meta workflows for creating Cursor plugins with scaffolding and submission checks | | [Ralph Loop](ralph-loop/) | Developer Tools | Iterative self-referential AI loops using the Ralph Wiggum technique | +| [Excalidraw](excalidraw/) | Developer Tools | Create and iterate Excalidraw diagrams from architecture, flow, and product requirements | ## Repository structure diff --git a/excalidraw/.cursor-plugin/plugin.json b/excalidraw/.cursor-plugin/plugin.json new file mode 100644 index 0000000..2bf1605 --- /dev/null +++ b/excalidraw/.cursor-plugin/plugin.json @@ -0,0 +1,28 @@ +{ + "name": "excalidraw", + "displayName": "Excalidraw", + "version": "1.0.0", + "description": "Create and iterate Excalidraw diagrams from architecture, flow, and product requirements.", + "author": { + "name": "Cursor", + "email": "plugins@cursor.com" + }, + "homepage": "https://github.com/cursor/plugins", + "repository": "https://github.com/cursor/plugins", + "license": "MIT", + "keywords": [ + "excalidraw", + "diagram", + "whiteboard", + "architecture", + "flowchart" + ], + "category": "developer-tools", + "tags": [ + "visualization", + "diagramming", + "planning" + ], + "skills": "./skills/", + "rules": "./rules/" +} diff --git a/excalidraw/CHANGELOG.md b/excalidraw/CHANGELOG.md new file mode 100644 index 0000000..7666225 --- /dev/null +++ b/excalidraw/CHANGELOG.md @@ -0,0 +1,11 @@ +# Changelog + +All notable changes to this plugin are documented in this file. + +## [1.0.0] - 2026-02-25 + +### Added + +- Initial release of the Excalidraw plugin. +- Two skills for creating and iterating `.excalidraw` diagrams. +- One always-applied integrity rule for `.excalidraw` file updates. diff --git a/excalidraw/LICENSE b/excalidraw/LICENSE new file mode 100644 index 0000000..ca2bba7 --- /dev/null +++ b/excalidraw/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Cursor + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/excalidraw/README.md b/excalidraw/README.md new file mode 100644 index 0000000..d67c8e8 --- /dev/null +++ b/excalidraw/README.md @@ -0,0 +1,34 @@ +# Excalidraw plugin + +Build and iterate Excalidraw diagrams directly from product and engineering context. + +## Installation + +```bash +/add-plugin excalidraw +``` + +## Components + +### Skills + +| Skill | Description | +|:------|:------------| +| `create-excalidraw-diagram` | Create a new `.excalidraw` diagram from architecture, UX, or workflow requirements | +| `iterate-excalidraw-diagram` | Apply targeted updates to an existing `.excalidraw` file while preserving structure | + +### Rules + +| Rule | Description | +|:-----|:------------| +| `excalidraw-file-integrity` | Keeps `.excalidraw` edits valid, incremental, and readable | + +## Typical flow + +1. Ask Cursor to draft or update a diagram from your requirements. +2. Review the generated `.excalidraw` file in Excalidraw. +3. Request focused iterations (layout, labels, grouping, styling) until ready. + +## License + +MIT diff --git a/excalidraw/rules/excalidraw-file-integrity.mdc b/excalidraw/rules/excalidraw-file-integrity.mdc new file mode 100644 index 0000000..8f1087b --- /dev/null +++ b/excalidraw/rules/excalidraw-file-integrity.mdc @@ -0,0 +1,15 @@ +--- +description: Keep `.excalidraw` documents valid, readable, and safe to iteratively edit. +alwaysApply: true +globs: ["**/*.excalidraw"] +--- + +# Excalidraw file integrity + +When creating or editing `.excalidraw` files: + +1. Always output valid JSON with the expected top-level scene shape (`type`, `version`, `source`, `elements`, `appState`, `files`). +2. Preserve existing element IDs for untouched elements to keep diffs reviewable and connectors stable. +3. Avoid large rewrites for small requests; prefer minimal, targeted modifications. +4. Keep labels concise and scene layout readable (reasonable spacing, limited overlap). +5. Do not include markdown code fences or extra prose inside `.excalidraw` files. diff --git a/excalidraw/skills/create-excalidraw-diagram/SKILL.md b/excalidraw/skills/create-excalidraw-diagram/SKILL.md new file mode 100644 index 0000000..aede7e9 --- /dev/null +++ b/excalidraw/skills/create-excalidraw-diagram/SKILL.md @@ -0,0 +1,46 @@ +--- +name: create-excalidraw-diagram +description: Build a production-ready `.excalidraw` scene from architecture, flow, or product requirements. +--- + +# Create Excalidraw diagram + +## Trigger + +Use when a user wants a new Excalidraw diagram from plain-language requirements. + +## Required Inputs + +- Diagram objective (what decision or flow it should communicate) +- Preferred diagram type (architecture, sequence, flowchart, wireframe, timeline, etc.) +- Output file path for the `.excalidraw` document +- Optional style constraints (dark/light mode, color accents, level of detail) + +## Workflow + +1. Convert requirements into a compact scene plan: + - Identify containers, nodes, and edge relationships. + - Group elements by functional area. +2. Translate the scene plan into Excalidraw elements: + - Use clear labels and consistent spacing. + - Keep directional flow obvious (typically left-to-right or top-to-bottom). +3. Create or update the target `.excalidraw` file as valid JSON: + - Include required top-level keys: `type`, `version`, `source`, `elements`, `appState`, `files`. + - Ensure `elements` includes only valid object entries. +4. Verify usability: + - No major overlaps. + - Labels are concise and readable. + - Color usage is purposeful and accessible. +5. Provide a short explanation of the structure and any assumptions. + +## Guardrails + +- Do not wrap `.excalidraw` JSON content in markdown code fences. +- When editing an existing file, preserve existing element IDs unless replacement is intentional. +- Prefer incremental updates to full scene rewrites. +- Keep diagram scope focused on the stated objective. + +## Output + +- A saved `.excalidraw` file matching the requested scenario. +- A concise change summary (what was added/updated and why). diff --git a/excalidraw/skills/iterate-excalidraw-diagram/SKILL.md b/excalidraw/skills/iterate-excalidraw-diagram/SKILL.md new file mode 100644 index 0000000..6cbe0b0 --- /dev/null +++ b/excalidraw/skills/iterate-excalidraw-diagram/SKILL.md @@ -0,0 +1,41 @@ +--- +name: iterate-excalidraw-diagram +description: Refine an existing Excalidraw file by applying focused, reversible diagram edits. +--- + +# Iterate Excalidraw diagram + +## Trigger + +Use when a user requests improvements to an existing `.excalidraw` file (layout cleanup, labeling, regrouping, or structural changes). + +## Required Inputs + +- Path to the existing `.excalidraw` file +- Requested changes (add/remove nodes, reroute edges, regroup sections, styling) +- Any constraints (preserve specific IDs, keep color palette, avoid moving certain areas) + +## Workflow + +1. Inspect the current scene: + - Identify target elements and related connectors. + - Confirm unchanged areas that must be preserved. +2. Apply changes incrementally: + - Modify only relevant elements. + - Keep IDs stable for untouched elements. +3. Rebalance the layout: + - Resolve overlaps and crossing connectors when practical. + - Maintain consistent spacing and readable labels. +4. Validate final JSON structure and scene integrity. +5. Summarize exactly what changed and what was intentionally preserved. + +## Guardrails + +- Preserve semantic flow unless the user explicitly requests re-architecture. +- Avoid deleting elements that may be referenced by connectors without replacement. +- Keep edits reversible and easy to review in version control. + +## Output + +- Updated `.excalidraw` file with targeted improvements. +- Brief delta summary highlighting changed sections and rationale.