
webdevcody/sketchlab.app
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
webdevcody/sketchlab.app は [https://github.com/webdevcody/sketchlab.app. からインポートされたエージェント スキル 候補者です
概要
webdevcody/sketchlab.app は [https://github.com/webdevcody/sketchlab.app. からインポートされたエージェント スキル 候補者です
概要(AI 翻訳)
高速でブラウザのみのダイアグラムツール(小さなFigma/Excalidrawのように)。 形を引くこと、 それらを自動スナッピングラインに接続し、アイコンをドロップし、すべての自動セーブ ローカル バックエンドなし — ボードは、インデックス化されたDBに住んでおり、単一のURLで共有できます。
スタック
- レンダリング: PixiJS v8 (WebGL) — GPU 認定、レンダリングオンデマンド。
- **状態:**ナノストア — 小さな反応原子。 反応なし
- 永続: [
idb-keyval]]を介してインデックス化されたDB。 - 共有: ボード JSON → [
lz-string]] 圧縮 → クエリ文字列。 -ビルド: Vite + TypeScript 静的ファイルとして出荷(Dockerfileのnginxで保存)。
コマンド
クロードコードスキル(図をスケッチラボに生成)
エージェントは、Sketch Lab [GeneratedGraph]] を出力し、[?g=] URL で開くことができます。
スキルはアプリでホストされます。
クロード コードにインストール:
その後、Claudeコードを再起動し、Sketch Lab 図を尋ねます。 エージェントビルド
[[https://sketchlab.webdevcody.com/?g= ]をクリックして開きます。
性能は、多くの形状で平らに保つ方法
-Dirty-setのアップデートは、完全な差分ではありません。 ナノストアをミュートするアクションとは、
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
Sketch Lab
A fast, browser-only diagram tool (think a tiny Figma/Excalidraw). Draw shapes, connect them with auto-snapping lines, drop in icons, and everything auto-saves locally. No backend — boards live in IndexedDB and are shareable via a single URL.
Stack
- Rendering: PixiJS v8 (WebGL) — GPU-accelerated, render-on-demand.
- State: nanostores — tiny reactive atoms. No React.
- Persistence: IndexedDB via
idb-keyval. - Sharing: board JSON →
lz-stringcompression → query string. - Build: Vite + TypeScript. Ships as static files (served by nginx in the Dockerfile).
Commands
npm install
npm run dev # local dev server (http://localhost:5173)
npm run build # type-check + production build to dist/
npm run preview # serve the production build
Claude Code skill (generate diagrams into Sketch Lab)
Agents can emit Sketch Lab GeneratedGraph JSON and open it with a ?g= URL.
The skill is hosted with the app:
Install into Claude Code:
mkdir -p ~/.claude/skills/sketch-lab
curl -fsSL https://sketchlab.webdevcody.com/skills/sketch-lab/SKILL.md \
-o ~/.claude/skills/sketch-lab/SKILL.md
Then restart Claude Code and ask for a Sketch Lab diagram. The agent builds
https://sketchlab.webdevcody.com/?g= and opens it.
How performance is kept flat with many shapes
- Dirty-set updates, not full diffs. Actions mutate the nanostore and tell the
renderer exactly which node/edge ids changed (
scene.updateNode(id)). Dragging one of thousands of shapes touches only that node + its incident edges. - Render-on-demand. The Pixi ticker is stopped;
app.render()is scheduled once per animation frame only when something is dirty. - Per-view redraw guards. A shape’s
Graphicsis only re-tessellated when its geometry/style actually changes; moving it just sets a container transform. - All hit-testing in world space (not Pixi’s event tree), so selection/marquee/ connect/resize are O(changed), and the camera is a single container transform.
Architecture
src/
state/ types, nanostore atoms (store.ts), mutation actions (actions.ts)
render/ Pixi scene singleton (scene.ts), shape/edge view builders,
geometry/snapping math, vector icon registry
interaction/ controller.ts (pointer/keyboard state machine), camera, viewport,
text-editor overlay, "/" icon palette
persistence/ IndexedDB (db.ts), autosave, URL share encode/decode
ui/ dashboard, editor chrome (toolbar/colors/zoom), DOM helpers, router
main.ts hash router: editor (#/board/:id), ?b= board share, ?g= GeneratedGraph import
Shortcuts
V select · T text · R rectangle · O circle · L connector line ·
推奨ツール
別のキーワードを試すか、フィルタを外してください。
インストール
npx skillfish add webdevcody/sketchlab.app