modscode JA

modscode / Gallery / streams

streams

Untangles the interleaved work in a Claude Code session (prompts, mid-turn asides, subagents, loops) into colour-coded streams with a live navigator pane, a status bar of pills and per-stream focus.

Code you can checkTerminal + desktopPaneBandStatus lineToastBoxButtonText

What it does

  • Draws a band above the prompt, a pane, the status line, toasts
  • Adds /streams, /stream
  • Watches tool calls and can refuse them
  • Hooks agent.spawn, classic.UserPromptSubmit, prompt.submit, session.append and 3 more
  • Keeps its own state between turns

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)

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

// Drawn like streams by Macleod Labs (pane, band, status, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/macleodlabs-ai-streams/
// 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, Button, Text } = $.ui.resolve(e)
    const i = '…'
    const label = '…'
    const label2 = '…'
    const label3 = '…'
    return (
      <Box flexDirection="column">
        <Box gap={1}>
          <Button plain label="all" hotkey="0" />
          <Box gap={0}>
            <Button plain label={`${i}`} hotkey={`${i}`} />
            <Text>
              {" "}
              ↻
              {" "}
              {label}
              {" "}
            </Text>
          </Box>
          <Box gap={0}>
            <Button plain label={`${i}`} hotkey={`${i}`} />
            <Text>
              {" "}
              ↻
              {" "}
              {label2}
              {" "}
            </Text>
          </Box>
          <Box gap={0}>
            <Button plain label={`${i}`} hotkey={`${i}`} />
            <Text>
              {" "}
              ↻
              {" "}
              {label3}
              {" "}
            </Text>
          </Box>
          <Button plain label="≡" hotkey="s" />
          <Text dimColor>
            widen the terminal to see streams
          </Text>
        </Box>
        {await next(e)}
      </Box>
    )
  })

  // the pane: open it with $.ui.open({ id: 'my-pane', title: "Streams" })
  on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
    const { Box, Text, Button } = $.ui.resolve(e)
    const label = '…'
    const done = '…'
    const total = '…'
    const length = '…'
    const focus = '…'
    const HEALTH_GLYPH = '…'
    const name = '…'
    const FOLD_LABEL = '…'
    const verdict = '…'
    const loopBadge = '…'
    const rows = '…'
    const agents = '…'
    const ago = '…'
    const summary = '…'
    const STATUS_GLYPH = '…'
    const status = '…'
    const clock = '…'
    const label2 = '…'
    const last = '…'
    const label3 = '…'
    const last2 = '…'
    const label4 = '…'
    const last3 = '…'
    const GLYPH = '…'
    const text = '…'
    const GLYPH2 = '…'
    const text2 = '…'
    const GLYPH3 = '…'
    const text3 = '…'
    const HEALTH_GLYPH2 = '…'
    const verdict2 = '…'
    const loopBadge2 = '…'
    const rows2 = '…'
    const agents2 = '…'
    const ago2 = '…'
    const summary2 = '…'
    const label5 = '…'
    const last4 = '…'
    const label6 = '…'
    const last5 = '…'
    const label7 = '…'
    const last6 = '…'
    const GLYPH4 = '…'
    const text4 = '…'
    const GLYPH5 = '…'
    const text5 = '…'
    const GLYPH6 = '…'
    const text6 = '…'
    const HEALTH_GLYPH3 = '…'
    const verdict3 = '…'
    const loopBadge3 = '…'
    const rows3 = '…'
    const agents3 = '…'
    const ago3 = '…'
    const summary3 = '…'
    const label8 = '…'
    const last7 = '…'
    const label9 = '…'
    const last8 = '…'
    const label10 = '…'
    const last9 = '…'
    const GLYPH7 = '…'
    const text7 = '…'
    const GLYPH8 = '…'
    const text8 = '…'
    const GLYPH9 = '…'
    const text9 = '…'
    const HEALTH_GLYPH4 = '…'
    const verdict4 = '…'
    const loopBadge4 = '…'
    const rows4 = '…'
    const agents4 = '…'
    const ago4 = '…'
    const summary4 = '…'
    const label11 = '…'
    const last10 = '…'
    const label12 = '…'
    const last11 = '…'
    const label13 = '…'
    const last12 = '…'
    const GLYPH10 = '…'
    const text10 = '…'
    const GLYPH11 = '…'
    const text11 = '…'
    const GLYPH12 = '…'
    const text12 = '…'
    const HEALTH_GLYPH5 = '…'
    const verdict5 = '…'
    const loopBadge5 = '…'
    const rows5 = '…'
    const agents5 = '…'
    const ago5 = '…'
    const summary5 = '…'
    const label14 = '…'
    const last13 = '…'
    const label15 = '…'
    const last14 = '…'
    const label16 = '…'
    const last15 = '…'
    const GLYPH13 = '…'
    const text13 = '…'
    const GLYPH14 = '…'
    const text14 = '…'
    const GLYPH15 = '…'
    const text15 = '…'
    const HEALTH_GLYPH6 = '…'
    const verdict6 = '…'
    const loopBadge6 = '…'
    const rows6 = '…'
    const agents6 = '…'
    const ago6 = '…'
    const summary6 = '…'
    const label17 = '…'
    const last16 = '…'
    const label18 = '…'
    const last17 = '…'
    const label19 = '…'
    const last18 = '…'
    const GLYPH16 = '…'
    const text16 = '…'
    const GLYPH17 = '…'
    const text17 = '…'
    const GLYPH18 = '…'
    const text18 = '…'
    return (
      <Box flexDirection="column">
        <Text color="#ffd33d" bold wrap="truncate">
          {"⟳ filing history: "}
          {label}
          {` ${done}/${total}`}
        </Text>
        <Box gap={1}>
          <Text dimColor>
            {length}
            {" streams · "}
            {`focused on ${focus}`}
          </Text>
          <Button plain dimColor label="show all" />
        </Box>
        <Box gap={1}>
          <Button plain dimColor label="collapse all" />
          <Button plain dimColor label="expand all" />
        </Box>
        <Text dimColor>
          Streams appear as you prompt. Tag one by hand with #name.
        </Text>
        <Box flexDirection="column" marginTop={1}>
          <Box gap={1}>
            <Text>
              {" "}
            </Text>
            <Text>
              {HEALTH_GLYPH}
            </Text>
            <Button plain label={`${name} ◉`} />
            <Button plain dimColor label={`${FOLD_LABEL}`} />
            <Button plain dimColor label="restore" />
          </Box>
          <Text wrap="truncate">
            <Text dimColor>
              {verdict}
            </Text>
            {"  "}
            {loopBadge}
            <Text dimColor>
              {" "}
              {"· "}
              {rows}
              {" rows · "}
              {agents}
              {" agents · "}
              {ago}
              {" ago"}
            </Text>
          </Text>
          <Box flexDirection="column">
            <Text dimColor wrap="truncate">
              {summary}
            </Text>
            <Text wrap="truncate">
              {"  "}
              <Text bold>
                {`${STATUS_GLYPH} ${status} ${clock}`}
              </Text>
              <Text>
                {"  "}
                {label2}
              </Text>
            </Text>
            <Text color="#ffd33d" wrap="truncate">
              {"    ↳ "}
              {last}
            </Text>
            <Text wrap="truncate">
              {"  "}
              <Text bold>
                {`${STATUS_GLYPH} ${status} ${clock}`}
              </Text>
              <Text>
                {"  "}
                {label3}
              </Text>
            </Text>
            <Text color="#ffd33d" wrap="truncate">
              {"    ↳ "}
              {last2}
            </Text>
            <Text wrap="truncate">
              {"  "}
              <Text bold>
                {`${STATUS_GLYPH} ${status} ${clock}`}
              </Text>
              <Text>
                {"  "}
                {label4}
              </Text>
            </Text>
            <Text color="#ffd33d" wrap="truncate">
              {"    ↳ "}
              {last3}
            </Text>
            <Text wrap="truncate">
              {"  "}
              {GLYPH}
              {" "}
              {text}
            </Text>
            <Text wrap="truncate">
              {"  "}
              {GLYPH2}
              {" "}
              {text2}
            </Text>
            <Text wrap="truncate">
              {"  "}
              {GLYPH3}
              {" "}
              {text3}
            </Text>
          </Box>
        </Box>
        <Box flexDirection="column" marginTop={1}>
          <Box gap={1}>
            <Text>
              {" "}
            </Text>
            <Text>
              {HEALTH_GLYPH2}
            </Text>
            <Button plain label={`${name} ◉`} />
            <Button plain dimColor label={`${FOLD_LABEL}`} />
            <Button plain dimColor label="restore" />
          </Box>
          <Text wrap="truncate">
            <Text dimColor>
              {verdict2}
            </Text>
            {"  "}
            {loopBadge2}
            <Text dimColor>
              {" "}
              {"· "}
              {rows2}
              {" rows · "}
              {agents2}
              {" agents · "}
              {ago2}
              {" ago"}
            </Text>
          </Text>
          <Box flexDirection="column">
            <Text dimColor wrap="truncate">
              {summary2}
            </Text>
            <Text wrap="truncate">
              {"  "}
              <Text bold>
                {`${STATUS_GLYPH} ${status} ${clock}`}
              </Text>
              <Text>
                {"  "}
                {label5}
              </Text>
            </Text>
            <Text color="#ffd33d" wrap="truncate">
              {"    ↳ "}
              {last4}
            </Text>
            <Text wrap="truncate">
              {"  "}
              <Text bold>
                {`${STATUS_GLYPH} ${status} ${clock}`}
              </Text>
              <Text>
                {"  "}
                {label6}
              </Text>
            </Text>
            <Text color="#ffd33d" wrap="truncate">
              {"    ↳ "}
              {last5}
            </Text>
            <Text wrap="truncate">
              {"  "}
              <Text bold>
                {`${STATUS_GLYPH} ${status} ${clock}`}
              </Text>
              <Text>
                {"  "}
                {label7}
              </Text>
            </Text>
            <Text color="#ffd33d" wrap="truncate">
              {"    ↳ "}
              {last6}
            </Text>
            <Text wrap="truncate">
              {"  "}
              {GLYPH4}
              {" "}
              {text4}
            </Text>
            <Text wrap="truncate">
              {"  "}
              {GLYPH5}
              {" "}
              {text5}
            </Text>
            <Text wrap="truncate">
              {"  "}
              {GLYPH6}
              {" "}
              {text6}
            </Text>
          </Box>
        </Box>
        <Box flexDirection="column" marginTop={1}>
          <Box gap={1}>
            <Text>
              {" "}
            </Text>
            <Text>
              {HEALTH_GLYPH3}
            </Text>
            <Button plain label={`${name} ◉`} />
            <Button plain dimColor label={`${FOLD_LABEL}`} />
            <Button plain dimColor label="restore" />
          </Box>
          <Text wrap="truncate">
            <Text dimColor>
              {verdict3}
            </Text>
            {"  "}
            {loopBadge3}
            <Text dimColor>
              {" "}
              {"· "}
              {rows3}
              {" rows · "}
              {agents3}
              {" agents · "}
              {ago3}
              {" ago"}
            </Text>
          </Text>
          <Box flexDirection="column">
            <Text dimColor wrap="truncate">
              {summary3}
            </Text>
            <Text wrap="truncate">
              {"  "}
              <Text bold>
                {`${STATUS_GLYPH} ${status} ${clock}`}
              </Text>
              <Text>
                {"  "}
                {label8}
              </Text>
            </Text>
            <Text color="#ffd33d" wrap="truncate">
              {"    ↳ "}
              {last7}
            </Text>
            <Text wrap="truncate">
              {"  "}
              <Text bold>
                {`${STATUS_GLYPH} ${status} ${clock}`}
              </Text>
              <Text>
                {"  "}
                {label9}
              </Text>
            </Text>
            <Text color="#ffd33d" wrap="truncate">
              {"    ↳ "}
              {last8}
            </Text>
            <Text wrap="truncate">
              {"  "}
              <Text bold>
                {`${STATUS_GLYPH} ${status} ${clock}`}
              </Text>
              <Text>
                {"  "}
                {label10}
              </Text>
            </Text>
            <Text color="#ffd33d" wrap="truncate">
              {"    ↳ "}
              {last9}
            </Text>
            <Text wrap="truncate">
              {"  "}
              {GLYPH7}
              {" "}
              {text7}
            </Text>
            <Text wrap="truncate">
              {"  "}
              {GLYPH8}
              {" "}
              {text8}
            </Text>
            <Text wrap="truncate">
              {"  "}
              {GLYPH9}
              {" "}
              {text9}
            </Text>
          </Box>
        </Box>
        <Box marginTop={1}>
          <Button plain dimColor label={`▾ archived (${length})`} />
        </Box>
        <Box flexDirection="column" marginTop={1}>
          <Box gap={1}>
            <Text>
              {" "}
            </Text>
            <Text>
              {HEALTH_GLYPH4}
            </Text>
            <Button plain label={`${name} ◉`} />
            <Button plain dimColor label={`${FOLD_LABEL}`} />
            <Button plain dimColor label="restore" />
          </Box>
          <Text wrap="truncate">
            <Text dimColor>
              {verdict4}
            </Text>
            {"  "}
            {loopBadge4}
            <Text dimColor>
              {" "}
              {"· "}
              {rows4}
              {" rows · "}
              {agents4}
              {" agents · "}
              {ago4}
              {" ago"}
            </Text>
          </Text>
          <Box flexDirection="column">
            <Text dimColor wrap="truncate">
              {summary4}
            </Text>
            <Text wrap="truncate">
              {"  "}
              <Text bold>
                {`${STATUS_GLYPH} ${status} ${clock}`}
              </Text>
              <Text>
                {"  "}
                {label11}
              </Text>
            </Text>
            <Text color="#ffd33d" wrap="truncate">
              {"    ↳ "}
              {last10}
            </Text>
            <Text wrap="truncate">
              {"  "}
              <Text bold>
                {`${STATUS_GLYPH} ${status} ${clock}`}
              </Text>
              <Text>
                {"  "}
                {label12}
              </Text>
            </Text>
            <Text color="#ffd33d" wrap="truncate">
              {"    ↳ "}
              {last11}
            </Text>
            <Text wrap="truncate">
              {"  "}
              <Text bold>
                {`${STATUS_GLYPH} ${status} ${clock}`}
              </Text>
              <Text>
                {"  "}
                {label13}
              </Text>
            </Text>
            <Text color="#ffd33d" wrap="truncate">
              {"    ↳ "}
              {last12}
            </Text>
            <Text wrap="truncate">
              {"  "}
              {GLYPH10}
              {" "}
              {text10}
            </Text>
            <Text wrap="truncate">
              {"  "}
              {GLYPH11}
              {" "}
              {text11}
            </Text>
            <Text wrap="truncate">
              {"  "}
              {GLYPH12}
              {" "}
              {text12}
            </Text>
          </Box>
        </Box>
        <Box flexDirection="column" marginTop={1}>
          <Box gap={1}>
            <Text>
              {" "}
            </Text>
            <Text>
              {HEALTH_GLYPH5}
            </Text>
            <Button plain label={`${name} ◉`} />
            <Button plain dimColor label={`${FOLD_LABEL}`} />
            <Button plain dimColor label="restore" />
          </Box>
          <Text wrap="truncate">
            <Text dimColor>
              {verdict5}
            </Text>
            {"  "}
            {loopBadge5}
            <Text dimColor>
              {" "}
              {"· "}
              {rows5}
              {" rows · "}
              {agents5}
              {" agents · "}
              {ago5}
              {" ago"}
            </Text>
          </Text>
          <Box flexDirection="column">
            <Text dimColor wrap="truncate">
              {summary5}
            </Text>
            <Text wrap="truncate">
              {"  "}
              <Text bold>
                {`${STATUS_GLYPH} ${status} ${clock}`}
              </Text>
              <Text>
                {"  "}
                {label14}
              </Text>
            </Text>
            <Text color="#ffd33d" wrap="truncate">
              {"    ↳ "}
              {last13}
            </Text>
            <Text wrap="truncate">
              {"  "}
              <Text bold>
                {`${STATUS_GLYPH} ${status} ${clock}`}
              </Text>
              <Text>
                {"  "}
                {label15}
              </Text>
            </Text>
            <Text color="#ffd33d" wrap="truncate">
              {"    ↳ "}
              {last14}
            </Text>
            <Text wrap="truncate">
              {"  "}
              <Text bold>
                {`${STATUS_GLYPH} ${status} ${clock}`}
              </Text>
              <Text>
                {"  "}
                {label16}
              </Text>
            </Text>
            <Text color="#ffd33d" wrap="truncate">
              {"    ↳ "}
              {last15}
            </Text>
            <Text wrap="truncate">
              {"  "}
              {GLYPH13}
              {" "}
              {text13}
            </Text>
            <Text wrap="truncate">
              {"  "}
              {GLYPH14}
              {" "}
              {text14}
            </Text>
            <Text wrap="truncate">
              {"  "}
              {GLYPH15}
              {" "}
              {text15}
            </Text>
          </Box>
        </Box>
        <Box flexDirection="column" marginTop={1}>
          <Box gap={1}>
            <Text>
              {" "}
            </Text>
            <Text>
              {HEALTH_GLYPH6}
            </Text>
            <Button plain label={`${name} ◉`} />
            <Button plain dimColor label={`${FOLD_LABEL}`} />
            <Button plain dimColor label="restore" />
          </Box>
          <Text wrap="truncate">
            <Text dimColor>
              {verdict6}
            </Text>
            {"  "}
            {loopBadge6}
            <Text dimColor>
              {" "}
              {"· "}
              {rows6}
              {" rows · "}
              {agents6}
              {" agents · "}
              {ago6}
              {" ago"}
            </Text>
          </Text>
          <Box flexDirection="column">
            <Text dimColor wrap="truncate">
              {summary6}
            </Text>
            <Text wrap="truncate">
              {"  "}
              <Text bold>
                {`${STATUS_GLYPH} ${status} ${clock}`}
              </Text>
              <Text>
                {"  "}
                {label17}
              </Text>
            </Text>
            <Text color="#ffd33d" wrap="truncate">
              {"    ↳ "}
              {last16}
            </Text>
            <Text wrap="truncate">
              {"  "}
              <Text bold>
                {`${STATUS_GLYPH} ${status} ${clock}`}
              </Text>
              <Text>
                {"  "}
                {label18}
              </Text>
            </Text>
            <Text color="#ffd33d" wrap="truncate">
              {"    ↳ "}
              {last17}
            </Text>
            <Text wrap="truncate">
              {"  "}
              <Text bold>
                {`${STATUS_GLYPH} ${status} ${clock}`}
              </Text>
              <Text>
                {"  "}
                {label19}
              </Text>
            </Text>
            <Text color="#ffd33d" wrap="truncate">
              {"    ↳ "}
              {last18}
            </Text>
            <Text wrap="truncate">
              {"  "}
              {GLYPH16}
              {" "}
              {text16}
            </Text>
            <Text wrap="truncate">
              {"  "}
              {GLYPH17}
              {" "}
              {text17}
            </Text>
            <Text wrap="truncate">
              {"  "}
              {GLYPH18}
              {" "}
              {text18}
            </Text>
          </Box>
        </Box>
      </Box>
    )
  })

  on('session.start', async ($, e, next) => {
    const focus = '…'
    const id = '…'
    const ago = '…'
    await $.ui.status(`◉ stream ${focus}`)
    await $.ui.toast(`stream ${id} looks stalled: nothing for ${ago}`)
    await $.ui.toast(`stream ${id} finished`)
    return next(e)
  })
}

The mod's own code

Its licence text was not found at the commit read, so only the places in the source are linked.

What its code calls

runs programswrites filesdrives Claudetool callsremembers

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 fe2eb37ffb76 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.plugins/streams/hooks/register.tsx
ParsesEvery file parses as TypeScript or JavaScript.2 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).plugins/streams/hooks/register.tsx:426 cat (not on Windows)
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.cat
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.no licence

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 macleodlabs-ai/claudeflow
/plugin install streams@claudeflow

This installs the marketplace's latest commit, which may not be the one read here (fe2eb37ffb76). 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 "macleodlabs-ai-streams" with its code and make me a pane like it

Search them from Claude: the MCP connector

Similar designs