[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EEYMD09DS63Y5Y2B6HYYM3":3,"skill-same:01M6EEYMD09DS63Y5Y2B6HYYM3":45},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":20,"frontMatter":21,"refName":22,"commitSha":23,"skillDirectory":24,"forksCount":25,"repositoryHtmlUrl":26,"repositoryHomepageUrl":27,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":29,"updatedAt":30,"install":31,"resources":44},"01M6EEYMD09DS63Y5Y2B6HYYM3","excalidraw",null,"ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FTerminalSkills\u002Fskills\u002Fexcalidraw\u002FSKILL.md",[],[5],"2026-11-10 10:12:30",false,"# Excalidraw — Hand-Drawn Whiteboard SDK\n\n\n## Overview\n\n\nExcalidraw, the open-source virtual whiteboard library for creating hand-drawn style diagrams and sketches. Helps developers embed Excalidraw in React applications, build custom integrations, and leverage the API for programmatic diagram creation.\n\n\n## Instructions\n\n### Basic Embedding\n\nAdd an Excalidraw whiteboard to any React application:\n\n```tsx\n\u002F\u002F src\u002Fcomponents\u002FWhiteboard.tsx — Embed Excalidraw in a React app\nimport { Excalidraw } from \"@excalidraw\u002Fexcalidraw\";\nimport { ExcalidrawElement } from \"@excalidraw\u002Fexcalidraw\u002Ftypes\u002Felement\u002Ftypes\";\nimport { AppState } from \"@excalidraw\u002Fexcalidraw\u002Ftypes\u002Ftypes\";\nimport { useState, useCallback } from \"react\";\n\nexport function Whiteboard() {\n  const [excalidrawAPI, setExcalidrawAPI] = useState\u003Cany>(null);\n\n  const handleChange = useCallback(\n    (elements: readonly ExcalidrawElement[], state: AppState) => {\n      \u002F\u002F Called on every change — debounce before persisting\n      console.log(`${elements.length} elements on canvas`);\n    },\n    []\n  );\n\n  return (\n    \u003Cdiv style={{ height: \"100vh\", width: \"100%\" }}>\n      \u003CExcalidraw\n        ref={(api) => setExcalidrawAPI(api)}\n        onChange={handleChange}\n        initialData={{\n          appState: {\n            viewBackgroundColor: \"#fafafa\",\n            currentItemFontFamily: 1,    \u002F\u002F 1 = Virgil (hand-drawn), 2 = Helvetica, 3 = Cascadia\n          },\n        }}\n        UIOptions={{\n          canvasActions: {\n            loadScene: true,\n            export: { saveFileToDisk: true },\n            toggleTheme: true,\n          },\n        }}\n      \u002F>\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n### Programmatic Scene Creation\n\nGenerate diagrams from code or data:\n\n```typescript\n\u002F\u002F src\u002Fdiagrams\u002Farchitecture.ts — Generate architecture diagrams programmatically\nimport { ExcalidrawElement } from \"@excalidraw\u002Fexcalidraw\u002Ftypes\u002Felement\u002Ftypes\";\n\ninterface ServiceNode {\n  name: string;\n  type: \"api\" | \"database\" | \"queue\" | \"cache\" | \"frontend\";\n  x: number;\n  y: number;\n}\n\nfunction createServiceBox(service: ServiceNode): ExcalidrawElement {\n  const colors: Record\u003Cstring, string> = {\n    api: \"#a5d8ff\",        \u002F\u002F Blue for APIs\n    database: \"#b2f2bb\",   \u002F\u002F Green for databases\n    queue: \"#ffec99\",      \u002F\u002F Yellow for queues\n    cache: \"#ffc9c9\",      \u002F\u002F Red for caches\n    frontend: \"#d0bfff\",   \u002F\u002F Purple for frontends\n  };\n\n  return {\n    type: \"rectangle\",\n    id: `service-${service.name}`,\n    x: service.x,\n    y: service.y,\n    width: 200,\n    height: 80,\n    strokeColor: \"#1e1e1e\",\n    backgroundColor: colors[service.type] || \"#e9ecef\",\n    fillStyle: \"solid\",\n    strokeWidth: 2,\n    roughness: 1,            \u002F\u002F 0 = smooth, 1 = hand-drawn, 2 = very rough\n    roundness: { type: 3, value: 8 },\n    isDeleted: false,\n    boundElements: null,\n    locked: false,\n    opacity: 100,\n    angle: 0,\n    seed: Math.floor(Math.random() * 100000),  \u002F\u002F Random seed for hand-drawn variation\n    version: 1,\n    versionNonce: Math.floor(Math.random() * 100000),\n    groupIds: [],\n    frameId: null,\n    link: null,\n    updated: Date.now(),\n  } as any;\n}\n\nfunction createArrow(\n  fromId: string, toId: string,\n  startX: number, startY: number,\n  endX: number, endY: number,\n  label?: string\n): ExcalidrawElement {\n  return {\n    type: \"arrow\",\n    id: `arrow-${fromId}-${toId}`,\n    x: startX,\n    y: startY,\n    width: endX - startX,\n    height: endY - startY,\n    strokeColor: \"#1e1e1e\",\n    strokeWidth: 2,\n    roughness: 1,\n    points: [[0, 0], [endX - startX, endY - startY]],\n    startBinding: { elementId: fromId, focus: 0, gap: 4 },\n    endBinding: { elementId: toId, focus: 0, gap: 4 },\n    startArrowhead: null,\n    endArrowhead: \"arrow\",\n    isDeleted: false,\n    opacity: 100,\n    angle: 0,\n    seed: Math.floor(Math.random() * 100000),\n    version: 1,\n    versionNonce: Math.floor(Math.random() * 100000),\n    groupIds: [],\n    boundElements: null,\n    locked: false,\n    frameId: null,\n    link: null,\n    updated: Date.now(),\n  } as any;\n}\n\n\u002F\u002F Generate a full architecture diagram\nexport function generateArchitectureDiagram(services: ServiceNode[], connections: [string, string][]) {\n  const elements: ExcalidrawElement[] = [];\n\n  \u002F\u002F Create service boxes\n  for (const service of services) {\n    elements.push(createServiceBox(service));\n\n    \u002F\u002F Add label text\n    elements.push({\n      type: \"text\",\n      id: `label-${service.name}`,\n      x: service.x + 20,\n      y: service.y + 25,\n      width: 160,\n      height: 30,\n      text: `${service.name}\\n(${service.type})`,\n      fontSize: 16,\n      fontFamily: 1,           \u002F\u002F Virgil hand-drawn font\n      textAlign: \"center\",\n      verticalAlign: \"middle\",\n      strokeColor: \"#1e1e1e\",\n      isDeleted: false,\n      opacity: 100,\n      angle: 0,\n      seed: Math.floor(Math.random() * 100000),\n      version: 1,\n      versionNonce: Math.floor(Math.random() * 100000),\n      groupIds: [],\n      boundElements: null,\n      locked: false,\n      frameId: null,\n      link: null,\n      updated: Date.now(),\n      containerId: `service-${service.name}`,\n    } as any);\n  }\n\n  \u002F\u002F Create arrows for connections\n  for (const [from, to] of connections) {\n    const fromService = services.find(s => s.name === from)!;\n    const toService = services.find(s => s.name === to)!;\n    elements.push(createArrow(\n      `service-${from}`, `service-${to}`,\n      fromService.x + 200, fromService.y + 40,\n      toService.x, toService.y + 40,\n    ));\n  }\n\n  return elements;\n}\n```\n\n### Export and Import\n\nSave diagrams as files, images, or shareable links:\n\n```typescript\n\u002F\u002F src\u002Futils\u002Fexport.ts — Export Excalidraw scenes in various formats\nimport { exportToBlob, exportToSvg, serializeAsJSON } from \"@excalidraw\u002Fexcalidraw\";\n\nasync function exportAsPNG(excalidrawAPI: any) {\n  const elements = excalidrawAPI.getSceneElements();\n  const appState = excalidrawAPI.getAppState();\n\n  const blob = await exportToBlob({\n    elements,\n    appState: { ...appState, exportWithDarkMode: false },\n    files: excalidrawAPI.getFiles(),\n    getDimensions: () => ({ width: 1920, height: 1080, scale: 2 }),  \u002F\u002F 2x for retina\n  });\n\n  \u002F\u002F Download the image\n  const url = URL.createObjectURL(blob);\n  const link = document.createElement(\"a\");\n  link.href = url;\n  link.download = \"diagram.png\";\n  link.click();\n  URL.revokeObjectURL(url);\n}\n\nasync function exportAsSVG(excalidrawAPI: any) {\n  const elements = excalidrawAPI.getSceneElements();\n  const svg = await exportToSvg({\n    elements,\n    appState: { exportWithDarkMode: false },\n    files: excalidrawAPI.getFiles(),\n  });\n  return svg.outerHTML;   \u002F\u002F Returns SVG as string\n}\n\nfunction saveAsExcalidrawFile(excalidrawAPI: any) {\n  const elements = excalidrawAPI.getSceneElements();\n  const appState = excalidrawAPI.getAppState();\n  const json = serializeAsJSON(elements, appState, excalidrawAPI.getFiles(), \"local\");\n\n  const blob = new Blob([json], { type: \"application\u002Fjson\" });\n  const url = URL.createObjectURL(blob);\n  const link = document.createElement(\"a\");\n  link.href = url;\n  link.download = \"diagram.excalidraw\";\n  link.click();\n}\n\n\u002F\u002F Load from .excalidraw file\nasync function loadFromFile(excalidrawAPI: any, file: File) {\n  const text = await file.text();\n  const data = JSON.parse(text);\n  excalidrawAPI.updateScene({\n    elements: data.elements,\n    appState: data.appState,\n  });\n}\n```\n\n### Collaboration with Excalidraw+\n\nSet up real-time collaboration:\n\n```tsx\n\u002F\u002F src\u002Fcomponents\u002FCollaborativeBoard.tsx — Real-time whiteboard with collaboration\nimport { Excalidraw, LiveCollaborationTrigger } from \"@excalidraw\u002Fexcalidraw\";\n\nexport function CollaborativeBoard({ roomId }: { roomId: string }) {\n  return (\n    \u003Cdiv style={{ height: \"100vh\" }}>\n      \u003CExcalidraw\n        isCollaborating={true}\n        \u002F\u002F Custom collaboration backend using WebSocket\n        onCollabButtonClick={() => {\n          \u002F\u002F Open share dialog or copy room link\n          const link = `${window.location.origin}\u002Fboard\u002F${roomId}`;\n          navigator.clipboard.writeText(link);\n        }}\n        renderTopRightUI={() => (\n          \u003CLiveCollaborationTrigger\n            isCollaborating={true}\n            onSelect={() => {}}\n          \u002F>\n        )}\n      \u002F>\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n## Installation\n\n```bash\nnpm install @excalidraw\u002Fexcalidraw\n\n# Peer dependencies\nnpm install react react-dom\n```\n\n\n## Examples\n\n\n### Example 1: Setting up Excalidraw with a custom configuration\n\n**User request:**\n\n```\nI just installed Excalidraw. Help me configure it for my TypeScript + React workflow with my preferred keybindings.\n```\n\nThe agent creates the configuration file with TypeScript-aware settings, configures relevant plugins\u002Fextensions for React development, sets up keyboard shortcuts matching the user's preferences, and verifies the setup works correctly.\n\n### Example 2: Extending Excalidraw with custom functionality\n\n**User request:**\n\n```\nI want to add a custom programmatic scene creation to Excalidraw. How do I build one?\n```\n\nThe agent scaffolds the extension\u002Fplugin project, implements the core functionality following Excalidraw's API patterns, adds configuration options, and provides testing instructions to verify it works end-to-end.\n\n\n## Guidelines\n\n1. **Container must have dimensions** — Excalidraw expands to fill its container; ensure explicit height\u002Fwidth\n2. **Debounce onChange** — Canvas fires updates on every mouse move during drawing; debounce to 500ms for persistence\n3. **Use roughness for style** — `roughness: 0` for clean diagrams, `1` for hand-drawn feel, `2` for sketch style\n4. **Seed for consistency** — Same seed = same hand-drawn variation; use deterministic seeds for reproducible diagrams\n5. **Export SVG for docs** — SVG exports are resolution-independent and embed well in documentation\n6. **Lazy load the component** — Excalidraw bundle is ~1MB; use `React.lazy()` to avoid blocking initial page load\n7. **Use frames for grouping** — Frames in Excalidraw act as containers; export individual frames as separate images\n8. **Store .excalidraw files in git** — The JSON format is text-based and diffs well in version control\n",{},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002FTerminalSkills\u002Fskills\u002Fexcalidraw",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":7,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill excalidraw",{"tool":37,"command":38},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill excalidraw",{"tool":40,"command":41},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill excalidraw","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FTerminalSkills\u002Fskills\u002Fexcalidraw\u002FSKILL.md",true,[],[46,55,64,73,79,85],{"skillNo":47,"name":48,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":49,"categories":50,"keywords":51,"publishedAt":18},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[52,53,54],"model","model hierarchy","model hierarchy skill",{"skillNo":56,"name":57,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":18},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[61,62,63],"MCP","zoom","zoom mcp",{"skillNo":65,"name":66,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":18},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[70,71,72,62],"sdk","zoom apps sdk","apps",{"skillNo":74,"name":75,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":18},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[75],{"skillNo":80,"name":81,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":18},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[81],{"skillNo":86,"name":87,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":18},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[87]]