modscode / 図鑑 / session-dashboard
session-dashboard
A side pane for the current session: prompt cache hot/cold, tool calls and errors, background commands with restart and stop, the approved plan, task list, subagents and swarm agents, and token usage for the main agent and subagents
何をするか
- 欄・トーストを描く
- ツールの呼び出しを見張る(止めることがある)
- classic.PermissionRequest・classic.SessionStart・classic.Stop・classic.StopFailure ほか 9 個にフックする
- ターンをまたいで自分の状態を持つ
- プロセスを起こす
良いところ
- ネットワークに出ない
- デスクトップ専用の分岐がある
- エラーを扱う
作り始めるためのコード
2 種類あります。上のデザインから modscode が書いた雛形と、その Mod 自身のコードのうち描いている部分です。
雛形(register.tsx)
import type { Register } from 'claude-code'
// Drawn like session-dashboard by djmid (pane, band, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/netgfx-session-dashboard/
// 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: "Dashboard" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Text, Button, Input } = $.ui.resolve(e)
const word = '…'
const detail = '…'
const value = '…'
const main = '…'
const sub = '…'
const value2 = '…'
const kind = '…'
const fmtAgo = '…'
const tool = '…'
const message = '…'
const running = '…'
const length = '…'
const pid = '…'
const port = '…'
const command = '…'
const pid2 = '…'
const port2 = '…'
const pid3 = '…'
const port3 = '…'
const busy = '…'
const name = '…'
const fitStart = '…'
const name2 = '…'
const name3 = '…'
const requests = '…'
const reduce = '…'
const value3 = '…'
const value4 = '…'
const value5 = '…'
const value6 = '…'
const value7 = '…'
const value8 = '…'
const fmtNum = '…'
const fmtNum2 = '…'
const fmtNum3 = '…'
const fmtNum4 = '…'
const fmtNum5 = '…'
const fmtNum6 = '…'
const fmtNum7 = '…'
const fmtNum8 = '…'
const label = '…'
const fmtNum9 = '…'
const fmtNum10 = '…'
const fmtNum11 = '…'
const fmtNum12 = '…'
const fmtNum13 = '…'
const fmtNum14 = '…'
const fmtNum15 = '…'
const fmtNum16 = '…'
const fmtNum17 = '…'
const fmtNum18 = '…'
const fmtNum19 = '…'
const fmtNum20 = '…'
const fmtNum21 = '…'
const fmtNum22 = '…'
const fmtNum23 = '…'
const fmtNum24 = '…'
const usd = '…'
const pct = '…'
const fmtUntil = '…'
const turns = '…'
const fmtPct = '…'
const fmtNum25 = '…'
const fmtPct2 = '…'
const fmtNum26 = '…'
const fmtPct3 = '…'
const fmtNum27 = '…'
return (
<Box flexDirection="column">
<Box flexDirection="row" justifyContent="space-between" marginBottom={1}>
<Text bold>
SESSION DASHBOARD
</Text>
<Box marginRight={1}>
<Button label="hide" hotkey="q" plain dimColor />
</Box>
</Box>
<Box flexDirection="column">
<Box flexDirection="row" columnGap={1}>
<Text>
{" "}
</Text>
<Text bold>
Cache (
<Text bold>
{word}
</Text>
)
</Text>
<Box flexGrow={1} justifyContent="flex-end">
<Text dimColor wrap="truncate-start">
{detail}
</Text>
</Box>
</Box>
</Box>
<Text dimColor wrap="truncate-end">
────────
</Text>
<Box flexDirection="column">
<Box flexDirection="row">
<Box flexDirection="column">
<Text dimColor bold>
TOOL CALLS
</Text>
<Text bold>
{value}
</Text>
<Text dimColor wrap="truncate-end">
{`main ${main} · sub ${sub}`}
</Text>
</Box>
<Box flexDirection="column">
<Text dimColor bold>
ERRORS
</Text>
<Text bold>
{value2}
</Text>
<Text dimColor wrap="truncate-end">
{`${kind} ${fmtAgo}`}
</Text>
</Box>
</Box>
<Button label="▾ hide errors" hotkey="e" plain dimColor />
<Box flexDirection="row" columnGap={1}>
<Text color="#F85149">
✕
</Text>
<Text wrap="truncate-end">
{`${kind} · ${tool}: ${message}`}
</Text>
</Box>
<Box flexDirection="row" columnGap={1}>
<Text color="#F85149">
✕
</Text>
<Text wrap="truncate-end">
{`${kind} · ${tool}: ${message}`}
</Text>
</Box>
<Box flexDirection="row" columnGap={1}>
<Text color="#F85149">
✕
</Text>
<Text wrap="truncate-end">
{`${kind} · ${tool}: ${message}`}
</Text>
</Box>
</Box>
<Text dimColor wrap="truncate-end">
────────
</Text>
<Box flexDirection="column">
<Box flexDirection="row" columnGap={1}>
<Text bold dimColor>
BACKGROUND
</Text>
<Text dimColor>
{`${running} running · ${length} ended`}
</Text>
</Box>
<Box flexDirection="row">
<Text dimColor>
PID
</Text>
<Text dimColor>
PORT
</Text>
<Text dimColor>
COMMAND
</Text>
</Box>
<Box flexDirection="row">
<Text>
{pid}
</Text>
<Text color="#3B8EEA">
{port}
</Text>
<Box flexShrink={1}>
<Text wrap="truncate-end">
{`${command}`}
</Text>
</Box>
<Box flexDirection="row" columnGap={1} marginLeft={1}>
<Button label="↻" />
<Button label="✕" />
</Box>
</Box>
<Box flexDirection="row">
<Text>
{pid2}
</Text>
<Text color="#3B8EEA">
{port2}
</Text>
<Box flexShrink={1}>
<Text wrap="truncate-end">
{`${command}`}
</Text>
</Box>
<Box flexDirection="row" columnGap={1} marginLeft={1}>
<Button label="↻" />
<Button label="✕" />
</Box>
</Box>
<Box flexDirection="row">
<Text>
{pid3}
</Text>
<Text color="#3B8EEA">
{port3}
</Text>
<Box flexShrink={1}>
<Text wrap="truncate-end">
{`${command}`}
</Text>
</Box>
<Box flexDirection="row" columnGap={1} marginLeft={1}>
<Button label="↻" />
<Button label="✕" />
</Box>
</Box>
<Box flexDirection="row" columnGap={2}>
<Button label="rescan" hotkey="s" plain dimColor />
<Button label="clear ended" hotkey="x" plain dimColor />
</Box>
</Box>
<Text dimColor wrap="truncate-end">
────────
</Text>
<Box flexDirection="column">
<Box flexDirection="row">
<Box flexGrow={1} flexDirection="row" columnGap={1}>
<Text bold dimColor>
LINKED FOLDERS
</Text>
<Text dimColor>
{length}
</Text>
<Text color="#D29922">
{busy}
</Text>
</Box>
<Box marginRight={1}>
<Button label="+" hotkey="l" />
</Box>
</Box>
<Box flexDirection="row">
<Text bold color="#A371F7" wrap="truncate-end">
{name}
</Text>
<Box flexShrink={1}>
<Text dimColor wrap="truncate-start">
{`→ ${fitStart}`}
</Text>
</Box>
<Box flexDirection="row" flexShrink={0} columnGap={1} marginLeft={1}>
<Button label="✎" />
<Button label="✕" />
</Box>
</Box>
<Box flexDirection="row">
<Text bold color="#A371F7" wrap="truncate-end">
{name2}
</Text>
<Box flexShrink={1}>
<Text dimColor wrap="truncate-start">
{`→ ${fitStart}`}
</Text>
</Box>
<Box flexDirection="row" flexShrink={0} columnGap={1} marginLeft={1}>
<Button label="✎" />
<Button label="✕" />
</Box>
</Box>
<Box flexDirection="row">
<Text bold color="#A371F7" wrap="truncate-end">
{name3}
</Text>
<Box flexShrink={1}>
<Text dimColor wrap="truncate-start">
{`→ ${fitStart}`}
</Text>
</Box>
<Box flexDirection="row" flexShrink={0} columnGap={1} marginLeft={1}>
<Button label="✎" />
<Button label="✕" />
</Box>
</Box>
<Input label="folder" placeholder="path to a folder on this machine" submitLabel="link" autoFocus />
<Text dimColor wrap="truncate-end">
None. Press + to link a folder into the workspace.
</Text>
</Box>
<Text dimColor wrap="truncate-end">
────────
</Text>
<Box flexDirection="column">
<Box flexDirection="row" columnGap={1}>
<Text bold dimColor>
TASKS
</Text>
</Box>
<Text dimColor>
No plan, tasks or agents yet.
</Text>
</Box>
<Text dimColor wrap="truncate-end">
────────
</Text>
<Box flexDirection="column">
<Box flexDirection="row" columnGap={1}>
<Text bold dimColor>
TOKENS
</Text>
<Text dimColor>
{`${requests}${reduce} requests`}
</Text>
</Box>
<Box flexDirection="row">
<Text dimColor />
<Text dimColor>
{value3}
</Text>
<Text dimColor>
{value4}
</Text>
<Text dimColor>
{value5}
</Text>
<Text dimColor>
{value6}
</Text>
<Text dimColor>
{value7}
</Text>
<Text dimColor>
{value8}
</Text>
</Box>
<Box flexDirection="row">
<Text wrap="truncate-end">
main agent
</Text>
<Text>
{fmtNum}
</Text>
<Text>
{fmtNum2}
</Text>
<Text>
{fmtNum3}
</Text>
<Text>
{fmtNum4}
</Text>
</Box>
<Box flexDirection="row">
<Text wrap="truncate-end">
{`subagents (${length})`}
</Text>
<Text>
{fmtNum5}
</Text>
<Text>
{fmtNum6}
</Text>
<Text>
{fmtNum7}
</Text>
<Text>
{fmtNum8}
</Text>
</Box>
<Box flexDirection="row">
<Text wrap="truncate-end">
{` ${label}`}
</Text>
<Text>
{fmtNum9}
</Text>
<Text>
{fmtNum10}
</Text>
<Text>
{fmtNum11}
</Text>
<Text>
{fmtNum12}
</Text>
</Box>
<Box flexDirection="row">
<Text wrap="truncate-end">
{` ${label}`}
</Text>
<Text>
{fmtNum13}
</Text>
<Text>
{fmtNum14}
</Text>
<Text>
{fmtNum15}
</Text>
<Text>
{fmtNum16}
</Text>
</Box>
<Box flexDirection="row">
<Text wrap="truncate-end">
{` ${label}`}
</Text>
<Text>
{fmtNum17}
</Text>
<Text>
{fmtNum18}
</Text>
<Text>
{fmtNum19}
</Text>
<Text>
{fmtNum20}
</Text>
</Box>
<Box flexDirection="row">
<Text wrap="truncate-end">
total
</Text>
<Text>
{fmtNum21}
</Text>
<Text>
{fmtNum22}
</Text>
<Text>
{fmtNum23}
</Text>
<Text>
{fmtNum24}
</Text>
</Box>
<Text>
{" "}
</Text>
<Box flexDirection="row" columnGap={1}>
<Text dimColor>
context
</Text>
<Text bold>
—
</Text>
<Text dimColor>
{`of ${fmtNum}`}
</Text>
<Text dimColor>
{`· $${usd}`}
</Text>
</Box>
</Box>
<Text dimColor wrap="truncate-end">
────────
</Text>
<Box flexDirection="column">
<Box flexDirection="row" columnGap={1}>
<Text bold dimColor>
USAGE LIMITS
</Text>
</Box>
<Box flexDirection="row">
<Text dimColor>
5-hour
</Text>
<Text>
████████
</Text>
<Text bold>
{`${pct}%`}
</Text>
<Text dimColor wrap="truncate-end">
{` ${fmtUntil}`}
</Text>
</Box>
<Box flexDirection="row">
<Text dimColor>
weekly
</Text>
<Text>
████████
</Text>
<Text bold>
{`${pct}%`}
</Text>
<Text dimColor wrap="truncate-end">
{` ${fmtUntil}`}
</Text>
</Box>
</Box>
<Text dimColor wrap="truncate-end">
────────
</Text>
<Box flexDirection="column">
<Box flexDirection="row" columnGap={1}>
<Text bold dimColor>
TOTAL DISTRIBUTION
</Text>
<Text dimColor wrap="truncate-end">
{`${fmtNum} tokens · ${turns} turn`}
</Text>
</Box>
<Box flexDirection="column" columnGap={2} rowGap={1}>
<Box flexDirection="column" width={16} flexShrink={0}>
<Button label="hide small %" hotkey="p" plain dimColor />
</Box>
<Box flexDirection="column">
<Box flexDirection="row" columnGap={1}>
<Text>
██
</Text>
<Button label={`${label}`} plain />
<Box flexGrow={1} justifyContent="flex-end" columnGap={1}>
<Text bold>
{fmtPct}
</Text>
<Text dimColor>
{fmtNum25}
</Text>
</Box>
</Box>
<Box flexDirection="row" columnGap={1}>
<Text>
██
</Text>
<Button label={`${label}`} plain />
<Box flexGrow={1} justifyContent="flex-end" columnGap={1}>
<Text bold>
{fmtPct2}
</Text>
<Text dimColor>
{fmtNum26}
</Text>
</Box>
</Box>
<Box flexDirection="row" columnGap={1}>
<Text>
██
</Text>
<Button label={`${label}`} plain />
<Box flexGrow={1} justifyContent="flex-end" columnGap={1}>
<Text bold>
{fmtPct3}
</Text>
<Text dimColor>
{fmtNum27}
</Text>
</Box>
</Box>
</Box>
</Box>
<Text dimColor wrap="truncate-end">
tool use and retries are estimated from call sizes
</Text>
</Box>
</Box>
)
})
on('session.start', async ($, e, next) => {
await $.ui.toast(`Counters reset`)
await $.ui.toast(`Dashboard opens as a right-hand sidebar only in the fullscreen layout: start Claude Code with CLAUDE_CODE_NO_FLICKER=1 …`)
return next(e)
})
}
Mod 自身のコード
Mod のライセンス(MIT)に従って載せています。全文は下にあります。写すときは著作権表示を残してください。
hooks/register.js 338〜415 行 · ペイン
on('ui.render', { component: 'Pane' }, async ($, e, next) => {
if (e.requestId !== PANE) return next(e)
// Seated above the prompt (a pane kept from a main-screen session): close it
if (e.surface === 'terminal' && e.props.placement === 'inline') {
paneOpen = false
void $.ui.close({ id: PANE })
}
const E = $.ui.resolve(e)
const now = Date.now()
const redraw = () => $.ui.invalidate('ui.render')
// Read while drawing, so the pane is drawn again when swarm-mod writes it
const swarm = await readSwarm($)
return renderDashboard(
E,
{
width: (e.props.bodyColumns ?? 54) - 1,
now,
snap: S,
cache: cacheStatus(S.cache, now, ttlMs),
ttlMs,
ttlSource,
usage,
errorsOpen,
promptOpen,
links,
linkUi,
distUi,
swarm,
},
{
refresh: (proc) => restartProcess($, proc),
close: (proc) => closeProcess($, proc),
toggleErrors: () => {
errorsOpen = !errorsOpen
redraw()
},
togglePrompt: () => {
promptOpen = !promptOpen
redraw()
},
rescan: () => scanProcesses($, true),
clearExited: () => {
S.procs = S.procs.filter((p) => p.status === 'running')
changed($)
},
closePane: async () => {
await $.ui.close({ id: PANE })
paneOpen = false
},
addLink: () => pickAndLink($),
addLinkPath: (path) => {
linkUi.adding = false
redraw()
if (cleanPath(path)) return withBusy($, 'linking…', () => linkFolder($, path))
},
editLink: (link) => {
linkUi.editing = linkUi.editing === link.name ? null : link.name
redraw()
},
renameLink: (link, name) => {
linkUi.editing = null
redraw()
return withBusy($, 'renaming…', () => renameLink($, link, name))
},
unlink: (link) => withBusy($, 'unlinking…', () => unlinkFolder($, link)),
toggleSmallPct: () => {
distUi.showSmall = !distUi.showSmall
redraw()
},
togglePct: (kind) => {
if (distUi.shown.has(kind)) distUi.shown.delete(kind)
else distUi.shown.add(kind)
redraw()
},
},
)
})hooks/view.js 25〜52 行 · ペイン
export function renderDashboard(E, v, act) {
const { Box, Text } = E
const W = Math.max(28, v.width)
const rule = () => Text({ dimColor: true, wrap: 'truncate-end', children: ['─'.repeat(W)] })
return Box({
flexDirection: 'column',
width: W,
children: [
header(E, v, act, W),
cacheSection(E, v, W),
rule(),
activitySection(E, v, act, W),
rule(),
processSection(E, v, act, W),
rule(),
linkSection(E, v, act, W),
rule(),
taskSection(E, v, W, act),
rule(),
tokenSection(E, v, W),
rule(),
limitSection(E, v, W),
// Once a turn has ended
...(v.snap.dist ? [rule(), distSection(E, v, act, W)] : []),
],
})
}
hooks/view.js 54〜70 行 · ペイン
function header(E, v, act, W) {
const { Box, Text, Button } = E
return Box({
flexDirection: 'row',
justifyContent: 'space-between',
width: W,
marginBottom: 1,
children: [
Text({ bold: true, children: ['SESSION DASHBOARD'] }),
// One cell (~8px) in from the right edge, clear of the pane's own close X
Box({
marginRight: 1,
children: [Button({ key: 'pane-close', label: 'hide', hotkey: 'q', plain: true, dimColor: true, onPress: act.closePane })],
}),
],
})
}
hooks/view.js 83〜130 行 · ペイン
function cacheSection(E, v, W) {
const { Box, Text } = E
const c = v.cache
const color = c.isHot ? COLORS.hot : COLORS.cold
const word = c.isHot ? 'Hot' : 'Cold'
let detail
if (c.isNew) detail = 'no request yet'
else if (c.isHot) detail = 'expires in ' + fmtDuration(c.remainingMs)
else detail = 'expired ' + fmtAgo(-c.remainingMs)
const lines = []
if (!c.isNew) {
const hit = c.hitRate === null ? '—' : Math.round(c.hitRate * 100) + '%'
lines.push(
Text({
dimColor: true,
wrap: 'truncate-end',
children: ['last request ' + hit + ' cached · TTL ' + Math.round(v.ttlMs / 60000) + 'm' + (v.ttlSource === 'auto' ? ' (auto)' : '')],
}),
)
if (c.lastMiss === 'invalidated') {
lines.push(Text({ color: COLORS.cold, wrap: 'truncate-end', children: ['↯ last request missed the cache (invalidated)'] }))
} else if (c.lastMiss === 'expired') {
lines.push(Text({ color: COLORS.cold, wrap: 'truncate-end', children: ['last request rebuilt an expired cache'] }))
} else if (v.snap.cache.misses > 0) {
lines.push(Text({ dimColor: true, wrap: 'truncate-end', children: [v.snap.cache.misses + ' cache miss' + (v.snap.cache.misses === 1 ? '' : 'es') + ' this session'] }))
}
}
return Box({
flexDirection: 'column',
children: [
Box({
flexDirection: 'row',
columnGap: 1,
width: W,
children: [
// The colored block: three cells of background color
Text({ backgroundColor: color, children: [' '] }),
Text({ bold: true, children: ['Cache (', Text({ bold: true, color, children: [word] }), ')'] }),
Box({ flexGrow: 1, justifyContent: 'flex-end', children: [Text({ dimColor: true, wrap: 'truncate-start', children: [detail] })] }),
],
}),
...lines,
],
})
}
hooks/view.js 134〜195 行 · ペイン
function activitySection(E, v, act, W) {
const { Box, Text, Button } = E
const s = v.snap
const half = Math.floor(W / 2)
const errColor = s.errorCount > 0 ? COLORS.bad : COLORS.ok
const stat = (label, value, color, sub) =>
Box({
flexDirection: 'column',
width: half,
children: [
Text({ dimColor: true, bold: true, children: [label] }),
Text({ bold: true, color, children: [String(value)] }),
Text({ dimColor: true, wrap: 'truncate-end', children: [sub] }),
],
})
const lastErr = s.errors[0]
const errorRows = v.errorsOpen
? s.errors.slice(0, 6).map((err, i) =>
Box({
key: 'err-' + i,
flexDirection: 'row',
columnGap: 1,
children: [
Text({ color: COLORS.bad, children: ['✕'] }),
Text({
wrap: 'truncate-end',
children: [fit(err.kind, 14).trimEnd() + ' · ' + (err.tool ?? '') + (err.message ? ': ' + err.message : '')],
}),
],
}),
)
: []
return Box({
flexDirection: 'column',
children: [
Box({
flexDirection: 'row',
width: W,
children: [
stat('TOOL CALLS', s.toolCalls.total, COLORS.accent, 'main ' + s.toolCalls.main + ' · sub ' + s.toolCalls.sub),
stat('ERRORS', s.errorCount, errColor, lastErr ? lastErr.kind + ' ' + fmtAgo(v.now - lastErr.at) : 'none so far'),
],
}),
...(s.errorCount > 0
? [
Button({
key: 'errors-toggle',
label: v.errorsOpen ? '▾ hide errors' : '▸ show errors',
hotkey: 'e',
plain: true,
dimColor: true,
onPress: act.toggleErrors,
}),
]
: []),
...errorRows,
],
})
}
hooks/view.js 199〜271 行 · ペイン
function processSection(E, v, act, W) {
const { Box, Text, Button } = E
const procs = v.snap.procs
const running = procs.filter((p) => p.status === 'running').length
const PID = 7
const PORT = 7
const ACTIONS = 12
const CMD = Math.max(8, W - PID - PORT - ACTIONS - 1)
const title = sectionTitle(
E,
'BACKGROUND',
Text({ dimColor: true, children: [running + ' running' + (procs.length > running ? ' · ' + (procs.length - running) + ' ended' : '')] }),
)
if (procs.length === 0) {
return Box({
flexDirection: 'column',
children: [title, Text({ dimColor: true, children: ['No background commands in this session.'] })],
})
}
const headerRow = Box({
flexDirection: 'row',
children: [
Text({ dimColor: true, children: [fit('PID', PID)] }),
Text({ dimColor: true, children: [fit('PORT', PORT)] }),
Text({ dimColor: true, children: [fit('COMMAND', CMD)] }),
],
})
const rows = procs.map((p) => {
const alive = p.status === 'running'
const statusColor = alive ? COLORS.ok : p.status === 'failed' ? COLORS.bad : undefined
const port = p.ports?.length ? p.ports.join(',') : '—'
return Box({
key: 'proc-' + p.id,
flexDirection: 'row',
width: W,
children: [
Text({ color: statusColor, dimColor: !alive, children: [fit(p.pid ? String(p.pid) : alive ? '…' : '—', PID)] }),
Text({ color: p.ports?.length ? COLORS.cold : undefined, dimColor: !p.ports?.length, children: [fit(port, PORT)] }),
Box({
width: CMD,
flexShrink: 1,
children: [Text({ dimColor: !alive, wrap: 'truncate-end', children: [p.command + (alive ? '' : ' (' + p.status + ')')] })],
}),
Box({
flexDirection: 'row',
columnGap: 1,
marginLeft: 1,
children: [
Button({ key: 'refresh-' + p.id, label: '↻', onPress: () => act.refresh(p) }),
Button({ key: 'close-' + p.id, label: alive ? '✕' : '–', onPress: () => act.close(p) }),
],
}),
],
})
})
const footer = Box({
flexDirection: 'row',
columnGap: 2,
children: [
Button({ key: 'rescan', label: 'rescan', hotkey: 's', plain: true, dimColor: true, onPress: act.rescan }),
...(procs.length > running
? [Button({ key: 'clear-ended', label: 'clear ended', hotkey: 'x', plain: true, dimColor: true, onPress: act.clearExited })]
: []),
],
})
return Box({ flexDirection: 'column', children: [title, headerRow, ...rows, footer] })
}
ライセンスの全文(MIT)
MIT License Copyright (c) 2026 Michael Dobekidis 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.
コードが呼ぶもの
プログラム起動ファイル書き込みClaude を動かすツール呼び出し保存
コードから読み取ったデザイン
読み取ったコミットのソースから描いたもので、動かした結果ではありません。一覧は 3 回描き、条件はデスクトップアプリで描く最初の分岐を取り、動かしたときにだけ決まる値は仮の例(点線の下線)にするか省きます。色と書体はこのサイトのものです。
コードから読めること
2026-10-06 に読んだコミット cf2218e674c2 のソースから。最初のまとまりが載せる条件で、残りは自分で判断するための材料です。後のコミットは、次に読むまで見ていません。
| 載せる条件: 確かめやすいコード | |
|---|---|
| 入口を読んだ | hooks/hooks.json が名指すモジュールをすべて読んだ。hooks/register.js |
| 解析できる | すべてのファイルが TypeScript か JavaScript として解析できる。3 ファイルを解析 |
| コードが Mod の中で完結 | import は Mod 自身のファイルかエンジンのモジュールだけ。パッケージも require もない。コードはすべて Mod の中 |
| 読める | 圧縮した行・eval・new Function・計算した道の import()・符号化した塊がない。圧縮・eval・符号化した塊なし |
| 呼び出しが見える | 通信とプログラム起動はその場で $.http.fetch・$.process.run と書き、他へ渡さない。外への呼び出しはすべてその場の $ で |
| 入れる前に自分で判断する材料 | |
| 描く場所 | コードから読んだ、描く先。ターミナル・デスクトップアプリ・両方・何も描かない(フックだけ: 見張りやプロンプトの書き換え)のどれか。出すだけで、外す理由にはしない。ターミナルとデスクトップアプリに同じように描く |
| 入れる手順 | リポジトリ自身の .claude-plugin/marketplace.json にこの Mod が載っていて、ページに書いた手順でそのマーケットプレイスから入れられるか。リポジトリの .claude-plugin/marketplace.json に載っており、そこから入れられる |
| Windows のプログラム | $.process で起動するプログラムが Windows にあるか(tail・date・open・osascript・/usr/… などは無い)。hooks/register.js:732 ps(Windows にない); hooks/register.js:733 lsof(Windows にない); hooks/register.js:949 rm(Windows にない) |
| 通信 | fetch の送り先(https のホスト)がコードに書いてあるか。通信なし |
| プログラム | 起動するプログラムの名前がコードに書いてあり、シェル・インタプリタ・通信用の道具でないか。hooks/register.js:726 powershell(シェル・インタプリタ); hooks/register.js:784 実行時に決まるプログラム; hooks/register.js:912 実行時に決まるプログラム; hooks/register.js:940 powershell(シェル・インタプリタ); hooks/register.js:948 powershell(シェル・インタプリタ) |
| 読んで送る | ファイルや環境変数を読み、かつ通信するか。通信しない |
| ソースの鍵 | ソースに API キーや秘密鍵らしきものがあるか。ソースに鍵なし |
| ライセンス | オープンなライセンス(MIT・Apache-2.0・BSD・ISC・Unlicense・0BSD・CC0)で全文があれば、modscode にコードを載せる。違えばリンクだけ。MIT |
コードの文面を読んだだけで、安全の審査ではありません。動かしてはおらず、起動するプログラムの中で何が起きるかも見えません。入れる前の確認はあなたの役目です。 載せる条件
入れる
入れる前に、必ず自分で確かめてください。Mod はサンドボックスなしで、あなたの権限で動きます。modscode はこのコードの安全を保証しません。下のコードを読み(またはフォルダーで claude plugin validate .)、触るものを見て、読んだコミットを入れてください。
リポジトリがそのままマーケットプレイスです。このマーケットプレイスを足し(ターミナルでは次のコマンド、デスクトップアプリではプラグインの設定)、そこから Mod を入れます。
/plugin marketplace add netgfx/claude-session-dashboard-mod/plugin install session-dashboard@claude-session-dashboard-mod入るのはマーケットプレイスの最新のコミットで、ここで読んだもの(cf2218e674c2)と違うことがあります。入れる前に見比べてください。
Claude に聞く
modscode のコネクタを入れると、Claude がこのデザイン・コードが触るもの・コードを読んで、それをもとに作れます。たとえば:
modscode のデザイン「netgfx-session-dashboard」をコードごと読んで、同じようなペインを作って似たデザイン
-
Claude に頼む…2h 10m · █████░░░✓ build ✓ build ✓ buildJavaKotlin3 Python■ ok 3 ■ ok 3 ■ ok 3 Razor proven 3 Razor proven 3 Razor proven 3Phases ──────── 3/3build Pythonbuild Pythonbuild Python… 3 more phasesLua ──────── 3/Kotlin■ the whole upgrade Ruby■ build build Ruby■ build build Ruby■ build build Ruby … 3 moreNext ──────── PythonRuby (by hand)Podsclick a button, or ctrl+x tab then Tab, EnterAttention ──────── 3! Scala ! Scala ! Scala … 3 moreSession ──────── okJava
-
slop Edit1 of 3accepteditrejectClaude に頼む…
-
Claude に頼む…Skins0 Your promptadd rate limiting to the hub api0 Tool rows: finished, running, failedYour prompt Spinner0 Folded group of reads and searches●main · note 3 · note 3 · note 30 Edit diff cardDesktop only; the terminal keeps Claude Code's diff.0 Shell output cardDesktop only.0 Code block cardDesktop only; the terminal keeps Claude Code's markdown.0 TableAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentCopyAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentCopyAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentCopy0 SpinnerAccent SpinnerSpinnerSpinner… 2h 10m0 Band above the prompt: normal, then nudging to compact█████░░░ 42% build█████░░░ 42% build█████░░░ 42% buildContext is 42% full0 Compact now0 Band above a questionTable BashBashBash0 Turn footer (terminal)3 build in 2h 10m · Grep · +3 −3
-
Claude に頼む…agent-discoverbuildbuildbuildRefreshMCP Browse/3Tab / shift+Tab move · Enter presses · ↑↓ scroll · Esc back to the promptBrowse...Audit asks:DeclineAcceptDeclineCancelAudit asks:DeclineAcceptDeclineCancelAudit asks:DeclineAcceptDeclineCancel
-
Claude に頼む…Fanyi settingsOnAPI · OpusenOn this MacAPIHost src/ SaveKey K · paste a new one, Enter SaveOpus↻ RefreshCustom model model id, for an API that lists none UseFanyi settingsHostClose
-
Claude に頼む…Glossary BrowserGlossary openContextsContextsContexts▲ prevWrite1/Glossary▼ nextContexts