ModsCode / Claude Code Mods / Ranking / room
room
Codex, Cursor and a second Claude inside Claude Code: an agent room (one chat, @mentions, handoffs) plus one-shot reviews and delegation
What it does
- Draws a pane, toasts
- Watches mcp__room__ask_agent, mcp__room__delegate_task calls and can refuse them
- Hooks classic.PostToolUse, classic.Stop, classic.UserPromptSubmit, session.start and 1 more
- Keeps its own state between turns
- Calls the network
Good points
- Written in TypeScript
- Has a desktop-specific branch
- Handles errors
- Writes no files
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 room by Brennen Barney (pane, toast), as ModsCode read it from the mod's code:
// https://modscode.com/claude-mods/mods/bbarney7-room/
// 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: "Second opinion" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Text, Button, Input } = $.ui.resolve(e)
const LABEL = '…'
const modelLabel = '…'
const STATUS_WORD = '…'
const LABEL2 = '…'
const modelLabel2 = '…'
const STATUS_WORD2 = '…'
const LABEL3 = '…'
const modelLabel3 = '…'
const STATUS_WORD3 = '…'
const ACCESS_LABEL = '…'
const map = '…'
const at = '…'
const title = '…'
const status = '…'
const detail = '…'
const who = '…'
const question = '…'
const label = '…'
const who2 = '…'
const who3 = '…'
const duration = '…'
const doingOf = '…'
return (
<Box flexDirection="column" width="100%">
<Box width="100%" justifyContent="space-between" flexWrap="wrap" paddingBottom={1}>
<Box gap={2} flexWrap="wrap">
<Box gap={1}>
<Text>
●
</Text>
<Text>
{LABEL}
</Text>
<Text dimColor>
{modelLabel}
</Text>
<Text dimColor>
{STATUS_WORD}
</Text>
</Box>
<Box gap={1}>
<Text>
●
</Text>
<Text>
{LABEL2}
</Text>
<Text dimColor>
{modelLabel2}
</Text>
<Text dimColor>
{STATUS_WORD2}
</Text>
</Box>
<Box gap={1}>
<Text>
●
</Text>
<Text>
{LABEL3}
</Text>
<Text dimColor>
{modelLabel3}
</Text>
<Text dimColor>
{STATUS_WORD3}
</Text>
</Box>
</Box>
<Text dimColor>
{`${ACCESS_LABEL} · like main`}
</Text>
</Box>
<Box flexDirection="column" flexGrow={1} justifyContent="flex-end">
<Box flexDirection="column" alignItems="center" paddingX={2} marginBottom={1}>
<Text bold>
Agent room
</Text>
<Text dimColor>
Type @ to pick who answers
</Text>
</Box>
<Box flexDirection="column" marginTop={1}>
<Box gap={1}>
<Text bold color="red">
{`● ${LABEL}`}
</Text>
<Text dimColor>
{`→ ${map}`}
</Text>
</Box>
<Box flexDirection="column" paddingLeft={2}>
<Box flexDirection="column">
<Text dimColor>
{`… ${at}`}
</Text>
<Text dimColor>
{`↳ ${title} · ${status}`}
</Text>
<Text dimColor>
{`↳ ${title} · ${status}`}
</Text>
<Text dimColor>
{`↳ ${title} · ${status}`}
</Text>
<Text dimColor>
thinking…
</Text>
</Box>
</Box>
</Box>
<Box flexDirection="column" marginTop={1}>
<Box gap={1}>
<Text bold color="red">
{`● ${LABEL}`}
</Text>
<Text dimColor>
{`→ ${map}`}
</Text>
</Box>
<Box flexDirection="column" paddingLeft={2}>
<Box flexDirection="column">
<Text dimColor>
{`… ${at}`}
</Text>
<Text dimColor>
{`↳ ${title} · ${status}`}
</Text>
<Text dimColor>
{`↳ ${title} · ${status}`}
</Text>
<Text dimColor>
{`↳ ${title} · ${status}`}
</Text>
<Text dimColor>
thinking…
</Text>
</Box>
</Box>
</Box>
<Box flexDirection="column" marginTop={1}>
<Box gap={1}>
<Text bold color="red">
{`● ${LABEL}`}
</Text>
<Text dimColor>
{`→ ${map}`}
</Text>
</Box>
<Box flexDirection="column" paddingLeft={2}>
<Box flexDirection="column">
<Text dimColor>
{`… ${at}`}
</Text>
<Text dimColor>
{`↳ ${title} · ${status}`}
</Text>
<Text dimColor>
{`↳ ${title} · ${status}`}
</Text>
<Text dimColor>
{`↳ ${title} · ${status}`}
</Text>
<Text dimColor>
thinking…
</Text>
</Box>
</Box>
</Box>
<Text color="red">
{detail}
</Text>
<Box flexDirection="column" marginTop={1} borderStyle="round" borderColor="yellow" paddingX={1}>
<Text>
<Text bold>
{who}
</Text>
{` wants to ${question}`}
</Text>
<Box gap={1} flexWrap="wrap">
<Button label={`${label}`} variant="primary" />
<Button label={`${label}`} variant="primary" />
<Button label={`${label}`} variant="primary" />
</Box>
</Box>
<Box flexDirection="column" marginTop={1} borderStyle="round" borderColor="yellow" paddingX={1}>
<Text>
<Text bold>
{who2}
</Text>
{` wants to ${question}`}
</Text>
<Box gap={1} flexWrap="wrap">
<Button label={`${label}`} variant="primary" />
<Button label={`${label}`} variant="primary" />
<Button label={`${label}`} variant="primary" />
</Box>
</Box>
<Box flexDirection="column" marginTop={1} borderStyle="round" borderColor="yellow" paddingX={1}>
<Text>
<Text bold>
{who3}
</Text>
{` wants to ${question}`}
</Text>
<Box gap={1} flexWrap="wrap">
<Button label={`${label}`} variant="primary" />
<Button label={`${label}`} variant="primary" />
<Button label={`${label}`} variant="primary" />
</Box>
</Box>
<Text dimColor>
{`${LABEL} working · ${duration} · ${doingOf}`}
</Text>
<Text dimColor>
{`${LABEL} working · ${duration} · ${doingOf}`}
</Text>
<Text dimColor>
{`${LABEL} working · ${duration} · ${doingOf}`}
</Text>
</Box>
<Box flexDirection="column" width="100%" marginTop={1}>
<Box flexDirection="column" width="100%" borderStyle="round" paddingX={1}>
<Input placeholder={`Message ${LABEL}…`} submitLabel="send" autoFocus />
<Box gap={1}>
<Button label={`${LABEL}`} variant="primary" />
<Button label={`${LABEL}`} variant="primary" />
<Button label={`${LABEL}`} variant="primary" />
</Box>
</Box>
</Box>
<Box width="100%" justifyContent="flex-end" gap={1}>
<Button label="Interrupt" variant="secondary" />
<Button label="Send to main" variant="secondary" dimColor />
<Button label="New chat" variant="secondary" dimColor />
</Box>
</Box>
)
})
on('session.start', async ($, e, next) => {
const LABEL = '…'
const questionText = '…'
await $.ui.toast(`${LABEL} review finished`)
await $.ui.toast(`${LABEL} wants to ${questionText}`)
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.
plugins/room/hooks/register.tsx lines 1350–1350 · Pane
on('ui.render', { component: 'Pane', requestId: 'agent-room' }, ($, e) => renderRoom($, e, e.props.scroll?.bodyRows ?? 0))plugins/room/hooks/register.tsx lines 920–1079 · Pane
async function renderRoom($: EngineInterface, e: Parameters<EngineInterface['ui']['resolve']>[0], bodyRows: number) {
const elements = $.ui.resolve(e)
const { Box, Text, Markdown, Button } = elements
// The desktop draws the room's controls in its own surface modules (controls.tsx, composer.tsx):
// a Button drawn here keeps its handle only until the next redraw, and the room redraws as
// agents stream, so a click there can land on a stale handle and do nothing.
const Client = e.surface === 'desktop' && 'Client' in elements ? elements.Client : undefined
const Input = e.surface !== 'mobile' && 'Input' in elements ? elements.Input : undefined
const state = await read($, room)
const models = state.models ?? {}
const prefs = state.prefs ?? {}
const access = state.access ?? 'ask'
const at = await $.clock.now()
const to = state.defaultAgent
const working = state.messages.filter(m => m.isStreaming && m.from !== 'you' && m.from !== 'main' && m.from !== 'system')
const isBusy = working.length > 0 || AGENTS.some(agent => state.status[agent] === 'busy')
const questions = state.permissions.map(card => ({
id: card.id,
who: LABEL[card.agent],
color: COLOR[card.agent],
question: questionText(card),
choices: permissionChoices(card.options),
}))
// A chat transcript: the person's messages as bubbles on the right, the agents' replies on
// the left under their name, newest at the foot, and the message box beneath.
return (
<Box flexDirection="column" width="100%" minHeight={bodyRows > 0 ? bodyRows : undefined}>
<Box width="100%" justifyContent="space-between" flexWrap="wrap" paddingBottom={1}>
<Box gap={2} flexWrap="wrap">
{AGENTS.map(agent => (
<Box key={`status-${agent}`} gap={1}>
<Text color={STATUS_COLOR[state.status[agent]]}>●</Text>
<Text dimColor={!isLive(state.status[agent])}>{LABEL[agent]}</Text>
{modelLabel(models[agent], prefs[agent]) ? <Text dimColor>{modelLabel(models[agent], prefs[agent])}</Text> : null}
{state.status[agent] === 'starting' || state.status[agent] === 'error' ? <Text dimColor>{STATUS_WORD[state.status[agent]]}</Text> : null}
</Box>
))}
</Box>
<Text dimColor>{`${ACCESS_LABEL[access]}${config.roomEdits === 'inherit' ? ' · like main' : ''}`}</Text>
</Box>
<Box flexDirection="column" flexGrow={1} justifyContent="flex-end">
{state.messages.length === 0 && (
<Box flexDirection="column" alignItems="center" paddingX={2} marginBottom={1}>
<Text bold>Agent room</Text>
<Text dimColor>Type @ to pick who answers</Text>
</Box>
)}
{state.messages.slice(-30).map(m =>
m.from === 'system' ? (
<Box key={m.id} justifyContent="center" marginTop={1}>
<Text dimColor>{m.text}</Text>
</Box>
) : m.from === 'you' ? (
<Box key={m.id} flexDirection="column" alignItems="flex-end" marginTop={1}>
<Box borderStyle="round" borderColor="gray" paddingX={1}>
<Text>{m.text}</Text>
</Box>
</Box>
) : (
<Box key={m.id} flexDirection="column" marginTop={1}>
<Box gap={1}>
<Text bold color={m.isError ? 'red' : COLOR[m.from]}>{`● ${LABEL[m.from]}`}</Text>
<Text dimColor>{m.to?.length ? `→ ${m.to.map(t => `@${t}`).join(' ')}` : ''}</Text>
</Box>
<Box flexDirection="column" paddingLeft={2}>
{m.isStreaming ? (
<Box flexDirection="column">
{(m.notes ?? []).length > 0 ? <Text dimColor>{`… ${clip(m.notes?.at(-1) ?? '', 100)}`}</Text> : null}
{(m.tools ?? []).slice(-2).map(tool => (
<Text key={`${m.id}-${tool.id}`} dimColor>
{`↳ ${clip(tool.title, 80)}${tool.status ? ` · ${tool.status}` : ''}`}
</Text>
))}
{m.text ? <Markdown text={m.text} /> : <Text dimColor>thinking…</Text>}
</Box>
) : (
<Box flexDirection="column">
{m.from === 'main' ? <Text>{m.text}</Text> : <Markdown text={m.text} />}
{m.from !== 'main' && (m.tools?.length || m.notes?.length || m.endedAt) ? (
<Text dimColor>
{[
m.isStopped ? 'stopped' : '',
m.tools?.length ? `${m.tools.length} tool${m.tools.length > 1 ? 's' : ''}` : '',
m.notes?.length ? `${m.notes.length} progress note${m.notes.length > 1 ? 's' : ''} hidden` : '',
m.startedAt && m.endedAt ? duration(m.endedAt - m.startedAt) : '',
]
.filter(Boolean)
.join(' · ')}
</Text>
) : null}
</Box>
)}
</Box>
</Box>
),
)}
{state.detail ? <Text color="red">{state.detail}</Text> : null}
{!Client &&
questions.map(q => (
<Box key={q.id} flexDirection="column" marginTop={1} borderStyle="round" borderColor="yellow" paddingX={1}>
<Text>
<Text bold color={q.color}>{q.who}</Text>
{` wants to ${q.question}`}
</Text>
<Box gap={1} flexWrap="wrap">
{q.choices.map(choice => (
<Button
key={`${q.id}-${choice.id || 'deny'}`}
label={choice.label}
variant={choice.kind === 'allow_once' ? 'primary' : 'secondary'}
onPress={() => answerPermission($, q.id, choice.id || null)}
/>
))}
</Box>
</Box>
))}
{!Client &&
working.map(m => (
<Text key={`working-${m.id}`} dimColor>
{`${LABEL[m.from]} working · ${duration(at - (m.startedAt ?? at))} · ${doingOf(m)}`}
</Text>
))}
</Box>
<Box flexDirection="column" width="100%" marginTop={1}>
{Client ? (
<>
<Client
key="room-controls"
module="./controls.tsx"
width="100%"
props={{
questions,
working: working.map(m => ({
id: m.id,
who: LABEL[m.from],
color: COLOR[m.from],
elapsedMs: at - (m.startedAt ?? at),
doing: doingOf(m),
})),
canInterrupt: isBusy,
canShare: state.messages.length > 0,
canReset: state.messages.length > 0,
}}
/>
<Client
key="room-composer"
module="./composer.tsx"
width="100%"
props={{
placeholder: `Message ${LABEL[to]}…`,
color: COLOR[to],
chips: AGENTS.map(agent => ({ id: agent, label: LABEL[agent], selected: agent === to })),
mentions: [
...AGENTS.map(agent => ({ id: agent, label: LABEL[agent], hint: `${LABEL[agent]} · ${state.status[agent]}`, color: COLOR[agent] })),
{ id: 'main', label: 'Main session', hint: 'your main Claude Code session', color: COLOR.main },
],
model: {
agent: to,Licence text (MIT)
MIT License Copyright (c) 2026 Brennen Barney 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
networkruns programsenv varsdrives Claudetool callsremembers
What its code shows
Read from the source at commit ef0c786ae7e7. 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.plugins/room/hooks/register.tsx |
| Parses | Every file parses as TypeScript or JavaScript.3 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.a Unix socket |
| Programs | Whether every program it starts is named in the code and is not a shell, an interpreter or a network tool.plugins/room/hooks/register.tsx:428 a program named at run time; plugins/room/hooks/register.tsx:488 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, the transcript, settings.json 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.5 commands: text only |
| 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.model.fork (sends its own transcript), model.complete, prompt.submit (as the person), adds command second-opinion, adds command delegate, adds command opinions, adds command ask, adds command room, adds tool ask_agent, adds tool delegate_task |
| 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, classic.UserPromptSubmit, classic.Stop, tool.call (mcp__room__ask_agent, mcp__room__delegate_task) · reads: classic.PostToolUse, ui.message · also: session.start, ui.render (Pane) · timers: clock.every, clock.after |
| 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: ROOM_MOD_IN_ROOM; the transcript; settings.json |
| 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.writes no files, environment variables, settings or conversation rows |
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 bbarney7/claude-code-mods/plugin install room@claude-code-mods/reload-pluginsThis installs the marketplace's latest commit, which may not be the one read here (ef0c786ae7e7). 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/bbarney7/claude-code-modsgit -C claude-code-mods checkout ef0c786ae7e7382d952cd6dad0f01e7470f2259eclaude plugin validate claude-code-mods/plugins/roomclaude --plugin-dir claude-code-mods/plugins/roomThe 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 or ChatGPT about it
With ModsCode added as a connector, Claude or ChatGPT can read this mod's code, what it reaches and how its controls are wired, and build on them. Ask it like this:
Read the ModsCode mod "bbarney7-room" with its code and make me one like itAdd the ModsCode MCP to Claude or ChatGPT
Similar mods
- claudelingoKeisuke Yoda★ 2
- a2a-modAliasgar Khimani★ 1
- file-explorerIT-BAER★ 1
- fishstackPatrick Lai★ 0
- parkedKuang Tar Lim★ 0
- subagents-panelBerk Akkaya★ 0
More from this repository
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/bbarney7-room/)