fleet
See every running Claude Code session and worktree at a glance: status, branch, uncommitted work, staleness
What it does
- Draws a band above the prompt, a pane, toasts
- Adds /exit, /fleet
- Hooks session.start, turn.complete, ui.close, ui.focus
- Keeps its own state between turns
- Starts processes
Good points
- No network calls
- Written in TypeScript
- Handles errors
Code to start from
Two kinds: a starter modscode writes from the design above, and the lines of the mod's own code that draw it.
Starter (register.tsx)
import type { Register } from 'claude-code'
// Drawn like fleet by Adarsh Muralidharan (pane, band, status, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/dubbus-fleet/
// 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 band above the prompt; what else goes there is drawn under it
on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
const { Box, Text, Button } = $.ui.resolve(e)
const why = '…'
return (
<Box flexDirection="column">
<Text color="yellow" wrap="truncate-end">
{"⧉ Before you go: this session "}
{why}
. A handoff keeps it for next time.
</Text>
<Box>
<Button label="Hand off and exit" hotkey="h" variant="primary" />
<Text>
{" "}
</Text>
<Button label="Exit now" hotkey="e" />
<Text>
{" "}
</Text>
<Button label="Stay" hotkey="s" />
</Box>
{await next(e)}
</Box>
)
})
// the pane: open it with $.ui.open({ id: 'my-pane', title: "Fleet" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Text, Button } = $.ui.resolve(e)
const warning = '…'
const headline = '…'
const details = '…'
const glyph = '…'
const label = '…'
const status = '…'
const basename = '…'
const gitText = '…'
const ctxText = '…'
const status2 = '…'
const basename2 = '…'
const gitText2 = '…'
const ctxText2 = '…'
const status3 = '…'
const basename3 = '…'
const gitText3 = '…'
const ctxText3 = '…'
const length = '…'
return (
<Box flexDirection="column">
<Text color="red" wrap="wrap">
{"⚠ "}
{warning}
</Text>
<Text bold wrap="truncate-end">
{headline}
</Text>
<Text dimColor wrap="truncate-end">
{details}
</Text>
<Text>
{" "}
</Text>
<Box>
<Button plain label="▸" autoFocus />
<Text>
{` ${glyph} `}
</Text>
<Text color="red" bold wrap="truncate-end">
{`x to close: ${label}`}
{" "}
</Text>
<Text>
{" "}
</Text>
<Text>
{status}
</Text>
<Text>
{basename}
{" "}
</Text>
<Text color="magenta">
{gitText}
</Text>
<Text dimColor>
{" "}
{" "}
</Text>
<Text color="red">
{ctxText}
</Text>
</Box>
<Box>
<Button plain label="▸" autoFocus />
<Text>
{` ${glyph} `}
</Text>
<Text color="red" bold wrap="truncate-end">
{`x to close: ${label}`}
{" "}
</Text>
<Text>
{" "}
</Text>
<Text>
{status2}
</Text>
<Text>
{basename2}
{" "}
</Text>
<Text color="magenta">
{gitText2}
</Text>
<Text dimColor>
{" "}
{" "}
</Text>
<Text color="red">
{ctxText2}
</Text>
</Box>
<Box>
<Button plain label="▸" autoFocus />
<Text>
{` ${glyph} `}
</Text>
<Text color="red" bold wrap="truncate-end">
{`x to close: ${label}`}
{" "}
</Text>
<Text>
{" "}
</Text>
<Text>
{status3}
</Text>
<Text>
{basename3}
{" "}
</Text>
<Text color="magenta">
{gitText3}
</Text>
<Text dimColor>
{" "}
{" "}
</Text>
<Text color="red">
{ctxText3}
</Text>
</Box>
<Text dimColor>
{" +"}
{length}
{" more (/fleet list)"}
</Text>
<Text>
{" "}
</Text>
<Box>
<Button label="Handoff" hotkey="h" />
<Text>
{" "}
</Text>
<Button label="Save" hotkey="s" />
<Text>
{" "}
</Text>
<Button label="Close" hotkey="x" />
<Text>
{" "}
</Text>
<Button label="Copy resume" hotkey="c" />
<Text>
{" "}
</Text>
<Button label="Refresh" hotkey="r" />
</Box>
<Text dimColor wrap="truncate-end">
● in progress ◐ finished: hand off ○ light · ctx = tokens a resume re-caches · cold = cache expired
</Text>
</Box>
)
})
on('session.start', async ($, e, next) => {
const label = '…'
const status = '…'
await $.ui.toast(`⚠ ${label} needs you (${status})`)
await $.ui.toast(`✓ ${label} finished`)
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.
hooks/register.tsx lines 674–690 · Band
on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
const offer = await read($, band)
if (!offer || e.props.hasSurvey) return next(e)
return bandView($.ui.resolve(e), offer, {
handOff: then => { void handOffSelf($, then) },
startFresh: path => startFresh($, path),
exitNow: () => {
exitApproved = true
runLater($, 'exit')
},
later: tokens => {
snoozedAt = tokens
void update($, band, () => null)
},
dismiss: () => { void update($, band, () => null) },
})
})hooks/lib/views.tsx lines 112–160 · Band
export const bandView = (el: ElementTable, offer: Band, act: BandActions) => {
const { Box, Button, Text } = el
if (offer.kind === 'working') return <Text dimColor>⧉ {offer.text}</Text>
if (offer.kind === 'handedOff') {
return (
<Box flexDirection="column">
<Text color="green" wrap="truncate-end">⧉ Handoff written: {basename(offer.path)}</Text>
<Box>
<Button key="fresh" label="Start fresh from it" hotkey="f" variant="primary" onPress={() => act.startFresh(offer.path)} />
<Text> </Text>
<Button key="keep" label="Keep going here" hotkey="k" onPress={act.dismiss} />
</Box>
</Box>
)
}
if (offer.kind === 'exit') {
const why = offer.value === 'active' ? 'is still in progress' : `holds ${tokensText(offer.tokens)} tokens`
return (
<Box flexDirection="column">
<Text color="yellow" wrap="truncate-end">⧉ Before you go: this session {why}. A handoff keeps it for next time.</Text>
<Box>
<Button key="handoff-exit" label="Hand off and exit" hotkey="h" variant="primary" onPress={() => act.handOff('exit')} />
<Text> </Text>
<Button key="exit-now" label="Exit now" hotkey="e" onPress={act.exitNow} />
<Text> </Text>
<Button key="stay" label="Stay" hotkey="s" onPress={act.dismiss} />
</Box>
</Box>
)
}
return (
<Box flexDirection="column">
<Text color="yellow" wrap="truncate-end">
⧉ This session is carrying {tokensText(offer.tokens)} tokens. A handoff lets a fresh session continue from about 3k.
</Text>
<Box>
<Button key="handoff-fresh" label="Hand off and start fresh" hotkey="h" variant="primary" onPress={() => act.handOff('fresh')} />
<Text> </Text>
<Button key="handoff-only" label="Just write it" hotkey="w" onPress={() => act.handOff(null)} />
<Text> </Text>
<Button key="later" label="Later" hotkey="l" onPress={() => act.later(offer.tokens)} />
</Box>
</Box>
)
}hooks/register.tsx lines 692–706 · Pane
on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
const [snap, picked, closing] = await Promise.all([read($, snapshot), read($, selected), read($, pendingClose)])
return paneView(
$.ui.resolve(e),
{ snap, picked, closing, columns: e.props.bodyColumns, rows: e.viewport?.rows ?? 24 },
{
select: key => { void update($, selected, () => key) },
handoff: () => { void handoffSelected($) },
save: () => { void saveSelected($) },
close: () => { void closeSelected($) },
copy: press => { void copyResume($, press.surface) },
refresh: () => { void scan($, true) },
},
)
})hooks/lib/views.tsx lines 30–102 · Pane
export const paneView = (el: ElementTable, view: PaneView, act: PaneActions) => {
const { Box, Button, Text } = el
const { snap, picked, closing } = view
if (!snap) return <Text dimColor>Scanning…</Text>
const now = snap.scannedAt
const counts = windowCounts(snap.rows)
const hasGit = snap.rows.some(r => r.git)
const [headline, details] = summaryParts(snap)
const ctxW = 10
const projW = Math.max(8, Math.min(20, Math.floor(view.columns * 0.16)))
const gitW = hasGit ? Math.max(6, Math.min(22, Math.floor(view.columns * 0.2))) : 0
const nameW = Math.max(10, view.columns - 4 - 9 - projW - gitW - 5 - ctxW - 5)
const room = Math.max(1, view.rows - 7)
return (
<Box flexDirection="column">
{snap.warning ? <Text color="red" wrap="wrap">⚠ {snap.warning}</Text> : null}
<Text bold wrap="truncate-end">{headline}</Text>
{details ? <Text dimColor wrap="truncate-end">{details}</Text> : null}
<Text> </Text>
{snap.rows.slice(0, room).map((r, i) => {
const isPicked = r.key === picked
const stale = r.pid !== null && isStale(r, now)
const color = r.status === 'busy' ? 'yellow' : needsYou(r.status) && r.pid !== null ? 'red' : undefined
const cold = r.tokens !== null && isCold(r, now)
return (
<Box key={r.key}>
<Button
key={`row:${r.key}`}
plain
label={isPicked ? '▸' : r.isSelf ? '•' : ' '}
autoFocus={i === 0 && picked === null ? true : undefined}
onPress={() => act.select(r.key)}
/>
<Text color={r.value ? VALUE_COLOR[r.value] : undefined} dimColor={r.value === 'light'}>{` ${glyph(r)} `}</Text>
{r.key === closing ? (
<Text color="red" bold wrap="truncate-end">{fit(`x to close: ${label(r)}`, nameW)} </Text>
) : (
<Text bold={r.isSelf || isPicked} inverse={isPicked} color={r.isSelf ? 'cyan' : undefined} dimColor={stale && !isPicked} wrap="truncate-end">
{fitLabel(r, counts, nameW)}
</Text>
)}
<Text> </Text>
<Text color={color} dimColor={!color}>{fit(r.status, 9)}</Text>
<Text dimColor={stale}>{fit(basename(r.cwd), projW)} </Text>
{hasGit ? (
<Text color={r.git?.dirty ? 'magenta' : undefined} dimColor={!r.git || stale}>{fit(gitText(r.git), gitW)}</Text>
) : null}
<Text dimColor>{(r.pid === null ? '' : ago(now - r.updatedAt)).padStart(4)} </Text>
<Text color={cold && (r.tokens ?? 0) >= 500_000 ? 'red' : cold ? 'blue' : undefined} dimColor={!cold}>
{ctxText(r, now).padStart(ctxW)}
</Text>
</Box>
)
})}
{snap.rows.length > room ? <Text dimColor> +{snap.rows.length - room} more (/fleet list)</Text> : null}
<Text> </Text>
<Box>
<Button key="handoff" label="Handoff" hotkey="h" onPress={act.handoff} />
<Text> </Text>
<Button key="save" label="Save" hotkey="s" onPress={act.save} />
<Text> </Text>
<Button key="close" label="Close" hotkey="x" onPress={act.close} />
<Text> </Text>
<Button key="copy" label="Copy resume" hotkey="c" onPress={act.copy} />
<Text> </Text>
<Button key="refresh" label="Refresh" hotkey="r" onPress={act.refresh} />
</Box>
<Text dimColor wrap="truncate-end">● in progress ◐ finished: hand off ○ light · ctx = tokens a resume re-caches · cold = cache expired</Text>
</Box>
)
}Licence text (MIT)
MIT License Copyright (c) 2026 Adarsh Muralidharan 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.
What its code calls
runs programswrites filesenv varsdrives Clauderemembers
The design, read from code
Drawn from the mod's source at the commit read, not from a run: a list is drawn three times, a condition takes its first branch that draws in the desktop app, and a value only the run time knows is shown as a made-up sample (dotted underline) or left out. Colours and type are this site's.
What its code shows
Read from the source at commit fb7bad3de470 on 2026-10-06. 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.8 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.its repository's .claude-plugin/marketplace.json does not list it: no install line to give |
| Programs on Windows | Whether every program it starts through $.process exists on Windows (tail, date, open, osascript, /usr/… do not).hooks/register.tsx:78 ps (not on Windows); hooks/register.tsx:126 tail (not on Windows); hooks/register.tsx:215 head (not on Windows); hooks/register.tsx:216 tail (not on Windows); hooks/register.tsx:323 ps (not on Windows) |
| 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.ps, git (reaches the network), tail, head, kill |
| Reads and sends | Whether it both reads files or environment variables and reaches the network.reads environment variables and files 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 |
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 the code below (or run claude plugin validate . in its folder), weigh what it reaches, and install the commit you read.
Its repository's .claude-plugin/marketplace.json does not list it, so there is no install line to give. Read it as code, or follow its author's README.
Ask Claude about it
With the modscode connector added, Claude can read this design, what its code reaches and its code, and build on them. Ask it like this:
Read the modscode design "dubbus-fleet" with its code and make me a pane like itSearch them from Claude: the MCP connector
Similar designs
-
Ask 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
-
Open a file first: /crit-tui file <path>Reopen this one in the crit browser view.Ask Claude…
-
Ask Claude…TodayOct 63 left · Mar overdueRemCTL: Sep✓ All done for today.● build3● Fix login ● ⚑Jul · build✓● Fix login ● ⚑Jul · build✓● Fix login ● ⚑Jul · build✓● build3● Fix login ● ⚑Jul · build✓● Fix login ● ⚑Jul · build✓● Fix login ● ⚑Jul · build✓● build3● Fix login ● ⚑Jul · build✓● Fix login ● ⚑Jul · build✓● Fix login ● ⚑Jul · build✓Updated 14:32UndoRefresh
-
Ask Claude…TO graph› Fix login › Fix login › Fix loginScopeThis featureWhole projectHide done stepsReconnect
-
Ask Claude…InboxUntitled captureFinishing Open in localvoxtralUntitled captureFinishing Open in localvoxtralUntitled captureFinishing Open in localvoxtral
-
Ask Claude…InboxUntitled captureFinishing Open in localvoxtralUntitled captureFinishing Open in localvoxtralUntitled captureFinishing Open in localvoxtral