Edits diagram-draw blueprints, checks structure, and applies reviewable repair plans in a DSH diagram workbench. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-diagram-studio
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:chillydusk/dsh-diagram-studio
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
Spec-driven diagram review, deterministic doctor, and natural-language repair for DSH + diagram-draw.
Diagram Studio is a DeepSeek Harness (DSH) plugin that turns diagram correction into a reviewable loop:
spec → blueprint → SVG/PNG/HTML → doctor → repair plan → atomic patch → re-render
It never calls an image-generation API. blueprint.json remains the only source; the Host runs local diagram-draw scripts.

Features
- PNG preview with a full-screen lightbox and download
- Click a block to select it; click a node/edge in the list to jump
- Node labels, positions, shapes, font sizes
- Edge arrows, solid/dashed style, edge names
- Canvas ratio, auto/grid layout, columns, rows, gaps, margins, font/line widths, style profile
- Spec card (
blueprint.spec) for required nodes, edges, groups, and constraints - Deterministic doctor: missing nodes/edges, broken endpoints, duplicate edges, orphan nodes, group references, node limits, missing labels, out-of-bounds, overlap, estimated crossings
- Natural-language repair: the agent writes
repair-plan.json; select operations and apply atomically - Reference image drop: saves into
diagrams/ref-*and triggers observation → blueprint → render - Undo history, rendered changelog, light/dark theme tokens
Install
- Install the skill:
node install-skill.mjs
or:
.\install-skill.ps1
This copies skill/diagram-draw to ~/.dsh/skills/diagram-draw.
- Install the
dsh-diagram-studio-1.1.1.tgzfrom GitHub Releases as a local bundle (or install this directory). The npm package name isdsh-diagram-studio; if npm still serves 1.0.0, use the Release tarball because the old package has a mismatched Client module id. - Disable/enable the
diagram-studiorow and refresh DSH.
Open Diagram Studio from the left sidebar or the right-side Diagram Studio guide tab.
Requirements
- DSH with Client plugin support
- Node.js 20+
- Python 3.10+
- Pillow
- A CJK font (Microsoft YaHei, Noto Sans SC, etc.)
- Edge/Chrome for PNG export; SVG/HTML work without it
Develop
npm test
npm run check
npm pack --dry-run
python -m unittest discover -s skill/diagram-draw/tests
Release
Push a v* tag to create a GitHub Release with the packed tarball. The Publish npm workflow publishes it when the repository has an NPM_TOKEN secret with publish access and 2FA bypass.
Architecture
client.js → sidebar/main UI, preview, specs, doctor, repair plan
index.js → same-origin Host API, local process bridge, reference/repair prompts
skill/ → diagram-draw renderer, patches, doctor, layout/routing
Limits
- Block diagrams have full node/edge editing; timing/circuit diagrams are preview-only in 1.x.
- The doctor is deterministic and cannot infer a missing business concept unless it is in the spec.
- Natural-language repair needs an active agent session.
- Reference replication needs a model with image input.
Security
Diagram rendering is local; no image API or external renderer. Repair requests and reference images are sent to the active DSH model through session prompts. The Host only touches <workspace>/diagrams/<slug>/, rejects path traversal, limits reference uploads, and applies patches only after a successful temporary render.
License
MIT. See LICENSE.
Links
More in this category
zhu1090093659/dsh-web#packages/dsh-task-board★ 10703
Task board for the dsh web GUI: a sidebar multi-column kanban whose cards run in real DSH agent sessions and can also be scheduled with cron expressions, executed host-side even with the browser closed.
zhu1090093659/dsh-web#packages/dsh-web-all★ 10703
Plugin and skin collection for the DSH Web UI: task board, Git graph, right-side panel, remote mobile UI, pet, live token stats, and a skin center.
ccch1mneyyy/dsh-TUI★ 8557
Claude Code-style full-screen terminal UI: pixel-whale header, live status line, and streaming thought expansion.
MeteorNOX/DeepSeek-Balance-Whale-Widget★ 7523
A fixed-corner whale widget for the DSH web GUI — balance, today's usage and per-turn cost with peak/off-peak pricing, editable balance-alert and daily-budget bubbles, a module-based custom bubble queue with A/B weighted choices and random lines or images, 30+ vendor templates (OpenAI, OpenRouter, Kimi, SiliconFlow, Ark, Zhipu, MiniMax and more) with per-model balance and subscription quota, plus task-end sound, imported audio, custom roles and a resource manager. Local-only, no telemetry.
omdsh-dev/DSH-better-sidebar★ 5405
Full sidebar workbench with file rendering and editing, terminal, Git, and subagents; third-party plugins can register new tabs.
omdsh-dev/dsh-genui★ 1091
Interactive UI components rendered inline in replies: layout, charts, forms, quizzes, mermaid, 3D scenes, and an action event loop back to the model.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.