一键导入
excalidraw-new-library
Scaffold a new Excalidraw library workspace with meta.json and starter items
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Scaffold a new Excalidraw library workspace with meta.json and starter items
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Generate .excalidraw scene files from natural language descriptions of diagrams, flowcharts, layouts, or visual concepts
Create or modify Excalidraw library files (.excalidrawlib) — add items, edit existing libraries, bundle from source files
| name | excalidraw-new-library |
| description | Scaffold a new Excalidraw library workspace with meta.json and starter items |
| allowed-tools | Read, Write, Bash, Glob |
| argument-hint | <library-name> <description> |
Create a new library workspace under libraries/.
Scaffold a new library: $ARGUMENTS
Parse the arguments:
$0 = library name (kebab-case directory name)Create the directory structure:
libraries/<library-name>/
├── meta.json
Write meta.json:
{
"name": "<Human Readable Name>",
"description": "<description from args>",
"authors": [{ "name": "Kaaro" }]
}
Create 2-3 starter .excalidraw files based on the description using a generator script with @kaaro/core builders. Each file should contain a single meaningful shape/component relevant to the library theme.
Bundle: npx tsx packages/cli/src/index.ts bundle libraries/<name> -o libraries/<name>/<name>.excalidrawlib
Validate: npx tsx packages/cli/src/index.ts validate libraries/<name>/<name>.excalidrawlib
Report what was created.
import { createElement, createSceneFile, writeExcalidrawFile } from "./packages/core/src/index.js";
// Create elements for a single library item
const elements = [
createElement({ type: "rectangle", x: 0, y: 0, width: 160, height: 80, backgroundColor: "#a5d8ff", roughness: 0 }),
createElement({ type: "text", x: 20, y: 25, width: 120, height: 30, text: "Label", fontSize: 20, fontFamily: 1 }),
];
const scene = createSceneFile(elements);
await writeExcalidrawFile("libraries/<name>/item-name.excalidraw", scene);
Run with npx tsx tmp-scaffold.ts, then clean up the script.