Ranking|Claude Code Mods

ModsCode / Claude Code Mods / Ranking / named-subagents-mod

named-subagents-mod

Gives every subagent a themed name in the task tree, and lists the running agents under those names in a side pane: what each is doing, its tokens, its conversation a press away.

Code you can checkTerminal + desktopPaneBandStatus lineToastBoxButtonClientText
writes files, drives Claude, draws

What it does

  • Draws a pane, toasts
  • Adds /names, /roster
  • Watches Agent calls and can refuse them
  • Hooks agent.spawn, session.start, turn.step, ui.close

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)

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

// Drawn like named-subagents-mod by Bobby-cell-commits (pane, band, status, toast), as ModsCode read it from the mod's code:
// https://modscode.com/claude-mods/mods/bobby-cell-commits-named-subagents-mod-named-subagents/
// 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: "Agents" })
  on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
    const { Box, Text, Button } = $.ui.resolve(e)
    const glyph = '…'
    const counts = '…'
    const mark = '…'
    const name = '…'
    const task = '…'
    const countCell = '…'
    const fmtTokens = '…'
    const elapsed = '…'
    const countCell2 = '…'
    const fmtTokens2 = '…'
    const elapsed2 = '…'
    const countCell3 = '…'
    const fmtTokens3 = '…'
    const elapsed3 = '…'
    const loopsLine = '…'
    const axisTitle = '…'
    const fmtDuration = '…'
    const name2 = '…'
    const name3 = '…'
    const text = '…'
    return (
      <Box flexDirection="row">
        <Box flexDirection="column" width={2} flexShrink={0}>
          <Text>
            {" "}
          </Text>
          <Button label={`${glyph}`} plain dimColor />
          <Button label={`${glyph}`} plain dimColor />
          <Button label={`${glyph}`} plain dimColor />
        </Box>
        <Box flexDirection="column">
          <Box flexDirection="column" justifyContent="space-between">
            <Box flexDirection="column" flexShrink={1} overflow="hidden">
              <Box justifyContent="space-between">
                <Text dimColor>
                  {counts}
                </Text>
              </Box>
              <Text dimColor>
                No agents yet. They show here while they run.
              </Text>
              <Box flexDirection="column" marginTop={1}>
                <Box height={1} overflow="hidden">
                  <Text>
                    {`        ${mark} `}
                  </Text>
                  <Button label={`${name}`} plain />
                  <Text>
                    {"        "}
                  </Text>
                  <Button label={`${task}`} plain />
                  <Text>
                    {"        "}
                  </Text>
                  <Text dimColor>
                    {countCell}
                  </Text>
                  <Text dimColor>
                    {fmtTokens}
                  </Text>
                  <Box width={7} flexShrink={0} justifyContent="flex-end">
                    <Text dimColor>
                      {elapsed}
                    </Text>
                  </Box>
                </Box>
                <Box height={1} overflow="hidden">
                  <Text>
                    {`        ${mark} `}
                  </Text>
                  <Button label={`${name}`} plain />
                  <Text>
                    {"        "}
                  </Text>
                  <Button label={`${task}`} plain />
                  <Text>
                    {"        "}
                  </Text>
                  <Text dimColor>
                    {countCell2}
                  </Text>
                  <Text dimColor>
                    {fmtTokens2}
                  </Text>
                  <Box width={7} flexShrink={0} justifyContent="flex-end">
                    <Text dimColor>
                      {elapsed2}
                    </Text>
                  </Box>
                </Box>
                <Box height={1} overflow="hidden">
                  <Text>
                    {`        ${mark} `}
                  </Text>
                  <Button label={`${name}`} plain />
                  <Text>
                    {"        "}
                  </Text>
                  <Button label={`${task}`} plain />
                  <Text>
                    {"        "}
                  </Text>
                  <Text dimColor>
                    {countCell3}
                  </Text>
                  <Text dimColor>
                    {fmtTokens3}
                  </Text>
                  <Box width={7} flexShrink={0} justifyContent="flex-end">
                    <Text dimColor>
                      {elapsed3}
                    </Text>
                  </Box>
                </Box>
              </Box>
              <Box marginTop={1}>
                <Text dimColor wrap="truncate-end">
                  {loopsLine}
                </Text>
              </Box>
            </Box>
            <Box flexDirection="column" flexShrink={0}>
              <Box flexDirection="column" flexShrink={0} marginTop={1}>
                <Text dimColor wrap="truncate-end">
                  {`──${axisTitle}────────`}
                </Text>
                <Text wrap="truncate-end">
                  <Text>
                    {`${mark} `}
                  </Text>
                  <Text>
                    {name}
                  </Text>
                  <Text dimColor>
                    {" ········"}
                  </Text>
                  <Text>
                    ━━━━━━━━
                  </Text>
                  <Text dimColor>
                    {`········${fmtDuration}`}
                  </Text>
                </Text>
                <Text wrap="truncate-end">
                  <Text>
                    {`${mark} `}
                  </Text>
                  <Text>
                    {name2}
                  </Text>
                  <Text dimColor>
                    {" ········"}
                  </Text>
                  <Text>
                    ━━━━━━━━
                  </Text>
                  <Text dimColor>
                    {`········${fmtDuration}`}
                  </Text>
                </Text>
                <Text wrap="truncate-end">
                  <Text>
                    {`${mark} `}
                  </Text>
                  <Text>
                    {name3}
                  </Text>
                  <Text dimColor>
                    {" ········"}
                  </Text>
                  <Text>
                    ━━━━━━━━
                  </Text>
                  <Text dimColor>
                    {`········${fmtDuration}`}
                  </Text>
                </Text>
                <Text wrap="truncate-end">
                  <Text color="error">
                    {"✗ "}
                  </Text>
                  <Text dimColor>
                    {text}
                  </Text>
                </Text>
              </Box>
              <Text dimColor wrap="truncate-end">
                click an agent to open it · click "done" to hide finished ones
              </Text>
            </Box>
          </Box>
        </Box>
      </Box>
    )
  })

  on('session.start', async ($, e, next) => {
    const name = '…'
    const why = '…'
    await $.ui.toast(`Could not stop ${name}: ${why}`)
    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/pane.tsx lines 828–987 · Pane
  on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
    const els = $.ui.resolve(e)
    const { Box, Button, Markdown, Text } = els
    // Live lines run on the surface's own frame clock where it has one (terminal, desktop); elsewhere they are
    // static. Every surface's table names Client, but on the others it draws nothing: ask by surface.
    const Client = (e.surface === 'terminal' || e.surface === 'desktop') && 'Client' in els ? els.Client : null
    lastPlacement = e.props.placement
    lastColumns = e.viewport?.columns ?? lastColumns
    isFullscreen = e.viewport?.isFullscreen ?? isFullscreen
    const inline = e.props.placement === 'inline' // above the prompt: a summary, no handle
    const W = Math.max(22, e.props.bodyColumns - (inline ? 0 : HANDLE_COLS) - RIGHT_MARGIN) // the content, right of the handle
    const viewed = e.props.view?.agentId ?? null // the agent the person has open in the main view
    const rows = Math.max(MIN_ROWS + 6, e.props.scroll.bodyRows)
    const now = await $.clock.now()
    const all = await read($, agents)
    const act = await read($, activity)
    const tok = await read($, tokens)
    const id = await read($, viewing)
    const agent = id ? all.find(a => a.id === id) : undefined
    viewingId = agent ? agent.id : null
    const runningCount = all.filter(a => a.status === 'running').length
    const doneCount = all.length - runningCount
    const hint = (text: string) => <Text dimColor wrap="truncate-end">{text}</Text>
    const alertOf = (a: Agent) => (tok[a.id]?.truncated ? `max_tokens ×${tok[a.id]!.truncated}` : '')
    // A running agent's mark, spinning on the surface's clock where it has one; a still mark elsewhere.
    const markOf = (a: Agent, pad: string) => {
      const l = look(a.status)
      return Client && a.status === 'running' && a.seenRunning && cfg.motion ? (
        <Client key={`mark-${a.id}`} module="./live.tsx" props={{ since: a.firstSeen, now, pad, detail: '', alert: '', motion: true, clockOnly: false, markOnly: true }} />
      ) : (
        <Text color={l.color} dimColor={l.dim}>{`${pad}${l.mark} `}</Text>
      )
    }
    const clock = (a: Agent) =>
      Client && a.status === 'running' && a.seenRunning ? (
        <Client key={`clock-${a.id}`} module="./live.tsx" props={{ since: a.firstSeen, now, pad: '', detail: '', alert: '', motion: false, clockOnly: true }} />
      ) : (
        <Text dimColor>{elapsed(a, now)}</Text>
      )
    // The first row, clear of the engine's close mark at its end.
    const header = (left: RenderChildren, right: RenderChildren, width = W) => (
      <Box width={width - CLOSE_MARK_COLS} justifyContent="space-between">
        {left}
        {typeof right === 'string' ? <Text dimColor>{right}</Text> : right}
      </Box>
    )
    // A handle on the pane's left edge, halfway down: ▸ hides the pane. Above the prompt there is no edge to hold.
    const withHandle = (body: RenderChildren) =>
      inline ? (
        <Box flexDirection="column" width={W}>
          {body}
        </Box>
      ) : (
      <Box flexDirection="row">
        <Box key="handle" flexDirection="column" width={HANDLE_COLS} flexShrink={0}>
          {Array.from({ length: Math.max(0, Math.floor((rows - HANDLE.length) / 2)) }, () => <Text> </Text>)}
          {HANDLE.map((glyph, i) => (
            <Button
              key={glyph.startsWith('▸') ? 'collapse' : `collapse-${i}`}
              label={glyph}
              plain
              dimColor
              hover={{ color: 'claude', bold: true }}
              onPress={() => foldAway($)}
            />
          ))}
        </Box>
        <Box flexDirection="column" width={W} height={rows}>
          {body}
        </Box>
      </Box>
      )

    // One agent's conversation, as Claude Code draws its own: > the brief, ⏺ replies and tool calls, ⎿ results.
    if (agent) {
      const key = `${agent.id}:${await read($, rev)}:${agent.status}`
      if (transcript.key !== key) {
        const msgs = await $.session.messages({ agentId: agent.id })
        transcript = { key, blocks: Array.isArray(msgs) ? transcriptBlocks(msgs, agent.status !== 'running') : [] }
      }
      const blocks = transcript.blocks
      const open = new Set(await read($, expanded))
      const armed = await read($, confirmStop)
      const savedTop = await read($, scrollTop)
      const top = savedTop === null ? null : Math.min(savedTop, Math.max(0, blocks.length - 1))
      const shown = pickBlocks(blocks, top)
      const newer = top === null ? 0 : blocks.length - top - 1 // blocks after the one at the top
      const used = tok[agent.id]
      const l = look(agent.status)
      const given = givenName(agent)
      const leave = async () => {
        await showList($)
        await openPane($, 'list') // back to the usual size
      }
      const toggle = (k: string) => update($, expanded, list => (list.includes(k) ? list.filter(x => x !== k) : [...list, k]))
      const result = (c: Call) =>
        c.state === 'running' ? [<Text color="claude">{'  ⎿  Running…'}</Text>]
        : c.state === 'stopped' ? [<Text dimColor>{'  ⎿  Interrupted'}</Text>]
        : [
            ...(c.result.length ? c.result : ['(No output)']).map((r, i) => (
              <Text color={c.state === 'error' ? 'error' : undefined} dimColor={c.state !== 'error'} wrap="truncate-end">
                {`${i ? '     ' : '  ⎿  '}${r}`}
              </Text>
            )),
            ...(c.more ? [<Text dimColor>{`     … +${c.more} line${c.more === 1 ? '' : 's'}`}</Text>] : []),
          ]
      const call = (c: Call) => (
        <Box flexDirection="column" flexShrink={0}>
          <Text wrap="truncate-end">
            <Text color={STATE_COLOR[c.state]}>⏺ </Text>
            <Text bold>{c.name}</Text>
            <Text>{c.arg ? `(${c.arg})` : ''}</Text>
          </Text>
          {result(c)}
        </Box>
      )
      const block = (b: Block): RenderElement => {
        if (b.kind === 'prompt') {
          const lines = wrap(b.text.slice(0, PROMPT_LINES * W * 2), W - 2)
          return (
            <Box flexDirection="column" flexShrink={0} marginTop={1}>
              {lines.slice(0, PROMPT_LINES).map((line, i) => (
                <Text dimColor wrap="truncate-end">{`${i ? '  ' : '> '}${line}`}</Text>
              ))}
              {lines.length > PROMPT_LINES ? <Text dimColor>{'  …'}</Text> : null}
            </Box>
          )
        }
        if (b.kind === 'reply') {
          const text = b.text.length > MAX_REPLY ? `${b.text.slice(0, MAX_REPLY)}\n\n… (${b.text.length - MAX_REPLY} more characters)` : b.text
          return (
            <Box flexDirection="row" flexShrink={0} marginTop={1}>
              <Text>⏺ </Text>
              <Box flexDirection="column" width={W - 2}>
                <Markdown text={text} />
              </Box>
            </Box>
          )
        }
        if (b.calls.length === 1) return <Box flexShrink={0} marginTop={1}>{call(b.calls[0]!)}</Box>
        const isOpen = open.has(b.key)
        const opened = lastCalls(b.calls)
        const live = b.calls.find(c => c.state === 'running')
        const failed = b.calls.find(c => c.state === 'error')
        return (
          <Box key={`grp-${b.key}`} flexDirection="column" flexShrink={0} marginTop={1}>
            <Box>
              <Text color={STATE_COLOR[groupState(b.calls)]}>⏺ </Text>
              <Button key={`group-${b.key}`} label={groupSummary(b.calls)} plain hover={{ color: 'claude' }} onPress={() => toggle(b.key)} />
              <Text dimColor>{isOpen ? ' (click to collapse)' : ' (click to expand)'}</Text>
            </Box>
            {isOpen ? (
              <Box flexDirection="column" paddingLeft={2}>
                {opened.hidden ? <Text dimColor>{`… +${opened.hidden} earlier call${opened.hidden === 1 ? '' : 's'}`}</Text> : null}
                {opened.shown.map(call)}
              </Box>
            ) : live ? (
              <Text color="claude" wrap="truncate-end">{`  ⎿  ${live.name}${live.arg ? `(${live.arg})` : ''} · Running…`}</Text>
            ) : failed ? (
              <Text color="error" wrap="truncate-end">{`  ⎿  ${failed.name} failed: ${failed.result[0] ?? ''}`}</Text>
Licence text (MIT)
MIT License

Copyright (c) 2026 Bobby-cell-commits

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

writes filesenv varsdrives Claudetool calls

What its code shows

Read from the source at commit 6e08613f01f0. 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/index.ts
ParsesEvery file parses as TypeScript or JavaScript.10 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, with its own branch for the desktop
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 something of yours (files, environment variables, the transcript, settings) and reaches outside (the network, an MCP server, another session, telemetry).reads environment variables, files, the transcript, but reaches nothing outside
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
Settings hooksHooks 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 shipsMCP 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, agentsWhat 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 MCPWhether 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 modelCompletions it runs ($.model.complete, fork, classify), subagents it spawns, prompts it submits as you, and the tools, commands and agents it adds.adds command ?, adds command roster
Events it hooksBy 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 (names, roster), tool.call (Agent) · shapes: turn.step · also: session.start, agent.spawn, ui.close, ui.render (Pane, AbovePrompt) · timers: clock.every
Reads, by nameThe environment variables and files it names, and whether it reads the transcript, settings.json, the prompt box or the mouse selection.env: HOME, USERPROFILE, CLAUDE_CONFIG_DIR; files: a path computed at run time; the transcript
Writes, by nameThe 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: ….bak, 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 Bobby-cell-commits/named-subagents-mod
/plugin install named-subagents-mod@named-subagents-mod
/reload-plugins

This installs the marketplace's latest commit, which may not be the one read here (6e08613f01f0). 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/Bobby-cell-commits/named-subagents-mod
git -C named-subagents-mod checkout 6e08613f01f0f4a382550320092e734eab836d49
claude plugin validate named-subagents-mod
claude --plugin-dir named-subagents-mod

The 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 "bobby-cell-commits-named-subagents-mod-named-subagents" with its code and make me one like it

Search them from Claude: the MCP connector

Similar mods

More from this repository

More by Bobby-cell-commits

Badge for your README

If this is your mod, paste this into your README. It links to this page.

README.md
[![ModsCode](https://modscode.com/badge/bobby-cell-commits-named-subagents-mod-named-subagents.svg)](https://modscode.com/claude-mods/mods/bobby-cell-commits-named-subagents-mod-named-subagents/)