ModsCode / Claude Code Mods / Ranking / clawd-bar
clawd-bar
Clawd, Claude Code's crab, lives in a band above your prompt: he acts out the session, shows what's running, your context and usage limits, and races your CI builds. Unofficial fan mod.
What it does
- Draws a band above the prompt, toasts
- Adds /clawd, /ci
- Watches Bash, PowerShell, TodoWrite, TaskCreate calls and can refuse them
- Hooks classic.Elicitation, classic.Notification, classic.PostCompact, classic.PostToolUse and 12 more
- Keeps its own state between turns
Good points
- 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 clawd-bar by KaiC5504 (band, toast), as ModsCode read it from the mod's code:
// https://modscode.com/claude-mods/mods/kaic5504-clawd-bar/
// 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, Svg, Text } = $.ui.resolve(e)
const source = '…'
const label = '…'
const name = '…'
const percent = '…'
const name2 = '…'
const percent2 = '…'
const name3 = '…'
const percent3 = '…'
return (
<Box flexDirection="column">
<Box flexDirection="row" alignItems="center">
<Svg source={`${source}`} alt={`${label}`} height={48} isInteractive />
<Box flexDirection="row" marginLeft={2} flexShrink={0}>
<Box flexDirection="column" marginRight={2} flexShrink={0}>
<Text dimColor>
{name}
</Text>
<Text>
<Text>
▊▊▊▊▊▊▊▊
</Text>
<Text>
▊▊▊▊▊▊▊▊
</Text>
<Text>
▊▊▊▊▊▊▊▊
</Text>
{" "}
<Text bold>
{percent}
%
</Text>
</Text>
<Text dimColor>
{" "}
</Text>
</Box>
<Box flexDirection="column" marginRight={2} flexShrink={0}>
<Text dimColor>
{name2}
</Text>
<Text>
<Text>
▊▊▊▊▊▊▊▊
</Text>
<Text>
▊▊▊▊▊▊▊▊
</Text>
<Text>
▊▊▊▊▊▊▊▊
</Text>
{" "}
<Text bold>
{percent2}
%
</Text>
</Text>
<Text dimColor>
{" "}
</Text>
</Box>
<Box flexDirection="column" marginRight={2} flexShrink={0}>
<Text dimColor>
{name3}
</Text>
<Text>
<Text>
▊▊▊▊▊▊▊▊
</Text>
<Text>
▊▊▊▊▊▊▊▊
</Text>
<Text>
▊▊▊▊▊▊▊▊
</Text>
{" "}
<Text bold>
{percent3}
%
</Text>
</Text>
<Text dimColor>
{" "}
</Text>
</Box>
</Box>
<Text dimColor>
│
│
│
</Text>
<Box flexDirection="column" marginLeft={1} flexGrow={1} flexShrink={1} minWidth={0} />
</Box>
{await next(e)}
</Box>
)
})
on('session.start', async ($, e, next) => {
await $.ui.toast(`Clawd on Desk put its per-event hooks back. In Clawd on Desk, open Settings → Agents, turn off "Manage Claude hooks aut…`)
await $.ui.toast(`clawd-bar can't watch Codemagic without a token: set CODEMAGIC_API_TOKEN or write it to ~/.codemagic-token.`)
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 775–775 · Band
on('ui.render', { component: 'AbovePrompt' }, ($, e, next) => drawBand($, e as never, next as never) as never)hooks/register.tsx lines 654–762 · Band
async function drawBand($: EngineInterface, e: BandEvent, next: (e: BandEvent) => unknown) {
if (e.props.hasSurvey || !settings.isPetOn || (await read($, isHidden))) {
stopAnimation()
return next(e)
}
isEngineWorking = e.props.isWorking
const now = await $.clock.now()
const isTerminal = e.surface === 'terminal'
if (isTerminal) await read($, second)
else await read($, demoStep)
if (isTerminal) await read($, barFrame)
const scene = demoStartedAt === null ? null : demoScene(now - demoStartedAt, now)
const view = scene ? (scene.ci ?? null) : settings.isCiOn ? ((await read($, ciView)) ?? (await loadView(hostFrom($)))) : null
const ci = scene || settings.isCiOn ? ciShown(view, now) : null
const shownVisual = await read($, visual)
const shownPet = await read($, pet)
const session: SessionShown = scene?.session ?? {
...shownVisual,
activity: await read($, activity),
subagents: shownPet.subagents.length,
place: await read($, place),
}
const act = ci?.act ?? session.act
if (act === 'working' && lastAct !== 'working') cabinetSpell++
lastAct = act
const work: Work | null = (scene ? scene.work : shownPet.work) ?? null
const extras: Extras = ci
? {}
: {
sweat: (scene ? scene.sweat : shownVisual.isSweating) === true,
planes: session.subagents,
...(work ? { work } : {}),
...(act === 'working' ? { game: Math.max(0, cabinetSpell) % CABINET_GAMES } : {}),
}
const playKey = CALL_ACTS.has(act) && work ? `${act}:${work.id}` : act
const usage = scene ? null : await $.session.usage().then(u => u, () => null)
const meterList: Meter[] = scene ? scene.meters : usage ? meters(usage, now) : []
hasClock = scene !== null || ci !== null || session.activity.turnStartedAt !== null
// A live race's lanes move every second; on the desktop that's the one redraw a second worth its rebuild.
if (!isTerminal && ci?.run) await read($, second)
const columns = e.props.bodyColumns
const clawdCols = isTerminal ? CLAWD_COLS : DESKTOP_CLAWD_COLS
const boxCols = isTerminal ? 1 : DESKTOP_BOX_COLS
const fit = fitBand(columns, clawdCols, meterList, 10, boxCols, !isTerminal)
const textWidth = Math.max(10, columns - clawdCols - GAP - (fit.gauges ? fit.width + 2 : 0))
const els = $.ui.resolve(e) as never as { Box: any; Text: any; Client?: any }
const { Box, Client } = els
const turnStartedAt = session.activity.turnStartedAt
const turnClock =
!isTerminal && Client && turnStartedAt !== null ? (
<Client key="turn-clock" module="./ticker.tsx" props={{ elapsedMs: now - turnStartedAt }} />
) : undefined
const lines = ci ? ciLines(els, ci, view, now, textWidth) : sessionLines(els, session, now, turnClock)
// The terminal's bars move when their values change; the desktop's stand still, since a redraw there costs Clawd his frame.
if (isTerminal) {
bars.see(meterList, now)
barsShown = { meters: meterList, boxes: fit.boxes, look: barLook(meterList, fit.boxes, now) }
if (!barTimer && bars.isMoving(meterList, fit.boxes, now)) barTimer = $.clock.every(BAR_MS, () => void barTick($))
}
const paint = isTerminal ? (m: Meter, boxes: number) => bars.paint(m, boxes, now) : undefined
const right = [
<Box key="gauges" flexDirection="row" marginLeft={GAP} flexShrink={0}>
{gaugeColumns(els, meterList, fit, paint)}
</Box>,
fit.gauges ? divider(els) : null,
<Box key="lines" flexDirection="column" marginLeft={1} flexGrow={1} flexShrink={1} minWidth={0}>
{lines}
</Box>,
]
if (e.surface === 'terminal') {
const { Raster } = $.ui.resolve(e as never) as never as { Raster: any }
// A new label over the same act keeps its place in the loop; a new call starts its scene over.
if (!animation || animation.key !== playKey || animation.requestId !== e.requestId) {
stopAnimation()
animation = { key: playKey, act, startedAt: now, requestId: e.requestId, extras, painted: '' }
frameTimer = $.clock.every(FRAME_MS, () => void paintFrame($))
}
animation.extras = work ? { ...extras, lead: animation.startedAt - work.startedAt } : extras
animation.painted = cellsAt(animation, now)
return (
<Box flexDirection="row">
<Raster key={RASTER_KEY} columns={CLAWD_COLS} rows={CLAWD_ROWS} cells={animation.painted} />
{right}
</Box>
)
}
const { Svg } = $.ui.resolve(e as never) as never as { Svg: any }
const drawn = CALL_ACTS.has(act) && work ? JSON.stringify({ ...work, id: undefined, startedAt: undefined }) : `${extras.game ?? ''}`
const svgKey = `${act}:${extras.sweat ? 1 : 0}:${extras.planes ?? 0}:${drawn}`
const svg = svgs.get(svgKey) ?? svgFor(act, extras)
// Most recently used last, so the oldest goes first.
svgs.delete(svgKey)
svgs.set(svgKey, svg)
if (svgs.size > SVG_CACHE) svgs.delete(svgs.keys().next().value!)
if (desktopPlay?.key !== `${svgKey}:${playKey}`) desktopPlay = { key: `${svgKey}:${playKey}`, startedAt: now }
// Start the rebuilt frame where the loop already is, so a redraw doesn't send him back to the start.
const loop = svgLoopMs(act, extras)
const into = isOnce(act) ? Math.min(now - desktopPlay.startedAt, loop) : (now - desktopPlay.startedAt) % loop
const source = svg.replace('<style>', `<style>*{animation-delay:-${into}ms!important}`)
return (
<Box flexDirection="row" alignItems="center">
<Svg source={source} alt={session.label} width={SVG_HEIGHT * SVG_ASPECT} height={SVG_HEIGHT} isInteractive />
{right}
</Box>
)
}hooks/band.tsx lines 248–276 · Band
export function gaugeColumns(els: Els, meters: Meter[], fit: Fit, paint: (m: Meter, boxes: number) => BarPaint = stillBar) {
const { Box, Text } = els
if (!fit.gauges) return []
const paints = meters.map(m => paint(m, fit.boxes))
if (fit.isStacked) {
const column = (key: string, cell: (m: Meter, i: number) => unknown, marginRight = 1) => (
<Box key={key} flexDirection="column" marginRight={marginRight} flexShrink={0}>
{meters.map(cell)}
</Box>
)
return [
column('names', (m, i) => <Text key={i} dimColor>{m.name}</Text>),
fit.boxes > 0 ? column('bars', (_, i) => <Text key={i}>{bar(els, paints[i]!)}</Text>) : null,
column('percents', (m, i) => <Box key={i} justifyContent="flex-end">{percent(els, m, paints[i]!.isFlashing)}</Box>, meters.some(m => m.resetIn) ? 2 : GAP),
meters.some(m => m.resetIn) ? column('resets', (m, i) => <Text key={i} dimColor>{reset(m) || ' '}</Text>, GAP) : null,
]
}
return meters.map((m, i) => (
<Box key={`g${i}`} flexDirection="column" marginRight={GAP} flexShrink={0}>
<Text dimColor>{m.name}</Text>
<Text>
{fit.boxes > 0 ? bar(els, paints[i]!) : ''}
{fit.boxes > 0 ? ' ' : ''}
{percent(els, m, paints[i]!.isFlashing)}
</Text>
<Text dimColor>{reset(m) || ' '}</Text>
</Box>
))
}hooks/band.tsx lines 226–238 · Band
function bar({ Text }: Els, paint: BarPaint) {
const runs: { box: Paint; n: number }[] = []
for (const box of paint.boxes) {
const last = runs.at(-1)
if (last && last.box.color === box.color && last.box.isDim === box.isDim) last.n++
else runs.push({ box, n: 1 })
}
return runs.map(({ box, n }, i) => (
<Text key={i} color={box.color} dimColor={box.isDim}>
{BOX.repeat(n)}
</Text>
))
}hooks/band.tsx lines 240–244 · Band
const percent = ({ Text }: Els, m: Meter, isFlashing = false) => (
<Text bold inverse={isFlashing} color={m.percent >= 80 ? m.color : undefined}>
{m.percent}%
</Text>
)hooks/band.tsx lines 278–282 · Band
export const divider = ({ Text }: Els) => (
<Text key="divider" dimColor>
{'│\n│\n│'}
</Text>
)Licence text (MIT)
MIT License Copyright (c) 2026 KaiC5504 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: Band above the prompt, Deny a tool call
What its code calls
networkruns programswrites filesenv varsdrives Claudetool callsremembers
What its code shows
Read from the source at commit 9ad3958f476f 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.hooks/register.tsx |
| Parses | Every file parses as TypeScript or JavaScript.25 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.hooks/register.tsx:268 fetch(url); hooks/register.tsx:395 fetch(`http://127.0.0.1:${s.port}/health`) |
| Programs | Whether every program it starts is named in the code and is not a shell, an interpreter or a network tool.hooks/register.tsx:150 a program named at run time; hooks/register.tsx:209 a program named at run time; hooks/register.tsx:269 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 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 clawd |
| 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 (clawd, ci), tool.call (Bash, PowerShell, TodoWrite (+2)), classic.UserPromptSubmit, classic.PreToolUse, classic.Stop, classic.SubagentStop (+1) · reads: classic.SessionStart, classic.SessionEnd, classic.PostToolUse, classic.PostToolUseFailure, classic.StopFailure, classic.SubagentStart (+3) · also: session.start, ui.render (AbovePrompt), turn.complete · timers: clock.after, 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: CODEMAGIC_API_TOKEN, USERPROFILE, HOME, OS, APPDATA (+2); files: a path computed at run time |
| 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: a path computed at run time |
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 KaiC5504/clawd-bar/plugin install clawd-bar@clawd-bar/reload-pluginsThis installs the marketplace's latest commit, which may not be the one read here (9ad3958f476f). 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/KaiC5504/clawd-bargit -C clawd-bar checkout 9ad3958f476f0647c25f798e783cb8607591fe1fclaude plugin validate clawd-barclaude --plugin-dir clawd-barThe 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 "kaic5504-clawd-bar" with its code and make me one like itSearch them from Claude: the MCP connector
Similar mods
- token-optimizerAlex Greenshpun★ 2,534
- explain-asSumit Paul★ 20
- uploadsBuild Internet★ 18
- usage-quotaAnant Raghunath★ 18
- desktop-statuslineGeorge Liu★ 15
- ccprogressamigoer★ 14
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/kaic5504-clawd-bar/)