ModsCode / Claude Code Mods / Ranking / deck
deck
A pane beside the conversation for the work behind it: running shells and agents, the model and a clickable effort meter, and step-by-step progress of any job as a tree: /deck
What it does
- Draws a pane
- Adds /deck
- Watches Bash, TaskStop, TaskCreate, TaskUpdate calls and can refuse them
- Hooks agent.spawn, classic.PermissionRequest, classic.Stop, prompt.compose and 5 more
- Keeps its own state between turns
Good points
- Written in TypeScript
- Has a desktop-specific branch
- Handles errors
- Writes no files
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 deck by Barış Demirhan (pane, toast), as ModsCode read it from the mod's code:
// https://modscode.com/claude-mods/mods/barisdemirhan-deck/
// 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: "deck" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Text, Button } = $.ui.resolve(e)
const split = '…'
const effortOf = '…'
const usage = '…'
const context = '…'
const usage2 = '…'
const length = '…'
const title = '…'
const kind = '…'
const name = '…'
const bar = '…'
const detailOf = '…'
const kind2 = '…'
const name2 = '…'
const bar2 = '…'
const title2 = '…'
const detailOf2 = '…'
const kind3 = '…'
const name3 = '…'
const bar3 = '…'
const title3 = '…'
const detailOf3 = '…'
const kind4 = '…'
const name4 = '…'
const bar4 = '…'
const title4 = '…'
const detailOf4 = '…'
const kind5 = '…'
const name5 = '…'
const bar5 = '…'
const title5 = '…'
const detailOf5 = '…'
const kind6 = '…'
const name6 = '…'
const bar6 = '…'
const title6 = '…'
const detailOf6 = '…'
const STEP_GLYPHS = '…'
const STEP_GLYPHS2 = '…'
const title7 = '…'
const meter = '…'
const count = '…'
const span = '…'
const title8 = '…'
const STEP_GLYPHS3 = '…'
const STEP_GLYPHS4 = '…'
const title9 = '…'
const meter2 = '…'
const count2 = '…'
const span2 = '…'
const title10 = '…'
const STEP_GLYPHS5 = '…'
const STEP_GLYPHS6 = '…'
const title11 = '…'
const meter3 = '…'
const count3 = '…'
const span3 = '…'
const title12 = '…'
const STEP_GLYPHS7 = '…'
const STEP_GLYPHS8 = '…'
const title13 = '…'
const meter4 = '…'
const count4 = '…'
const span4 = '…'
const title14 = '…'
const STEP_GLYPHS9 = '…'
const STEP_GLYPHS10 = '…'
const title15 = '…'
const meter5 = '…'
const count5 = '…'
const span5 = '…'
const title16 = '…'
const STEP_GLYPHS11 = '…'
const STEP_GLYPHS12 = '…'
const title17 = '…'
const meter6 = '…'
const count6 = '…'
const span6 = '…'
const title18 = '…'
const STEP_GLYPHS13 = '…'
const STEP_GLYPHS14 = '…'
const title19 = '…'
const meter7 = '…'
const count7 = '…'
const span7 = '…'
const title20 = '…'
const STEP_GLYPHS15 = '…'
const STEP_GLYPHS16 = '…'
const title21 = '…'
const meter8 = '…'
const count8 = '…'
const span8 = '…'
const title22 = '…'
const STEP_GLYPHS17 = '…'
const STEP_GLYPHS18 = '…'
const title23 = '…'
const meter9 = '…'
const count9 = '…'
const span9 = '…'
const title24 = '…'
const kind7 = '…'
const name7 = '…'
const bar7 = '…'
const title25 = '…'
const detailOf7 = '…'
const kind8 = '…'
const name8 = '…'
const bar8 = '…'
const title26 = '…'
const detailOf8 = '…'
const kind9 = '…'
const name9 = '…'
const bar9 = '…'
const title27 = '…'
const detailOf9 = '…'
return (
<Box flexDirection="column" paddingX={1}>
<Box flexDirection="column">
<Box columnGap={2} flexWrap="wrap" justifyContent="space-between">
<Box columnGap={2}>
<Text bold>
Claude
</Text>
<Box columnGap={1}>
<Text>
{split}
</Text>
<Button plain label={`${effortOf} ⟳`} />
</Box>
</Box>
<Text color="warning" wrap="truncate-end">
{usage}
</Text>
<Text>
{context}
</Text>
</Box>
<Text color="warning" wrap="truncate-end">
{usage2}
</Text>
</Box>
<Text dimColor wrap="truncate">
────────
</Text>
<Text dimColor>
Nothing runs yet.
</Text>
<Box flexDirection="column">
<Box justifyContent="space-between">
<Text bold dimColor>
{`SHELLS · ${length}`}
</Text>
</Box>
<Box flexDirection="column">
<Box>
<Box flexShrink={0} />
<Box width={2} flexShrink={0}>
<Button plain label="▾" />
</Box>
<Box width={2} flexShrink={0}>
<Text color="warning">
?
</Text>
</Box>
<Box flexGrow={1} flexShrink={1}>
<Button plain label={`${title}`} />
</Box>
<Box width={7} flexShrink={0} justifyContent="flex-end">
<Text dimColor>
{kind}
</Text>
</Box>
<Box flexShrink={0} justifyContent="flex-end">
<Text dimColor>
{name}
</Text>
<Text>
{" "}
</Text>
<Text>
{bar}
</Text>
</Box>
<Box width={8} flexShrink={0} justifyContent="flex-end">
<Text>
waits
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Text wrap="wrap">
{title}
</Text>
<Text dimColor wrap="wrap">
{detailOf}
</Text>
<Box>
<Button plain label="■ stop" />
</Box>
</Box>
<Box flexDirection="column">
<Box>
<Box flexShrink={0} />
<Box width={2} flexShrink={0}>
<Button plain label="▾" />
</Box>
<Box width={2} flexShrink={0}>
<Text color="warning">
?
</Text>
</Box>
<Box flexGrow={1} flexShrink={1}>
<Button plain label={`${title}`} />
</Box>
<Box width={7} flexShrink={0} justifyContent="flex-end">
<Text dimColor>
{kind2}
</Text>
</Box>
<Box flexShrink={0} justifyContent="flex-end">
<Text dimColor>
{name2}
</Text>
<Text>
{" "}
</Text>
<Text>
{bar2}
</Text>
</Box>
<Box width={8} flexShrink={0} justifyContent="flex-end">
<Text>
waits
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Text wrap="wrap">
{title2}
</Text>
<Text dimColor wrap="wrap">
{detailOf2}
</Text>
<Box>
<Button plain label="■ stop" />
</Box>
</Box>
<Box flexDirection="column">
<Box>
<Box flexShrink={0} />
<Box width={2} flexShrink={0}>
<Button plain label="▾" />
</Box>
<Box width={2} flexShrink={0}>
<Text color="warning">
?
</Text>
</Box>
<Box flexGrow={1} flexShrink={1}>
<Button plain label={`${title}`} />
</Box>
<Box width={7} flexShrink={0} justifyContent="flex-end">
<Text dimColor>
{kind3}
</Text>
</Box>
<Box flexShrink={0} justifyContent="flex-end">
<Text dimColor>
{name3}
</Text>
<Text>
{" "}
</Text>
<Text>
{bar3}
</Text>
</Box>
<Box width={8} flexShrink={0} justifyContent="flex-end">
<Text>
waits
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Text wrap="wrap">
{title3}
</Text>
<Text dimColor wrap="wrap">
{detailOf3}
</Text>
<Box>
<Button plain label="■ stop" />
</Box>
</Box>
<Box flexDirection="column">
<Box>
<Box flexShrink={0} />
<Box width={2} flexShrink={0}>
<Button plain label="▾" />
</Box>
<Box width={2} flexShrink={0}>
<Text color="warning">
?
</Text>
</Box>
<Box flexGrow={1} flexShrink={1}>
<Button plain label={`${title}`} />
</Box>
<Box width={7} flexShrink={0} justifyContent="flex-end">
<Text dimColor>
{kind4}
</Text>
</Box>
<Box flexShrink={0} justifyContent="flex-end">
<Text dimColor>
{name4}
</Text>
<Text>
{" "}
</Text>
<Text>
{bar4}
</Text>
</Box>
<Box width={8} flexShrink={0} justifyContent="flex-end">
<Text>
waits
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Text wrap="wrap">
{title4}
</Text>
<Text dimColor wrap="wrap">
{detailOf4}
</Text>
<Box>
<Button plain label="■ stop" />
</Box>
</Box>
</Box>
<Box flexDirection="column">
<Box>
<Box flexShrink={0} />
<Box width={2} flexShrink={0}>
<Button plain label="▾" />
</Box>
<Box width={2} flexShrink={0}>
<Text color="warning">
?
</Text>
</Box>
<Box flexGrow={1} flexShrink={1}>
<Button plain label={`${title}`} />
</Box>
<Box width={7} flexShrink={0} justifyContent="flex-end">
<Text dimColor>
{kind5}
</Text>
</Box>
<Box flexShrink={0} justifyContent="flex-end">
<Text dimColor>
{name5}
</Text>
<Text>
{" "}
</Text>
<Text>
{bar5}
</Text>
</Box>
<Box width={8} flexShrink={0} justifyContent="flex-end">
<Text>
waits
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Text wrap="wrap">
{title5}
</Text>
<Text dimColor wrap="wrap">
{detailOf5}
</Text>
<Box>
<Button plain label="■ stop" />
</Box>
</Box>
</Box>
<Box flexDirection="column">
<Box>
<Box flexShrink={0} />
<Box width={2} flexShrink={0}>
<Button plain label="▾" />
</Box>
<Box width={2} flexShrink={0}>
<Text color="warning">
?
</Text>
</Box>
<Box flexGrow={1} flexShrink={1}>
<Button plain label={`${title}`} />
</Box>
<Box width={7} flexShrink={0} justifyContent="flex-end">
<Text dimColor>
{kind6}
</Text>
</Box>
<Box flexShrink={0} justifyContent="flex-end">
<Text dimColor>
{name6}
</Text>
<Text>
{" "}
</Text>
<Text>
{bar6}
</Text>
</Box>
<Box width={8} flexShrink={0} justifyContent="flex-end">
<Text>
waits
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Text wrap="wrap">
{title6}
</Text>
<Text dimColor wrap="wrap">
{detailOf6}
</Text>
<Box>
<Button plain label="■ stop" />
</Box>
</Box>
</Box>
<Box flexDirection="column">
<Box>
<Box flexShrink={0} />
<Box width={2} flexShrink={0}>
<Text>
{STEP_GLYPHS}
</Text>
</Box>
<Box width={2} flexShrink={0}>
<Text>
{STEP_GLYPHS2}
</Text>
</Box>
<Box flexGrow={1} flexShrink={1}>
<Text color="error" wrap="truncate-end">
{title7}
</Text>
</Box>
<Box width={9} flexShrink={0} justifyContent="flex-end">
<Text>
{meter}
</Text>
</Box>
<Box width={6} flexShrink={0} justifyContent="flex-end">
<Text>
{count}
</Text>
</Box>
<Box width={8} flexShrink={0} justifyContent="flex-end">
<Text>
{span}
</Text>
</Box>
</Box>
<Box>
<Text wrap="wrap">
{title8}
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Box>
<Box flexShrink={0} />
<Box width={2} flexShrink={0}>
<Text>
{STEP_GLYPHS3}
</Text>
</Box>
<Box width={2} flexShrink={0}>
<Text>
{STEP_GLYPHS4}
</Text>
</Box>
<Box flexGrow={1} flexShrink={1}>
<Text color="error" wrap="truncate-end">
{title9}
</Text>
</Box>
<Box width={9} flexShrink={0} justifyContent="flex-end">
<Text>
{meter2}
</Text>
</Box>
<Box width={6} flexShrink={0} justifyContent="flex-end">
<Text>
{count2}
</Text>
</Box>
<Box width={8} flexShrink={0} justifyContent="flex-end">
<Text>
{span2}
</Text>
</Box>
</Box>
<Box>
<Text wrap="wrap">
{title10}
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Box>
<Box flexShrink={0} />
<Box width={2} flexShrink={0}>
<Text>
{STEP_GLYPHS5}
</Text>
</Box>
<Box width={2} flexShrink={0}>
<Text>
{STEP_GLYPHS6}
</Text>
</Box>
<Box flexGrow={1} flexShrink={1}>
<Text color="error" wrap="truncate-end">
{title11}
</Text>
</Box>
<Box width={9} flexShrink={0} justifyContent="flex-end">
<Text>
{meter3}
</Text>
</Box>
<Box width={6} flexShrink={0} justifyContent="flex-end">
<Text>
{count3}
</Text>
</Box>
<Box width={8} flexShrink={0} justifyContent="flex-end">
<Text>
{span3}
</Text>
</Box>
</Box>
<Box>
<Text wrap="wrap">
{title12}
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Box>
<Box flexShrink={0} />
<Box width={2} flexShrink={0}>
<Text>
{STEP_GLYPHS7}
</Text>
</Box>
<Box width={2} flexShrink={0}>
<Text>
{STEP_GLYPHS8}
</Text>
</Box>
<Box flexGrow={1} flexShrink={1}>
<Text color="error" wrap="truncate-end">
{title13}
</Text>
</Box>
<Box width={9} flexShrink={0} justifyContent="flex-end">
<Text>
{meter4}
</Text>
</Box>
<Box width={6} flexShrink={0} justifyContent="flex-end">
<Text>
{count4}
</Text>
</Box>
<Box width={8} flexShrink={0} justifyContent="flex-end">
<Text>
{span4}
</Text>
</Box>
</Box>
<Box>
<Text wrap="wrap">
{title14}
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Box>
<Box flexShrink={0} />
<Box width={2} flexShrink={0}>
<Text>
{STEP_GLYPHS9}
</Text>
</Box>
<Box width={2} flexShrink={0}>
<Text>
{STEP_GLYPHS10}
</Text>
</Box>
<Box flexGrow={1} flexShrink={1}>
<Text color="error" wrap="truncate-end">
{title15}
</Text>
</Box>
<Box width={9} flexShrink={0} justifyContent="flex-end">
<Text>
{meter5}
</Text>
</Box>
<Box width={6} flexShrink={0} justifyContent="flex-end">
<Text>
{count5}
</Text>
</Box>
<Box width={8} flexShrink={0} justifyContent="flex-end">
<Text>
{span5}
</Text>
</Box>
</Box>
<Box>
<Text wrap="wrap">
{title16}
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Box>
<Box flexShrink={0} />
<Box width={2} flexShrink={0}>
<Text>
{STEP_GLYPHS11}
</Text>
</Box>
<Box width={2} flexShrink={0}>
<Text>
{STEP_GLYPHS12}
</Text>
</Box>
<Box flexGrow={1} flexShrink={1}>
<Text color="error" wrap="truncate-end">
{title17}
</Text>
</Box>
<Box width={9} flexShrink={0} justifyContent="flex-end">
<Text>
{meter6}
</Text>
</Box>
<Box width={6} flexShrink={0} justifyContent="flex-end">
<Text>
{count6}
</Text>
</Box>
<Box width={8} flexShrink={0} justifyContent="flex-end">
<Text>
{span6}
</Text>
</Box>
</Box>
<Box>
<Text wrap="wrap">
{title18}
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Box>
<Box flexShrink={0} />
<Box width={2} flexShrink={0}>
<Text>
{STEP_GLYPHS13}
</Text>
</Box>
<Box width={2} flexShrink={0}>
<Text>
{STEP_GLYPHS14}
</Text>
</Box>
<Box flexGrow={1} flexShrink={1}>
<Text color="error" wrap="truncate-end">
{title19}
</Text>
</Box>
<Box width={9} flexShrink={0} justifyContent="flex-end">
<Text>
{meter7}
</Text>
</Box>
<Box width={6} flexShrink={0} justifyContent="flex-end">
<Text>
{count7}
</Text>
</Box>
<Box width={8} flexShrink={0} justifyContent="flex-end">
<Text>
{span7}
</Text>
</Box>
</Box>
<Box>
<Text wrap="wrap">
{title20}
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Box>
<Box flexShrink={0} />
<Box width={2} flexShrink={0}>
<Text>
{STEP_GLYPHS15}
</Text>
</Box>
<Box width={2} flexShrink={0}>
<Text>
{STEP_GLYPHS16}
</Text>
</Box>
<Box flexGrow={1} flexShrink={1}>
<Text color="error" wrap="truncate-end">
{title21}
</Text>
</Box>
<Box width={9} flexShrink={0} justifyContent="flex-end">
<Text>
{meter8}
</Text>
</Box>
<Box width={6} flexShrink={0} justifyContent="flex-end">
<Text>
{count8}
</Text>
</Box>
<Box width={8} flexShrink={0} justifyContent="flex-end">
<Text>
{span8}
</Text>
</Box>
</Box>
<Box>
<Text wrap="wrap">
{title22}
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Box>
<Box flexShrink={0} />
<Box width={2} flexShrink={0}>
<Text>
{STEP_GLYPHS17}
</Text>
</Box>
<Box width={2} flexShrink={0}>
<Text>
{STEP_GLYPHS18}
</Text>
</Box>
<Box flexGrow={1} flexShrink={1}>
<Text color="error" wrap="truncate-end">
{title23}
</Text>
</Box>
<Box width={9} flexShrink={0} justifyContent="flex-end">
<Text>
{meter9}
</Text>
</Box>
<Box width={6} flexShrink={0} justifyContent="flex-end">
<Text>
{count9}
</Text>
</Box>
<Box width={8} flexShrink={0} justifyContent="flex-end">
<Text>
{span9}
</Text>
</Box>
</Box>
<Box>
<Text wrap="wrap">
{title24}
</Text>
</Box>
</Box>
</Box>
<Box flexDirection="column">
<Box>
<Box flexShrink={0} />
<Box width={2} flexShrink={0}>
<Button plain label="▾" />
</Box>
<Box width={2} flexShrink={0}>
<Text color="warning">
?
</Text>
</Box>
<Box flexGrow={1} flexShrink={1}>
<Button plain label={`${title}`} />
</Box>
<Box width={7} flexShrink={0} justifyContent="flex-end">
<Text dimColor>
{kind7}
</Text>
</Box>
<Box flexShrink={0} justifyContent="flex-end">
<Text dimColor>
{name7}
</Text>
<Text>
{" "}
</Text>
<Text>
{bar7}
</Text>
</Box>
<Box width={8} flexShrink={0} justifyContent="flex-end">
<Text>
waits
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Text wrap="wrap">
{title25}
</Text>
<Text dimColor wrap="wrap">
{detailOf7}
</Text>
<Box>
<Button plain label="■ stop" />
</Box>
</Box>
<Box flexDirection="column">
<Box>
<Box flexShrink={0} />
<Box width={2} flexShrink={0}>
<Button plain label="▾" />
</Box>
<Box width={2} flexShrink={0}>
<Text color="warning">
?
</Text>
</Box>
<Box flexGrow={1} flexShrink={1}>
<Button plain label={`${title}`} />
</Box>
<Box width={7} flexShrink={0} justifyContent="flex-end">
<Text dimColor>
{kind8}
</Text>
</Box>
<Box flexShrink={0} justifyContent="flex-end">
<Text dimColor>
{name8}
</Text>
<Text>
{" "}
</Text>
<Text>
{bar8}
</Text>
</Box>
<Box width={8} flexShrink={0} justifyContent="flex-end">
<Text>
waits
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Text wrap="wrap">
{title26}
</Text>
<Text dimColor wrap="wrap">
{detailOf8}
</Text>
<Box>
<Button plain label="■ stop" />
</Box>
</Box>
</Box>
<Box flexDirection="column">
<Box>
<Box flexShrink={0} />
<Box width={2} flexShrink={0}>
<Button plain label="▾" />
</Box>
<Box width={2} flexShrink={0}>
<Text color="warning">
?
</Text>
</Box>
<Box flexGrow={1} flexShrink={1}>
<Button plain label={`${title}`} />
</Box>
<Box width={7} flexShrink={0} justifyContent="flex-end">
<Text dimColor>
{kind9}
</Text>
</Box>
<Box flexShrink={0} justifyContent="flex-end">
<Text dimColor>
{name9}
</Text>
<Text>
{" "}
</Text>
<Text>
{bar9}
</Text>
</Box>
<Box width={8} flexShrink={0} justifyContent="flex-end">
<Text>
waits
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Text wrap="wrap">
{title27}
</Text>
<Text dimColor wrap="wrap">
{detailOf9}
</Text>
<Box>
<Button plain label="■ stop" />
</Box>
</Box>
</Box>
<Box flexDirection="column">
<Box>
<Box flexShrink={0} />
<Box width={2} flexShrink={0}>
<Button plain label="▾" />
</Box>
</Box>
</Box>
</Box>
</Box>
</Box>
</Box>
</Box>
)
})
}
The mod's own code
Shown under the mod's licence (MIT); its text is below. Keep the notice if you copy these lines.
hooks/register.tsx lines 1304–1353 · Pane
on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
await read($, now)
const at = await $.clock.now()
// What the docked pane takes from the screen, which the next tick hands on.
session.dockCells =
e.surface === 'terminal' && e.props.placement === 'dock' ? e.props.bodyColumns + DOCK_FRAME_CELLS : 0
const all = await read($, runs)
const shut = await read($, folds)
const active = activeOf(all)
const jobs = await read($, work)
// A run a running agent opened is drawn under that agent's row.
const isNested = (run: Run): boolean =>
isLive(run) && jobs.running.some((job) => job.kind === 'agent' && job.id === run.loop)
return paneTree($.ui.resolve(e), {
meter: await read($, meter),
work: jobs,
now: at,
columns: e.props.bodyColumns,
isInline: e.props.placement === 'inline',
onEffort: () => {
void update($, meter, stepped)
},
runs: ordered(all)
.filter((run) => !isNested(run))
.map((run) => rowsOf(run, shut, at, run.id === active?.id)),
nested: Object.fromEntries(
jobs.running.map((job) => [
job.id,
all
.filter((run) => isNested(run) && run.loop === job.id)
// Under its agent's row a run needs no owner's name.
.map((run) => rowsOf({ ...run, owner: '' }, shut, at, true)),
]),
),
open: shut,
onJob: (job) => {
void update($, folds, (kept) => ({ ...kept, [`job:${job.id}`]: kept[`job:${job.id}`] !== true }))
},
onStop: (job) => {
void halted($, job)
},
onClear: () => {
void sweptAway($)
},
onFold: (row) => {
void update($, folds, (kept) => ({ ...kept, [row.key]: !(kept[row.key] ?? row.isOpen) }))
},
})
})hooks/pane.tsx lines 449–492 · Pane
export const paneTree = (kit: Kit, view: PaneView): RenderElement => {
const { Box, Text, Button } = kit
const { work } = view
const columns = Math.max(1, view.columns - 2 * PAD)
const line = rule(kit, columns)
const more = runSections(kit, view)
const isIdle = work.running.length === 0 && work.recent.length === 0 && more.length === 0
const isOver = (rows: readonly Row[]): boolean =>
rows[0]?.status === 'done' || rows[0]?.status === 'failed' || rows[0]?.isStopped === true
const canClear = work.recent.length > 0 || view.runs.some(isOver)
// What runs, in two sections: the shells nobody's agent started, then each
// agent with what it started under it.
const isTop = (job: Job): boolean => !work.running.some((one) => one.id === job.owner)
const shells = work.running.filter((job) => job.kind === 'shell' && isTop(job))
const agents = work.running.filter((job) => job.kind === 'agent' && isTop(job))
const blank = <Text> </Text>
// Above the prompt the newest few ended jobs are listed, and the rest counted.
const recent = view.isInline ? work.recent.slice(0, RECENT_INLINE) : work.recent
const hidden = work.recent.length - recent.length
const clear = (
<Button key="clear" plain dimColor label="× clear" onPress={view.onClear} />
)
return (
<Box flexDirection="column" paddingX={PAD}>
{head(kit, view)}
{line}
{work.running.length === 0 && (
<Text dimColor>{isIdle ? 'Nothing runs yet.' : 'Nothing runs right now.'}</Text>
)}
{shells.length > 0 && section(kit, `SHELLS · ${shells.length}`, blank, shells, view, false)}
{shells.length > 0 && agents.length > 0 && line}
{agents.length > 0 && section(kit, `AGENTS · ${agents.length}`, blank, agents, view, false)}
{isIdle && (
<Text dimColor>Shells, agents and task lists Claude starts show here while they run.</Text>
)}
{more.flatMap((part) => [line, part])}
{work.recent.length > 0 && line}
{work.recent.length > 0 &&
section(kit, 'RECENT', hidden > 0 ? <Text dimColor>{`+${hidden} more`}</Text> : blank, recent, view)}
{canClear && <Box justifyContent="flex-end">{clear}</Box>}
</Box>
)
}hooks/pane.tsx lines 239–280 · Pane
const head = (kit: Kit, view: PaneView): RenderElement => {
const { Box, Text, Button } = kit
const { meter } = view
const effort = effortText(meter)
const context = contextText(meter)
const usage = usageText(meter)
const spent = (
<Text color={isTight(meter) ? 'warning' : undefined} dimColor={!isTight(meter)} wrap="truncate-end">
{usage}
</Text>
)
return (
<Box flexDirection="column">
<Box columnGap={2} flexWrap="wrap" justifyContent="space-between">
<Box columnGap={2}>
<Text bold>{modelName(meter.model) || 'Claude'}</Text>
{canStep(meter) ? (
<Box columnGap={1}>
<Text color={effortColor(meter)} dimColor={effortOf(meter) === 'low'}>
{effort.split(' ')[0]}
</Text>
<Button
key="effort"
plain
label={`${effortOf(meter)} ${isHeld(meter) ? '⟳' : '↑'}`.padEnd(LEVEL_CELLS + 2)}
onPress={view.onEffort}
/>
</Box>
) : (
<Text dimColor>
{effort || (meter.isSeen ? 'no effort setting' : 'effort shows with the first request')}
</Text>
)}
</Box>
{view.isInline && usage !== '' && spent}
{context !== '' && <Text dimColor={meter.context < 80}>{context}</Text>}
</Box>
{!view.isInline && usage !== '' && spent}
</Box>
)
}hooks/pane.tsx lines 86–90 · Pane
const rule = ({ Text }: Kit, columns: number): RenderElement => (
<Text dimColor wrap="truncate">
{'─'.repeat(Math.max(1, columns))}
</Text>
)hooks/pane.tsx lines 282–303 · Pane
const section = (
kit: Kit,
title: string,
aside: RenderElement,
jobs: readonly Job[],
view: PaneView,
hasKind = true,
): RenderElement => {
const { Box, Text } = kit
return (
<Box flexDirection="column">
<Box justifyContent="space-between">
<Text bold dimColor>
{title}
</Text>
{aside}
</Box>
{jobs.map((job) => jobRow(kit, job, view, 0, hasKind))}
</Box>
)
}hooks/pane.tsx lines 129–231 · Pane
const jobRow = (
kit: Kit,
job: Job,
view: PaneView,
indent = 0,
wantsKind = true,
): RenderElement => {
const { Box, Text, Button } = kit
const tune = tuneOf(job, view.columns)
// An agent's model stands in for its kind, which it says as well.
const hasKind = tune.cells === 0 && wantsKind && view.columns >= KIND_FROM
// The row's cells less its fold and state marks, its indent and its columns at the right.
const room =
view.columns - 2 * PAD - 4 - 2 * indent - SPAN_CELLS - (hasKind ? KIND_CELLS : tune.cells) - 1
const title = fitted(job.title, room)
// What the agent of this row started and still runs is drawn under it.
const own =
job.kind === 'agent' && job.status === 'running'
? view.work.running.filter((one) => one.owner === job.id)
: []
const isOpen = view.open[`job:${job.id}`] === true
const canStop = job.status === 'running' && job.taskId !== ''
return (
<Box flexDirection="column">
<Box>
<Box width={2 * indent} flexShrink={0} />
<Box width={2} flexShrink={0}>
<Button
key={`job-mark:${job.id}`}
plain
label={isOpen ? '▾' : '▸'}
onPress={() => {
view.onJob(job)
}}
/>
</Box>
<Box width={2} flexShrink={0}>
<Text color={job.isAsking ? 'warning' : COLORS[job.status]} dimColor={job.status === 'ended'}>
{job.isAsking ? ASKING : GLYPHS[job.status]}
</Text>
</Box>
<Box flexGrow={1} flexShrink={1}>
<Button
key={`job:${job.id}`}
plain
dimColor={!isOpen && job.status !== 'running' && job.status !== 'failed'}
label={title}
onPress={() => {
view.onJob(job)
}}
/>
</Box>
{hasKind && (
<Box width={KIND_CELLS} flexShrink={0} justifyContent="flex-end">
<Text dimColor>{job.kind}</Text>
</Box>
)}
{tune.cells > 0 && (
<Box width={tune.cells} flexShrink={0} justifyContent="flex-end">
<Text dimColor>{tune.name}</Text>
{tune.bar !== '' && <Text> </Text>}
{tune.bar !== '' && (
<Text color={levelColor(job.effort)} dimColor={job.status !== 'running' || levelColor(job.effort) === undefined}>
{tune.bar}
</Text>
)}
</Box>
)}
<Box width={SPAN_CELLS} flexShrink={0} justifyContent="flex-end">
<Text dimColor={job.status !== 'running' || job.isAsking}>
{job.isAsking ? ASKING_SPAN : jobSpan(job, view.now)}
</Text>
</Box>
</Box>
{isOpen && (
<Box flexDirection="column" paddingLeft={4 + 2 * indent}>
{title !== job.title && <Text wrap="wrap">{job.title}</Text>}
<Text dimColor wrap="wrap">
{detailOf(job, view.columns - 2 * PAD - 4 - 2 * indent)}
</Text>
{canStop && (
<Box>
<Button
key={`stop:${job.id}`}
plain
label="■ stop"
onPress={() => {
view.onStop(job)
}}
/>
</Box>
)}
</Box>
)}
{own.map((one) => jobRow(kit, one, view, indent + 1, wantsKind))}
{job.status === 'running' &&
(view.nested[job.id] ?? []).flatMap((rows) =>
rows.map((row) => stepRow(kit, row, view, indent + 1)),
)}
</Box>
)
}Licence text (MIT)
MIT License Copyright (c) 2026 Barış Demirhan 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
networkruns programsenv varsdrives Claudetool callsremembers
What its code shows
Read from the source at commit ece435367cc6. 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.hooks/register.tsx |
| Parses | Every file parses as TypeScript or JavaScript.9 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, the same in both |
| 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.git (reaches the network) |
| 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 and reaches the network |
| 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).calls no tool, MCP server or command |
| 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 command deck, adds tool ? |
| 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: command.run (deck), tool.call (Bash, TaskStop, TaskCreate (+4)), classic.PermissionRequest, classic.Stop · shapes: prompt.compose, turn.step · also: session.start, session.measure, session.end, ui.render (ToolProgress, UserMessage, Pane (+2)) (+2) · timers: clock.every |
| 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: GH_TOKEN, GITHUB_TOKEN |
| 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.writes no files, environment variables, settings or conversation rows |
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 barisdemirhan/claude-deck/plugin install deck@claude-deck/reload-pluginsThis installs the marketplace's latest commit, which may not be the one read here (ece435367cc6). 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/barisdemirhan/claude-deckgit -C claude-deck checkout ece435367cc63987a7ba37b525297f7bd7fe6122claude plugin validate claude-deckclaude --plugin-dir claude-deckThe 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 "barisdemirhan-deck" with its code and make me one like itSearch them from Claude: the MCP connector
Similar mods
- ruflo-swarmruvnet★ 74,323
- code-modernizationAnthropic★ 37,653
- moai-boardMoAI-ADK★ 1,230
- crit-tuiTomasz Tomczyk★ 1,196
- lcu-approveLCU★ 894
- ai-maestro-secrets23blocks-OS★ 817
More by Barış Demirhan
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/barisdemirhan-deck/)