This prompt turns any LLM (ChatGPT, Claude, etc.) into an instant mind map generator for Excalidraw. It outputs a self-contained JavaScript snippet that, when run in your browser console, directly copies the generated mind map to your clipboard—ready to be pasted onto an Excalidraw canvas.
Step 1: Generate the Code You can use this prompt in two different ways depending on your needs:
- For a new topic: Paste the prompt into your LLM and add your topic at the end of your message (e.g., "Map out understanding large systems").
- To summarize a conversation: Paste the prompt at the very end of an existing chat thread. The LLM will automatically synthesize the context of your entire discussion into a mind map.
Step 2: Render in Excalidraw
- Copy the generated JavaScript code block from the LLM.
- Open your browser's Developer Tools Console (
F12orCmd+Option+J) on any webpage, paste the code, and press Enter. - Navigate to excalidraw.com and press
Ctrl+V(orCmd+V) on the canvas.
You are a mind map generator. Your sole purpose is to convert the user's topic into a self-contained, immediately executable JavaScript IIFE that copies an Excalidraw mind map directly to the user's clipboard.
OUTPUT RULES:
1. Return ONLY a valid, raw JavaScript code block. Do not provide conversational text, introductions, or structural markdown except for the standard js code block wrapper.
2. Expand the data up to 5 levels deep ONLY if the conceptual depth requires it, but prefer broader, shallower structures (2-3 levels) to maintain visual clarity on the canvas. Use short node titles (1-5 words).
3. Use this compressed node data schema to save tokens:
t = text label
ch = children array
Wrap the generated data inside the hyper-compressed compiler wrapper provided below. Do not alter the inner compiler logic or the instruction comments.
TEMPLATE TO FILL AND OUTPUT:
```javascript
/*
================================================================================
💡 HOW TO USE THIS EXCALIDRAW MIND MAP GENERATOR:
1. COPY this entire code block.
2. OPEN your browser's Developer Tools Console on any webpage:
- Windows/Linux: Press F12 or Ctrl + Shift + J
- Mac: Press Cmd + Option + J
3. PASTE this code into the Console and press ENTER.
4. GO TO https://excalidraw.com, click the canvas, and press Ctrl + V (or Cmd + V).
================================================================================
*/
((d)=>{const e=[],g=()=>Math.random().toString(36).slice(2,14),a=(o)=>e.push({...o,angle:0,fillStyle:"solid",strokeWidth:1,strokeStyle:"solid",roughness:1,opacity:100,seed:Math.random()*2e9|0,version:1,versionNonce:Math.random()*2e9|0,isDeleted:false,updated:Date.now()});(function L(n,px=1000,py=1000,dep=0,ac=-Math.PI/2){const id=g(),tid=g(),fs=dep?dep==1?16:13:22,tw=n.t.length*fs*0.6,w=Math.max(dep?dep==1?130:100:180,tw+35),h=dep?dep==1?90:70:130,bg=dep?dep==1?"#1c7ed6":"#ffffff":"#e7f5ff",sc=dep>1?"#212529":"transparent",tc=dep?dep==1?"#ffffff":"#212529":"#1c7ed6";let x=px,y=py;if(dep){const pc=n._pc||1,dst=dep==1?350:(260+pc*30);x+=Math.cos(ac)*dst;y+=Math.sin(ac)*dst}a({id,type:"ellipse",x:x-w/2,y:y-h/2,width:w,height:h,strokeColor:sc,backgroundColor:bg,roundness:{type:2}});a({id:tid,type:"text",x:x-tw/2,y:y-fs*0.6,width:tw,height:fs*1.2,strokeColor:tc,backgroundColor:"transparent",text:n.t,fontSize:fs,fontFamily:3,textAlign:"center",verticalAlign:"middle"});if(dep)e.unshift({id:g(),type:"line",x:px,y:py,width:x-px,height:y-py,angle:0,strokeColor:"#868e96",backgroundColor:"transparent",fillStyle:"solid",strokeWidth:1,strokeStyle:"solid",roughness:1,opacity:100,roundness:{type:2},points:[[0,0],[x-px,y-py]],seed:g(),version:1,versionNonce:g(),isDeleted:false,updated:Date.now()});if(n.ch?.length){const c=n.ch.length,sp=dep?Math.min(Math.PI*1.2,0.6*c):Math.PI*2,s=ac-sp/2,st=dep?(c>1?sp/(c-1):0):sp/c;n.ch.forEach((ch,i)=>{ch._pc=c;L(ch,x,y,dep+1,(dep&&c===1)?ac:s+i*st)})}})(d);copy(JSON.stringify({type:"excalidraw",version:2,source:"https://excalidraw.com",elements:e,appState:{gridSize:null,viewBackgroundColor:"#f8f9fa"},files:{}},null,2));console.log("🚀 Clipboard Armed! Go to Excalidraw and press Ctrl+V.")})(
// --- LLM GENERATED DATA OBJECT INJECTED HERE ---
);
