ModsCode / Claude Code Mods / Ranking / whiteboard
whiteboard
Claude draws Mermaid, D2 and PlantUML diagrams (UML, flowcharts, sequences, architecture) into a side pane with history, versions, export, copy and share.
What it does
- Draws a pane, toasts
- Adds /whiteboard
- Watches tool calls and can refuse them
- Hooks command.register, fs.exists, fs.list, fs.read and 18 more
- Keeps its own state between turns
Good points
- No network calls
- Written in TypeScript
- Has a desktop-specific branch
- Handles errors
Code to start from
A starter ModsCode writes from the drawing it read, and the mod's own lines that draw, where there are any.
Starter (register.tsx)
import type { Register } from 'claude-code'
// Drawn like whiteboard by Kiko Stefanov (pane, toast), as ModsCode read it from the mod's code:
// https://modscode.com/claude-mods/mods/kikostefanov-lab-whiteboard/
// Written by ModsCode from that reading, not copied from the mod: use it as you like.
// Each value below stands for one the mod works out at run time; put in your own.
export const register: Register = on => {
// the pane: open it with $.ui.open({ id: 'my-pane', title: "Whiteboard" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Button, Text, Markdown, Input } = $.ui.resolve(e)
const index = '…'
const length = '…'
const title = '…'
const n = '…'
const value = '…'
const note = '…'
const text = '…'
return (
<Box flexDirection="column" gap={1}>
<Box flexDirection="row" gap={1} flexWrap="wrap">
<Button hotkey="h" plain label="◀" />
<Text>
{`${index}1/${length}`}
</Text>
<Button hotkey="l" plain label="▶" />
<Text bold>
{title}
</Text>
<Box flexDirection="row" gap={1}>
<Button plain label={`‹`} />
<Text dimColor>
{`v${n}/${value}`}
</Text>
<Button plain label="›" />
</Box>
</Box>
<Box flexDirection="row" gap={1} flexWrap="wrap">
<Button label="Export" />
<Button label="Copy" />
<Button label="Copy MD" />
<Button label="Share" />
<Button hotkey="o" label="Open" />
</Box>
<Box flexDirection="row" gap={1} flexWrap="wrap">
<Text>
{`Upload '${title}' as a secret GitHub gist? Anyone with the link can see it.`}
</Text>
<Button variant="primary" label="Upload" />
<Button label="Cancel" />
</Box>
<Box flexDirection="row" gap={1}>
<Text dimColor>
{note}
</Text>
<Button label="Re-render" />
</Box>
<Box flexDirection="column">
<Markdown text={`${text}`} />
<Text dimColor>
Source truncated: use Copy or Export for the full text.
</Text>
</Box>
<Input placeholder="Ask Claude to change this diagram…" submitLabel="send" />
</Box>
)
})
on('session.start', async ($, e, next) => {
const split = '…'
const request = '…'
await $.ui.toast(`Re-render failed: ${split}`)
await $.ui.toast(`Sent to Claude: "${request}"`)
return next(e)
})
}
The mod's own code
Shown under the mod's licence (MIT); its text is below. Keep the notice if you copy these lines.
whiteboard/hooks/register.tsx lines 402–499 · Pane
on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
const els = $.ui.resolve(e)
const { Box, Text, Button, Markdown } = els
const board = (await read($, history)) ?? EMPTY
const entry = current(board)
if (!entry) {
return (
<Box flexDirection="column">
<Text dimColor>{EMPTY_HINT}</Text>
</Box>
)
}
const language = languageOf(entry)
const isTerminal = e.surface === 'terminal'
// The terminal's table carries an Svg that draws nothing there: show the source instead.
const Svg = !isTerminal && 'Svg' in els ? els.Svg : undefined
const Image = isTerminal && 'Image' in els ? els.Image : undefined
const Input = 'Input' in els ? els.Input : undefined
const isMissing = !(await $.fs.exists(entry.svgPath))
const isTooLarge = entry.svgBytes > MAX_INLINE_SVG
const svg = Svg && !isMissing && !isTooLarge ? await $.fs.read(entry.svgPath).catch(() => undefined) : undefined
const png = Image && entry.pngPath && entry.pngWidth && entry.pngHeight && (await isKitty($)) && (await $.fs.exists(entry.pngPath))
? { path: entry.pngPath, width: entry.pngWidth, height: entry.pngHeight }
: undefined
const columns = Math.max(10, Math.min(e.props.bodyColumns, 255))
const view = sourceView(entry.source, language)
const version = versionInfo(board, entry)
const isConfirmingShare = (await read($, shareConfirm)) === entry.id
const note = isMissing
? 'Render missing (its files were cleaned up).'
: Svg && isTooLarge
? 'Too large to show inline: press Open to view it.'
: ''
return (
<Box flexDirection="column" gap={1}>
<Box flexDirection="row" gap={1} flexWrap="wrap">
<Button key="prev" hotkey="h" plain label="◀" dimColor={board.index <= 0}
onPress={() => changeBoard($, x => step(x, -1))} />
<Text>{`${board.index + 1}/${board.entries.length}`}</Text>
<Button key="next" hotkey="l" plain label="▶" dimColor={board.index >= board.entries.length - 1}
onPress={() => changeBoard($, x => step(x, 1))} />
<Text bold>{entry.title}</Text>
{version.of > 1 ? (
<Box flexDirection="row" gap={1}>
<Button key="olderVersion" plain label="‹" dimColor={version.older === undefined}
onPress={() => (version.older === undefined ? undefined : changeBoard($, x => jumpTo(x, version.older!)))} />
<Text dimColor>{`v${version.n}/${version.of}`}</Text>
<Button key="newerVersion" plain label="›" dimColor={version.newer === undefined}
onPress={() => (version.newer === undefined ? undefined : changeBoard($, x => jumpTo(x, version.newer!)))} />
</Box>
) : null}
</Box>
<Box flexDirection="row" gap={1} flexWrap="wrap">
<Button key="export" label="Export" onPress={async () => $.ui.toast(await exportEntry($, entry).catch((err: unknown) => `Export failed: ${errorText(err)}`))} />
<Button key="copy" label="Copy" onPress={async p => $.ui.toast(await copyText($, entry.source, p.surface, 'Copied the diagram source.'))} />
<Button key="copyMd" label="Copy MD" onPress={async p => $.ui.toast(await copyText($, fenceBlock(language, entry.source), p.surface,
language === 'mermaid' ? 'Copied as a Markdown block: it renders in GitHub, GitLab and Notion.' : 'Copied as a Markdown block.'))} />
<Button key="share" label="Share" onPress={() => update($, shareConfirm, () => entry.id)} />
<Button key="open" hotkey="o" label="Open" onPress={async () => {
const problem = await openEntry($, entry)
if (problem) $.ui.toast(problem)
}} />
</Box>
{isConfirmingShare ? (
<Box flexDirection="row" gap={1} flexWrap="wrap">
<Text>{`Upload '${entry.title}' as a secret GitHub gist? Anyone with the link can see it.`}</Text>
<Button key="shareYes" variant="primary" label="Upload" onPress={async p => {
await update($, shareConfirm, () => null)
$.ui.toast(await shareEntry($, entry, p.surface).catch((err: unknown) => `Share failed: ${errorText(err)}`))
}} />
<Button key="shareNo" label="Cancel" onPress={() => update($, shareConfirm, () => null)} />
</Box>
) : null}
{note ? (
<Box flexDirection="row" gap={1}>
<Text dimColor>{note}</Text>
{isMissing ? <Button key="rerender" label="Re-render" onPress={() => rerender($, entry, settings)} /> : null}
</Box>
) : null}
{Svg && svg !== undefined
? <Svg source={svg} alt={entry.title} />
: Image && png
? <Image key="diagram" source={{ file: png.path, format: 'png' }} columns={columns} rows={imageRows(png.width, png.height, columns)} alt={entry.title} />
: (
<Box flexDirection="column">
<Markdown text={view.text} />
{view.isTruncated ? <Text dimColor>Source truncated: use Copy or Export for the full text.</Text> : null}
</Box>
)}
{Input ? (
<Input key="revise" placeholder="Ask Claude to change this diagram…" submitLabel="send"
onSubmit={value => askToRevise($, entry, value)} />
) : null}
</Box>
)
})Licence text (MIT)
MIT License Copyright (c) 2026 Kiko Stefanov Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
How to build this: Pane (panel), Deny a tool call
What its code calls
runs programswrites filesenv varsdrives Claudetool callsrememberscalls tools
What its code shows
Read from the source at commit 3691e52eedab on 2026-10-11. The first group decides whether a mod is listed; the rest is for you to weigh. A later commit is not read until the next crawl.
| Decides the listing: code you can check | |
|---|---|
| Entry read | Every module hooks/hooks.json names was read.whiteboard/hooks/register.tsx |
| Parses | Every file parses as TypeScript or JavaScript.5 files parsed |
| All its code is in the mod | Every import is a file of the mod or the engine's own module; no packages, no require.all its code is in the mod |
| Readable | No minified lines, no eval or new Function, no import of a computed path, no encoded blobs.no minified code, no eval, no encoded blobs |
| Calls in the open | Network and programs are reached as $.http.fetch and $.process.run in place, never passed around.every call outside goes through $ in the open |
| For you to weigh before installing | |
| Where it draws | The terminal, the desktop app, both, or nothing (hooks only: a guard or a prompt rewriter), as its code says. Shown, never a reason to leave a mod out.draws in the terminal and the desktop app, with its own branch for the desktop |
| Install line | Whether its repository's own .claude-plugin/marketplace.json lists it, so it installs from that marketplace with the lines on its page.listed in its repository's .claude-plugin/marketplace.json: installs from there |
| Programs on Windows | Whether every program it starts through $.process exists on Windows (tail, date, open, osascript, /usr/… do not).runs no program a Windows PC lacks |
| Network | Whether every fetch names its https host in the code.no network |
| Programs | Whether every program it starts is named in the code and is not a shell, an interpreter or a network tool.whiteboard/hooks/register.tsx:80 a program named at run time; whiteboard/hooks/register.tsx:100 a program named at run time; whiteboard/hooks/register.tsx:140 a program named at run time; whiteboard/hooks/register.tsx:238 a program named at run time; whiteboard/hooks/register.tsx:248 a program named at run time |
| Reads and sends | Whether it both reads something of yours (files, environment variables, the transcript, settings) and reaches outside (the network, an MCP server, another session, telemetry).reads environment variables, files, but reaches nothing outside |
| Keys in the source | Whether the source holds what looks like an API key or a private key.no keys in the source |
| Licence | An open licence (MIT, Apache-2.0, BSD, ISC, Unlicense, 0BSD, CC0) with its text lets ModsCode show its code; otherwise the code is linked.MIT |
| Settings hooks | Hooks declared in hooks/hooks.json or plugin.json beside the module: a command (a shell when it has no args), an HTTP request, an MCP tool or a model prompt at an event. They run outside $.no settings hooks: its function hooks alone |
| Servers it ships | MCP servers (a program, or a URL; a headersHelper is a shell command; a .mcpb bundle is unpacked at run time), LSP servers, monitors (a shell command for the whole session) and bin/ (on the PATH of the Bash tool).ships no MCP or LSP server, no monitor, no bin/ |
| Skills, commands, agents | What its Markdown declares beyond text: allowed-tools granted for the turn, hooks added when a skill is invoked, a command run before Claude reads the skill.no skills, commands, agents or workflows |
| Tools and MCP | Whether every tool it calls through $.tool.call and $.mcp.call is named in the code, and none is a shell (Bash through the tool runs a shell without $.process).whiteboard/hooks/testkit.ts:202 a tool named at run time |
| Asks of the model | Completions it runs ($.model.complete, fork, classify), subagents it spawns, prompts it submits as you, and the tools, commands and agents it adds.prompt.submit (as the person), adds tool draw, adds command whiteboard |
| Events it hooks | By what a hook there can do: gates (refuse a tool call, a prompt, a setting, another plugin), shapes (what the model reads: the system prompt, tool descriptions, each request), reads (your input, the events of the settings hooks, every event with *), and the rest.gates: tool.call, command.run (whiteboard), prompt.submit · also: session.start, ui.render (Pane), session.id, session.cwd (+19) · timers: clock.after |
| Reads, by name | The environment variables and files it names, and whether it reads the transcript, settings.json, the prompt box or the mouse selection.env: OS, HOME, USERPROFILE, APPDATA, PATH (+3); files: /System/Library/CoreServices, a path computed at run time, …/.nvm/versions/node, …/….…, …/… |
| Writes, by name | The files and environment variables it names, and whether it changes settings, the prompt box, the clipboard, the conversation (a row the model reads) or another session.files: …/….…, …/….svg, …/….md; the clipboard |
This is a reading of the code text, not a security review: it does not run the mod, and it cannot see what a program the mod starts does. The check before installing is yours. How mods are chosen
Install it
Check it yourself before you install it. Mods run unsandboxed, with your permissions, and ModsCode does not vouch for what this code does. Read its code (or run claude plugin validate . in its folder), weigh what it reaches, and install the commit you read.
From its marketplace
Its repository is its marketplace. Add that marketplace (in the terminal with these commands, or in the desktop app's plugin settings) and install the mod from it:
/plugin marketplace add kikostefanov-lab/claude-code-mods/plugin install whiteboard@claude-code-mods/reload-pluginsThis installs the marketplace's latest commit, which may not be the one read here (3691e52eedab). Compare them before you install. /reload-plugins loads it into a session that is already open.
Try the commit ModsCode read
No marketplace needed. In a terminal, clone the repository, check out the commit read, validate the mod, and load it for one session:
git clone https://github.com/kikostefanov-lab/claude-code-modsgit -C claude-code-mods checkout 3691e52eedabfa1a120e6c75a28224537535a54cclaude plugin validate claude-code-mods/whiteboardclaude --plugin-dir claude-code-mods/whiteboardThe validate line lists the events the mod hooks and what it asks Claude Code to do, without running it. The last line loads the mod for this session only and writes nothing to your settings. If the author has rewritten history, the commit may no longer exist.
Ask Claude about it
With the ModsCode connector added, Claude can read this mod's code and what it reaches, and build on them. Ask it like this:
Read the ModsCode mod "kikostefanov-lab-whiteboard" with its code and make me one like itSearch them from Claude: the MCP connector
Similar mods
- file-explorerIT-BAER★ 1
- skinshellosverre★ 0
- lcu-approveLCU★ 894
- roadraven-hudShuffzord★ 6
- usage-meterMichael Goldenberg★ 6
- glossary-browserFabrizio Duroni★ 5
More from this repository
Badge for your README
If this is your mod, paste this into your README. It links to this page.
[](https://modscode.com/claude-mods/mods/kikostefanov-lab-whiteboard/)