ModsCode / Claude Code Mods / Ranking / flow-scenes
flow-scenes
Ambient scenes above the prompt that move with your agent's work: a fire, bubbles, surf, ski, rockets, a hot-air balloon and more, by day or night. /flow to control it.
What it does
- Draws a pane, a band above the prompt, toasts
- Watches tool calls and can refuse them
- Hooks classic.PermissionRequest, config.set, prompt.edit, session.compact and 8 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
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 flow-scenes by Rob Macrae (pane, band, toast), as ModsCode read it from the mod's code:
// https://modscode.com/claude-mods/mods/robdmac-flow-scenes/
// 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: "flow" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Text, Button } = $.ui.resolve(e)
const pickLabel = '…'
const blurb = '…'
const blurb2 = '…'
const blurb3 = '…'
return (
<Box flexDirection="column">
<Text dimColor wrap="truncate-end">
arrows or Tab move · Enter or its number picks · Esc closes
</Text>
<Box flexDirection="row" gap={1}>
<Button label={`${pickLabel}`} plain />
<Text dimColor wrap="truncate-end">
{blurb}
</Text>
</Box>
<Box flexDirection="row" gap={1}>
<Button label={`${pickLabel}`} plain />
<Text dimColor wrap="truncate-end">
{blurb2}
</Text>
</Box>
<Box flexDirection="row" gap={1}>
<Button label={`${pickLabel}`} plain />
<Text dimColor wrap="truncate-end">
{blurb3}
</Text>
</Box>
<Button role="dismiss" label="Close" />
</Box>
)
})
// 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 line = '…'
const line2 = '…'
const line3 = '…'
return (
<Box flexDirection="column">
<Box>
<Svg />
<Box position="absolute">
<Box position="absolute" paddingX={1} backgroundColor="#1d2026" display="none">
<Text color="#e8eaee" wrap="wrap">
{line}
</Text>
</Box>
</Box>
<Box position="absolute">
<Box position="absolute" paddingX={1} backgroundColor="#1d2026" display="none">
<Text color="#e8eaee" wrap="wrap">
{line2}
</Text>
</Box>
</Box>
<Box position="absolute">
<Box position="absolute" paddingX={1} backgroundColor="#1d2026" display="none">
<Text color="#e8eaee" wrap="wrap">
{line3}
</Text>
</Box>
</Box>
</Box>
{await next(e)}
</Box>
)
})
on('session.start', async ($, e, next) => {
const reply = '…'
const hidden = '…'
await $.ui.toast(`${reply}${hidden}`)
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 1596–1702 · Pane
on('ui.render', { component: 'Pane', requestId: PICKER }, ($, e) => {
const { Box, Text, Button } = $.ui.resolve(e)
// A redraw asked for as it closed (a pick redraws everything): it's going, so nothing more starts.
if (pick.closed) return <Text dimColor>{SCENES.map(d => d.name).join(' · ')}</Text>
// Drawn: opened by /flow pick, or still up across a reload (a pane outlives one). Its thumbnails run while it's open.
pick.open = true
if (e.surface === 'terminal') pick.docked = e.props.placement === 'dock'
startPicker()
// The scene this session shows: its own over the defaults.
const current = cfg.style
const columns = bodyColumns(e.props.bodyColumns)
const rows = bodyRows(e.props.scroll.bodyRows, 1)
// (Desktop draws a close Button under the grid: a row more.)
const layout = e.surface === 'terminal' || e.surface === 'desktop' ? pickLayout(columns, rows, SCENES.length, undefined, e.surface === 'desktop' ? 1 : 0) : undefined
// Each scene's picture: a Raster in the terminal (blitted by the picker's timer), an Svg on desktop (drawn anew).
let picture: (name: SceneName) => RenderElement | null = () => null
if (layout && e.surface === 'terminal') {
pick.term.night = driver.isNight()
pick.term.ensure(layout.columns, layout.rows)
pick.mounted = true
pick.pausedUntil = 0
const { Raster } = $.ui.resolve(e)
picture = name => <Raster key={thumbKey(name)} columns={layout.columns} rows={layout.rows} cells={pick.term.frame(name)} />
} else if (layout && e.surface === 'desktop') {
pick.desk.night = driver.isNight()
pick.desk.ensure(layout.columns, layout.rows)
pick.deskAt = pick.steps
const { Svg } = $.ui.resolve(e)
// (Each thumbnail drawn and encoded once a step: a render asked for by anything else reuses it.)
const key = `${layout.columns}x${layout.rows}@${pick.deskSteps}:${pick.desk.night}`
picture = name => {
let kept = pick.svgs.get(name)
if (kept?.key !== key) {
const grid = pick.desk.grid(name)
if (!grid) return null
pick.svgs.set(name, (kept = { key, source: frameSvg(grid) }))
}
return <Svg source={kept.source} alt={`flow: ${name}`} width={layout.columns * DESKTOP_CELL_W} height={layout.rows * DESKTOP_CELL_H} />
}
} else if (e.surface === 'terminal') pick.mounted = false
// Each scene's Button: what the focus ring walks, Enter (or a click, or its number) picks. The ring starts on the scene on show.
const button = (name: SceneName, i: number) => {
const hotkey = hotkeyFor(i)
return (
<Button
key={pickKey(name)}
label={pickLabel(name, name === current)}
plain
{...(hotkey ? { hotkey } : {})}
{...(name === current ? { autoFocus: true as const } : {})}
onPress={() => void pickScene($, name, sceneCtx)}
/>
)
}
const hint = <Text dimColor wrap="truncate-end">{pickHint(e.surface === 'terminal')}</Text>
// Esc closes it in the terminal; a desktop draws its own close control for this.
const close = e.surface !== 'terminal' && <Button key="close" role="dismiss" label="Close" onPress={() => void closePickerPane($, sceneCtx)} />
if (!layout) {
// A plain list: too narrow for thumbnails (a spine-width dock), or a surface that draws none.
return (
<Box flexDirection="column">
{hint}
{SCENES.map((d, i) => (
<Box flexDirection="row" gap={1}>
{button(d.name, i)}
<Text dimColor wrap="truncate-end">
{d.blurb}
</Text>
</Box>
))}
{close}
</Box>
)
}
// The grid: rows of tiles, each its thumbnail over its Button, the focused one's frame lit (and any under the pointer).
const tile = (name: SceneName, i: number) => {
const lit = name === pick.selected
const frame = layout.framed
? { borderStyle: lit ? 'bold' : 'round', borderColor: lit ? 'claude' : 'subtle', hover: { borderColor: 'claude' } }
: {}
return (
<Box key={tileKey(name)} flexDirection="column" width={layout.columns + (layout.framed ? 2 : 0)} {...frame}>
{picture(name)}
{button(name, i)}
</Box>
)
}
const grid: RenderElement[] = []
for (let at = 0; at < SCENES.length; at += layout.across) {
grid.push(
<Box flexDirection="row" columnGap={1}>
{SCENES.slice(at, at + layout.across).map((d, k) => tile(d.name, at + k))}
</Box>,
)
}
return (
<Box flexDirection="column">
{layout.lines && hint}
{grid}
{layout.lines && <Text wrap="truncate-end">{pickBlurb(pick.selected, current)}</Text>}
{close}
</Box>
)
})hooks/register.tsx lines 1546–1573 · Band
on('ui.render', { component: 'AbovePrompt' }, ($, e, next) => {
const rows = Math.min(MAX_ROWS, e.props.maxRows - 1)
const hidden = cfg.layout === 'spine' || e.props.hasSurvey || !driver.isShown() || rows < 2
if (e.surface === 'desktop') {
// No Raster here: the frame is one Svg, redrawn by the frame loop.
if (hidden) {
desktopSites.delete(e.requestId)
return next(e)
}
return desktopView($.ui.resolve(e), e.requestId, bodyColumns(e.props.bodyColumns), rows)
}
// Raster is terminal-only; any other surface's band never touches ours.
if (e.surface !== 'terminal') return next(e)
if (hidden) {
if (mounted?.requestId === e.requestId) mounted = null
return next(e)
}
const columns = bodyColumns(e.props.bodyColumns)
mounted = { requestId: e.requestId, columns, rows }
const scene = driver.dial()
scene.ensure(columns, rows)
lastCells = scene.frame()
// The engine keeps one blank spacer row between the band and the prompt;
// it is outside the band, so the scene's base sits one row above the input.
const { Raster } = $.ui.resolve(e)
return <Raster key={KEY} columns={columns} rows={rows} cells={lastCells} />
})hooks/register.tsx lines 840–850 · Band
const desktopView = (els: Pick<Elements['desktop'], 'Box' | 'Svg' | 'Text'>, requestId: string, columns: number, rows: number) => {
const { Box, Svg } = els
const { svg, marks, dials } = desktopSvg(requestId, columns, rows)
if (!marks) return <Svg {...svg} />
return (
<Box>
<Svg {...svg} />
{agentCards(els, marks, dials, columns, rows)}
</Box>
)
}hooks/register.tsx lines 373–411 · Band
function agentCards(
els: { Box: ElementConstructor<BoxProps>; Text: ElementConstructor<TextProps> },
marks: readonly AgentMark[],
dials: readonly AgentDial[],
columns: number,
rows: number,
) {
const { Box, Text } = els
const tall = rows > 8
return marks.flatMap(m => {
const d = dials.find(a => a.id === m.id)
if (!d) return []
const line = agentLine(d)
const width = Math.max(1, Math.min(columns, line.length + 2))
const lines = tall ? Math.min(4, Math.ceil(line.length / Math.max(1, width - 2))) : 1
const left = Math.max(0, Math.min(columns - width, m.col - 1))
const top = tall
? m.row >= lines + 1 ? m.row - lines - 1 : Math.min(rows - lines, m.row + m.h)
: m.row >= 2 ? 0 : rows - 1
return [
<Box key={`agent:${m.id}`} position="absolute" top={m.row} left={m.col} width={m.w} height={m.h}>
<Box
position="absolute"
top={top - m.row}
left={left - m.col}
width={width}
paddingX={1}
backgroundColor={CARD_BG}
display="none"
hover={{ display: 'flex' }}
>
<Text color={CARD_FG} wrap={tall ? 'wrap' : 'truncate'}>
{line}
</Text>
</Box>
</Box>,
]
})
}Licence text (MIT)
MIT License Copyright (c) 2026 Rob Macrae 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
drives Claudetool callsremembers
What its code shows
Read from the source at commit 9e1dc0fdb0e5 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.33 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, with its own branch for the desktop |
| 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.starts no programs |
| 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).reaches nothing outside |
| 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.adds command ? |
| 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: tool.call, classic.PermissionRequest, command.run, config.set · shapes: turn.step · reads: prompt.edit · also: session.start, turn.start, turn.complete, ui.render (ToolProgress, Pane, AbovePrompt) (+5) · 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.reads no files, environment variables, settings or transcript |
| 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.settings (config.set) |
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 robdmac/flow/plugin install flow-scenes@robdmac/reload-pluginsThis installs the marketplace's latest commit, which may not be the one read here (9e1dc0fdb0e5). 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/robdmac/flowgit -C flow checkout 9e1dc0fdb0e5d7f2a32b44efe4cd6336f378ff66claude plugin validate flowclaude --plugin-dir flowThe 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 "robdmac-flow-scenes" with its code and make me one like itSearch them from Claude: the MCP connector
Similar mods
- explain-asSumit Paul★ 20
- uploadsBuild Internet★ 18
- ccprogressamigoer★ 14
- laurelsKOZMOS★ 9
- spending-effort-with-jevYaxin Luo★ 6
- usage-hudlucassimzq★ 5
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/robdmac-flow-scenes/)