From excalidraw-diagram
Generate and modify Excalidraw diagrams from natural language and code analysis using skeleton JSON and a Node.js converter
npx claudepluginhub fakoli/fakoli-plugins --plugin excalidraw-diagramThis skill is limited to using the following tools:
Generate `.excalidraw` diagram files from natural language descriptions or code analysis. Uses a skeleton JSON intermediate format and a zero-dependency Node.js converter script.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Analyzes BMad project state from catalog CSV, configs, artifacts, and query to recommend next skills or answer questions. Useful for help requests, 'what next', or starting BMad.
Generate .excalidraw diagram files from natural language descriptions or code analysis. Uses a skeleton JSON intermediate format and a zero-dependency Node.js converter script.
| Action | How |
|---|---|
| Create a diagram | Generate skeleton JSON, pipe to converter |
| Modify a diagram | Read existing file, generate additions skeleton with --modify |
| Change layout | Set "layout" in skeleton: grid, top-down, left-right |
| Change theme | Set "theme" in skeleton: default, blueprint, warm, monochrome |
CONVERTER_PATH="${CLAUDE_PLUGIN_ROOT}/scripts/convert.js"
Write skeleton JSON to a temp file, then run the converter:
# Write skeleton to temp file
cat > /tmp/excalidraw-skeleton.json << 'SKELETON_EOF'
{
"type": "excalidraw-skeleton",
"version": 1,
"theme": "default",
"layout": "top-down",
"elements": [
{ "type": "ellipse", "id": "start", "label": "Start", "color": "green", "width": 120, "height": 60 },
{ "type": "rectangle", "id": "process", "label": "Process Data", "color": "blue" },
{ "type": "diamond", "id": "decision", "label": "Valid?", "color": "orange", "width": 140, "height": 100 },
{ "type": "rectangle", "id": "success", "label": "Save Result", "color": "green" },
{ "type": "rectangle", "id": "error", "label": "Handle Error", "color": "red" },
{ "type": "arrow", "from": "start", "to": "process" },
{ "type": "arrow", "from": "process", "to": "decision" },
{ "type": "arrow", "from": "decision", "to": "success", "label": "Yes" },
{ "type": "arrow", "from": "decision", "to": "error", "label": "No" }
]
}
SKELETON_EOF
# Convert
node "${CLAUDE_PLUGIN_ROOT}/scripts/convert.js" /tmp/excalidraw-skeleton.json ./diagram.excalidraw
# Write additions skeleton
cat > /tmp/excalidraw-additions.json << 'SKELETON_EOF'
{
"type": "excalidraw-skeleton",
"version": 1,
"elements": [
{ "type": "rectangle", "id": "cache", "label": "Redis Cache", "color": "red", "x": 500, "y": 200, "width": 180, "height": 70 },
{ "type": "arrow", "from": "cache", "to": "db", "label": "Fallback", "style": "dashed" }
],
"remove": ["legacy-adapter"]
}
SKELETON_EOF
# Modify
node "${CLAUDE_PLUGIN_ROOT}/scripts/convert.js" --modify ./architecture.excalidraw /tmp/excalidraw-additions.json ./architecture-updated.excalidraw
echo '{"type":"excalidraw-skeleton","version":1,"layout":"grid","elements":[{"type":"rectangle","id":"a","label":"Service A","color":"blue"},{"type":"rectangle","id":"b","label":"Service B","color":"green"},{"type":"arrow","from":"a","to":"b"}]}' | node "${CLAUDE_PLUGIN_ROOT}/scripts/convert.js" --stdin ./quick-diagram.excalidraw
rectangle — Default shape, good for services/processesdiamond — Decision points, conditionalsellipse — Start/end states, external entitiesfrom/to — Connect shapes by ID (converter handles binding)label — Text on the arrowstyle — solid, dashed, dottedstartArrowhead/endArrowhead — null, arrow, bar, circle, triangle, diamondSemantic names: blue, red, green, orange, violet, yellow, cyan, teal, pink, grape, gray, black, white, bronze
Or use hex: "#ff6600"
grid — Default, rows and columnstop-down / tree / flowchart — Hierarchy flows downwardleft-right / pipeline / flow — Flows left to rightdefault — Colorful with white backgroundblueprint — Dark background, light strokes, no fillswarm — Warm-toned backgroundsmonochrome — All grayWhen generating diagrams from a codebase:
Grep to find import statements, map dependencies between modules.Glob to find package.json files, understand module boundaries.Example analysis patterns:
# Find all imports in a directory
Grep: import.*from (in src/**/*.ts)
# Find package boundaries
Glob: **/package.json
# Find API routes
Grep: (router\.(get|post|put|delete)|app\.(get|post|put|delete))
# Find React components
Grep: export.*function.*\(|export.*const.*=.*=>
After running the converter, it outputs JSON to stdout:
{"success": true, "outputPath": "/absolute/path/to/diagram.excalidraw", "elementCount": 12, "message": "Wrote 12 elements to ..."}
Always report the file path to the user and suggest opening with excalidraw.com.