modscode JA

modscode / Gallery / progress-band

progress-band

Band above the Claude Code prompt: context, 5-hour and weekly usage with the week's tokens, plus live aurora progress bars for Claude's tasks and their subagents

Code you can checkTerminal + desktopBandBox

What it does

  • Draws a band above the prompt
  • Watches AskUserQuestion calls and can refuse them
  • Hooks agent.spawn, classic.SessionStart, classic.Stop, prompt.compose and 6 more
  • Keeps its own state between turns

Good points

  • No network calls
  • Starts no processes
  • Written in TypeScript
  • Has a desktop-specific branch

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)

register.tsx
import type { Register } from 'claude-code'

// Drawn like progress-band by Chrisutina (band), as modscode read it from the mod's code:
// https://modscode.com/gallery/chrisutina-progress-band/
// 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 } = $.ui.resolve(e)
    return (
      <Box flexDirection="column">
        <Box flexDirection="column" gap={1}>
          <Box flexDirection="column" />
        </Box>
        {await next(e)}
      </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 1496–1655 · Band
  on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
    if (e.props.hasSurvey) return next(e)
    const t = $.ui.resolve(e)
    const { Box, Button, Text } = t
    // the terminal's table has an Svg too, drawn as nothing there
    const Svg = e.surface !== 'terminal' && 'Svg' in t ? t.Svg : null
    const u = await read($, usage)
    const all = await read($, plans)
    const now = await $.clock.now()
    const cols = Math.max(30, e.props.bodyColumns || 100)
    const meters = metersOf(u, now)
    // a window that has reset reads 0 here; while the quota glitches the terminal steps its words by redrawing each second
    const isGlitch = quotaGlitch($, meters.find(m => m.key === 'five_hour')?.used ?? 0, now)
    band = { surface: e.surface, isWorking: e.props.isWorking, isGlitch }
    const tokens = u.tokens && tokenSum(u.tokens) > 0 ? u.tokens : null
    const budget = childBudget(all.length)
    // drawing memory of bars no longer listed (closed, or pushed out past MAX_BARS) goes
    for (const id of lastHead.keys()) if (!all.some(p => p.id === id)) lastHead.delete(id)
    for (const key of lastSource.keys()) if (!all.some(p => key.startsWith(`${p.id}/`))) lastSource.delete(key)

    // what the main conversation does now, leading the meters' row
    const act = await read($, activity)
    const ses = await read($, session)
    const isBusy = e.props.isWorking || act.state !== 'idle'
    const doing = act.state === 'tool' ? (act.tool ?? say.tool) : isBusy ? say.thinking : say.idle

    // this session's tokens and the week's in one item after the weekly meter; on the desktop a small Sankey
    // leads it and hovering opens the full one. The app draws that card in its own theme, so the card forces
    // no colour: forced light text was unreadable on its light card
    const tokenWords = tokens ? `${compact(Math.min(ses.tokens, tokenSum(tokens)))} / ${compact(tokenSum(tokens))} tokens` : ''
    const tokenNode = (hasWords = true) =>
      tokens ? (
        <Box key="tokens" flexDirection="row" columnGap={1} alignItems="center">
          {Svg ? <Svg source={sankeySvg(tokens, ses.tokens, isBusy, false)} alt={sankeyAlt(tokens, ses.tokens)} width={SANKEY_ICON_W} height={SANKEY_ICON_H} /> : null}
          {hasWords ? <Text dimColor>{`${Svg ? '' : '· '}${tokenWords}`}</Text> : null}
          {Svg ? (
            <Box position="absolute" top={1} right={0} display="none" hover={{ display: 'flex' }} flexDirection="column" paddingX={1}>
              <Text bold>{say.tokensCard}</Text>
              <Svg source={sankeySvg(tokens, ses.tokens, isBusy, true)} alt={sankeyAlt(tokens, ses.tokens)} width={say.sankeyW} height={SANKEY_H} />
            </Box>
          ) : null}
        </Box>
      ) : null

    // the tree glyph before each row that hangs from a task
    const branch = (isLast: boolean) => <Text dimColor>{isLast ? '└' : '├'}</Text>

    let meterRow: RenderChildren = null
    let bars: RenderChildren[] = []

    if (Svg) {
      // every track has the same width and is pinned to the right edge (fixed-width percent, close button),
      // so rows line up whatever their titles; the desktop reports ~8 CSS px per column, draws text at ~14 px,
      // and pads the band, so the room left for the icon, percent, close button and gaps includes that padding
      const total = Math.max(320, cols * 8)
      const titlePx = Math.min(Math.round(total * 0.3), Math.max(48, ...all.map(p => Math.round(textWidth(p.title, 14)))))
      const trackW = Math.max(120, Math.min(1400, total - titlePx - 144))
      // one line whatever runs: see meterDrop
      const drop = meterDrop(meters, tokenWords, cols)
      meterRow = (
        <Box key="meters" flexDirection="row" columnGap={3} alignItems="center" flexWrap="nowrap">
          <Box key="doing" flexDirection="row" columnGap={1} alignItems="center">
            <Svg source={isBusy ? stateIcon('running', true) : IDLE_ICON} alt={doing} width={ICON} height={ICON} />
            <Text color={isBusy ? STATE_COLOR.running : undefined} dimColor={!isBusy}>
              {cut(doing, DOING_PX, s => textWidth(s, 14))}
            </Text>
          </Box>
          {meters.map(m => {
            const color = m.used === null ? undefined : STATE_COLOR[levelOf(m.used)]
            const reset = resetWords(m, drop)
            return (
              <Box key={`meter-${m.key}`} flexDirection="row" columnGap={1} alignItems="center">
                <Text dimColor>{m.label}</Text>
                <Svg source={meterSvg(m)} alt={`${m.label} ${meterValue(m)}`} width={METER_W} height={METER_SVG_H} />
                <Text color={color} dimColor={color === undefined} bold>
                  {meterValue(m)}
                </Text>
                {reset ? <Text dimColor>{reset}</Text> : null}
                {m.key === 'seven_day' ? tokenNode(drop < 4) : null}
              </Box>
            )
          })}
        </Box>
      )
      // live traffic per bar: the main turn works on the running bar the model moved last, each running agent on its own bar
      const focus = focusOf(all)?.id
      bars = all.map(p => {
        const traffic = (e.props.isWorking && p.id === focus ? 1 : 0) + (p.agents ?? []).filter(isLive).length
        const track = trackSvg(p, trackW, traffic, isGlitch)
        const v = visibleAgents(p, Math.max(1, budget - (p.note && p.state !== 'running' ? 1 : 0)))
        const rows: RenderChildren[] = []
        const hidden = v?.hidden ?? []
        const shown = v?.shown ?? []
        const hasNote = Boolean(p.note) && p.state !== 'running'
        const total = (hasNote ? 1 : 0) + shown.length + (hidden.length > 0 ? 1 : 0)
        let n = 0
        if (hasNote) {
          n += 1
          rows.push(
            <Box key={`note-${p.id}`} flexDirection="row" gap={1} marginLeft={1}>
              {branch(n === total)}
              <Text color={STATE_COLOR[p.state]} wrap="truncate">
                {p.note}
              </Text>
            </Box>,
          )
        }
        for (const a of shown) {
          n += 1
          const state = AGENT_STATE[a.state]
          const spec = agentSpec(a)
          rows.push(
            <Box key={`agent-${a.id}`} flexDirection="row" alignItems="center" gap={1} marginLeft={1}>
              {branch(n === total)}
              <Svg source={stateIcon(state)} alt={say.state[state]} width={ICON} height={ICON} />
              <Text wrap="truncate" dimColor={a.state === 'done'}>
                {a.title}
              </Text>
              {spec ? <Text dimColor>{spec}</Text> : null}
              <Box flexGrow={1} />
              {isLive(a) ? <Text color={STATE_COLOR[state]}>{a.tool}</Text> : null}
              {a.endedAt === null ? (
                <Svg source={liveSource(`${p.id}/${a.id}`, agentClock(a.startedAt), now)} alt={say.ran(elapsed(now - a.startedAt))} width={CLOCK_W} height={REEL} />
              ) : (
                <Text dimColor>{elapsed(a.endedAt - a.startedAt)}</Text>
              )}
            </Box>,
          )
        }
        if (hidden.length > 0) {
          rows.push(
            <Box key={`more-${p.id}`} flexDirection="row" gap={1} marginLeft={1}>
              {branch(true)}
              <Text dimColor>{say.more(hidden.length, hidden.filter(a => a.state === 'done').length)}</Text>
            </Box>,
          )
        }

        return (
          <Box key={`bar-${p.id}`} flexDirection="column">
            <Box flexDirection="row" alignItems="center" gap={1}>
              <Svg source={stateIcon(p.state, traffic > 0)} alt={say.state[p.state]} width={ICON} height={ICON} />
              <Text wrap="truncate" dimColor={p.state === 'done'}>
                {p.title}
              </Text>
              <Box flexGrow={1} />
              <Box key={`track-${p.id}`} flexShrink={0}>
                <Svg source={track.base} alt={rowAlt(p)} width={trackW} height={ROW_H} />
                <Box position="absolute" top={0} left={0}>
                  {/* the hover layer is rebuilt on every redraw anyway, so its clock is set from now each time */}
                  <Svg source={withTime(track.overlay, now)} alt={say.hover(p.title)} width={trackW} height={ROW_H} isInteractive />
                </Box>
              </Box>
              <Text color={p.state === 'done' ? STATE_COLOR.done : undefined} dimColor={p.state !== 'done'}>
                {`${String(percentOf(p)).padStart(3, FIGURE_SPACE)}%`}
              </Text>
              <Button key={`close-${p.id}`} plain dimColor label="✕" onPress={() => dropPlan($, p.id)} />
            </Box>
            {rows}
          </Box>
Licence text (MIT)
MIT License

Copyright (c) 2026 Aegis
Copyright (c) 2026 Chrisutina
Copyright (c) 2026 Kirill Serditov (plan-progress, https://github.com/zycck/claude-mods)

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

tool callsremembers

What its code shows

Read from the source at commit d21a457fa1dd 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 readEvery module hooks/hooks.json names was read.hooks/register.tsx
ParsesEvery file parses as TypeScript or JavaScript.1 files parsed
All its code is in the modEvery import is a file of the mod or the engine's own module; no packages, no require.all its code is in the mod
ReadableNo 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 openNetwork 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 drawsThe 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 lineWhether 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 WindowsWhether every program it starts through $.process exists on Windows (tail, date, open, osascript, /usr/… do not).runs no program a Windows PC lacks
NetworkWhether every fetch names its https host in the code.no network
ProgramsWhether every program it starts is named in the code and is not a shell, an interpreter or a network tool.starts no programs
Reads and sendsWhether it both reads files or environment variables and reaches the network.reaches no network
Keys in the sourceWhether the source holds what looks like an API key or a private key.no keys in the source
LicenceAn 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 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 Chrisutina/claude-progress-band
/plugin install progress-band@progress-band

This installs the marketplace's latest commit, which may not be the one read here (d21a457fa1dd). Compare them before you install.

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 "chrisutina-progress-band" with its code and make me a pane like it

Search them from Claude: the MCP connector

Similar designs