Ranking|Claude Code Mods

ModsCode / Claude Code Mods / Ranking / xmuse

xmuse

xmuse collaboration panel: assistants, threads and messages from the project's hub, in a right-side pane (T8)

Code you can checkTerminal + desktopPaneStatus lineToastBoxButtonClientCodeInputSelectSvgText
network, draws

What it does

  • Draws a pane, toasts
  • Adds /xmuse
  • Watches tool calls and can refuse them
  • Hooks config.set, session.compact, session.measure, session.start and 1 more
  • Keeps its own state between turns

Good points

  • Written in TypeScript
  • Handles errors

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 xmuse by iiyazu (pane, status, toast), as ModsCode read it from the mod's code:
// https://modscode.com/claude-mods/mods/iiyazu-xmuse-2/
// 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: "xmuse" })
  on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
    const { Box, Text, Button, Svg, Client, Select, Input, Code } = $.ui.resolve(e)
    const error = '…'
    const msg = '…'
    const error2 = '…'
    const target = '…'
    const wakePending = '…'
    const name = '…'
    const length = '…'
    const avatarSvg = '…'
    const displayName = '…'
    const id = '…'
    const dot = '…'
    const toolCount = '…'
    const q = '…'
    const shortModel = '…'
    const ctxBarSvg = '…'
    const ctx = '…'
    const current = '…'
    const format = '…'
    const note = '…'
    const error3 = '…'
    const label = '…'
    const unread = '…'
    const label2 = '…'
    const label3 = '…'
    const text = '…'
    const displayName2 = '…'
    const approvalKindLabel = '…'
    const ago = '…'
    const displayName3 = '…'
    const ago2 = '…'
    const displayName4 = '…'
    const ago3 = '…'
    const id2 = '…'
    const lt = '…'
    const id3 = '…'
    const id4 = '…'
    const doneLine = '…'
    const doneLine2 = '…'
    const doneLine3 = '…'
    const replyTo = '…'
    const replySnip = '…'
    const placeholder = '…'
    const description = '…'
    const description2 = '…'
    const description3 = '…'
    const displayName5 = '…'
    const displayName6 = '…'
    const displayName7 = '…'
    return (
      <Box flexDirection="column">
        <Box flexDirection="column" flexShrink={0} marginBottom={1}>
          <Box flexDirection="column" borderStyle="round" borderColor="error" paddingX={1}>
            <Text color="error">
              连不上 hub
            </Text>
            <Text wrap="truncate-end">
              {error}
            </Text>
            <Text dimColor>
              hub 没启动?点"启动 hub",或在别处启动后点重试;也会自动重试。
            </Text>
            <Box flexDirection="row" gap={1}>
              <Button variant="primary">
                重试
              </Button>
              <Button variant="secondary">
                启动 hub
              </Button>
            </Box>
          </Box>
          <Box flexDirection="column" gap={1}>
            <Text>
              这个目录还没有 xmuse 房间
              {`(${error})`}
            </Text>
            <Text color="warning">
              {"… "}
              {msg}
            </Text>
            <Text color="error">
              ⚠ 开房间失败:
              {error2}
            </Text>
            <Box flexDirection="column" gap={1}>
              <Text dimColor>
                {`将在 ${target} 开房间:会在该目录写入 .xmuse.json、AGENTS.md 和技能目录,并在 CLAUDE.md 末尾加一行 @AGENTS.md。`}
              </Text>
              <Button variant="primary">
                确认在此目录开房间
              </Button>
            </Box>
          </Box>
          <Box flexDirection="column" gap={1} borderStyle="round" borderColor="promptBorder" paddingX={1}>
            <Text>
              拉一个助手进来,然后在下面发第一句话
            </Text>
            <Box flexDirection="row" gap={1}>
              <Box flexDirection="row" gap={1}>
                <Button variant="primary">
                  + OpenCode
                </Button>
                <Button variant="primary">
                  + dsh
                </Button>
                <Button variant="primary">
                  + agy
                </Button>
              </Box>
            </Box>
          </Box>
          <Box flexDirection="column">
            <Box flexDirection="row" flexWrap="wrap" alignItems="center" columnGap={3}>
              <Box flexDirection="row" alignItems="center" gap={1} flexShrink={0}>
                <Text color="warning">
                  {`⚠ ${wakePending} 条待处理`}
                </Text>
                <Button variant="primary">
                  处理中…
                </Button>
              </Box>
              <Box flexDirection="row" alignItems="center" gap={1} flexShrink={0}>
                <Text color="warning">
                  无项目简介
                </Text>
                <Button plain>
                  写一份
                </Button>
                <Button plain dimColor>
                  忽略
                </Button>
              </Box>
            </Box>
            <Box flexDirection="row" flexWrap="wrap" alignItems="center" justifyContent="space-between" columnGap={3}>
              <Box flexDirection="row" alignItems="center" gap={1} flexShrink={0}>
                <Text bold>
                  {name}
                </Text>
                <Text dimColor>
                  {`· ${length} 位成员`}
                </Text>
              </Box>
              <Box flexDirection="row" alignItems="center" columnGap={3} flexShrink={0}>
                <Button plain>
                  ✕ 收起
                </Button>
                <Button plain>
                  <Text color="success">
                    自动叫醒 ●
                  </Text>
                </Button>
              </Box>
            </Box>
            <Box flexDirection="row" flexWrap="wrap" alignItems="center" columnGap={3}>
              <Text dimColor>
                添加
              </Text>
              <Box flexDirection="row" columnGap={3}>
                <Button plain>
                  OpenCode
                </Button>
                <Button plain>
                  dsh
                </Button>
                <Button plain>
                  agy
                </Button>
              </Box>
            </Box>
            <Box flexDirection="row" flexWrap="wrap" columnGap={1} marginTop={1}>
              <Box flexDirection="row" alignItems="center" gap={1} flexShrink={0} borderStyle="round" paddingX={1}>
                <Svg source={`${avatarSvg}`} alt={`${displayName}`} width="14" height="14" />
                <Button plain>
                  <Text>
                    ●
                  </Text>
                  <Text>
                    {` ${id}`}
                  </Text>
                  <Text color="warning">
                    ★
                  </Text>
                  <Text color="suggestion">
                    {" ◌"}
                  </Text>
                </Button>
                <Client module="./elapsed.tsx" />
              </Box>
              <Box flexDirection="row" alignItems="center" gap={1} flexShrink={0} borderStyle="round" paddingX={1}>
                <Svg source={`${avatarSvg}`} alt={`${displayName}`} width="14" height="14" />
                <Button plain>
                  <Text>
                    ●
                  </Text>
                  <Text>
                    {` ${id}`}
                  </Text>
                  <Text color="warning">
                    ★
                  </Text>
                  <Text color="suggestion">
                    {" ◌"}
                  </Text>
                </Button>
                <Client module="./elapsed.tsx" />
              </Box>
              <Box flexDirection="row" alignItems="center" gap={1} flexShrink={0} borderStyle="round" paddingX={1}>
                <Svg source={`${avatarSvg}`} alt={`${displayName}`} width="14" height="14" />
                <Button plain>
                  <Text>
                    ●
                  </Text>
                  <Text>
                    {` ${id}`}
                  </Text>
                  <Text color="warning">
                    ★
                  </Text>
                  <Text color="suggestion">
                    {" ◌"}
                  </Text>
                </Button>
                <Client module="./elapsed.tsx" />
              </Box>
            </Box>
            <Box flexDirection="row" gap={1} alignItems="center" borderStyle="round" paddingX={1} minWidth={26}>
              <Svg source={`${avatarSvg}`} alt={`${displayName}`} width="32" height="32" />
              <Box flexDirection="column" flexGrow={1}>
                <Box flexDirection="row" gap={1} alignItems="center">
                  <Text bold>
                    {id}
                  </Text>
                  <Text color="warning">
                    ★ 主控
                  </Text>
                </Box>
                <Box flexDirection="row">
                  <Text>
                    {dot}
                  </Text>
                  <Text dimColor>
                    {" 未知"}
                  </Text>
                  <Client module="./elapsed.tsx" />
                  <Text dimColor>
                    {` · ${toolCount} 个工具`}
                  </Text>
                  <Text color="warning">
                    {` · 排队 ${q}`}
                  </Text>
                </Box>
                <Button plain>
                  {`${shortModel} ▴`}
                </Button>
                <Box flexDirection="row" gap={1} alignItems="center">
                  <Box flexDirection="row" gap={1} alignItems="center">
                    <Svg source={`${ctxBarSvg}`} alt={`上下文 ${ctx}`} width={56} height={6} />
                    <Text color="error">
                      {ctx}
                    </Text>
                  </Box>
                  <Button plain>
                    压缩
                  </Button>
                </Box>
                <Button plain>
                  停止中…
                </Button>
              </Box>
            </Box>
          </Box>
          <Box flexDirection="column" borderStyle="round" paddingX={1} gap={1} marginTop={1}>
            <Box flexDirection="row" gap={1} alignItems="center">
              <Text bold>
                {"更换 "}
              </Text>
              <Text bold>
                {displayName}
              </Text>
              <Text bold>
                的模型
              </Text>
              <Text dimColor>
                · 下一轮起生效
              </Text>
              <Box flexGrow={1} />
              <Button plain dimColor>
                ✕
              </Button>
            </Box>
            <Box flexDirection="column" gap={1}>
              <Select label="选择" value={`${current}`} />
              <Input placeholder={`或输入其他模型(格式 ${format})`} submitLabel="换成这个" />
            </Box>
            <Text color="suggestion">
              正在更换…
            </Text>
            <Text dimColor>
              {note}
            </Text>
            <Text color="error">
              {error3}
            </Text>
          </Box>
          <Box flexDirection="row" flexWrap="wrap" columnGap={3} marginTop={1}>
            <Button plain>
              <Text>
                {"● "}
              </Text>
              <Text bold underline>
                {label}
              </Text>
              <Text color="error">
                {` ${unread}`}
              </Text>
            </Button>
            <Button plain>
              <Text>
                {"● "}
              </Text>
              <Text bold underline>
                {label2}
              </Text>
              <Text color="error">
                {` ${unread}`}
              </Text>
            </Button>
            <Button plain>
              <Text>
                {"● "}
              </Text>
              <Text bold underline>
                {label3}
              </Text>
              <Text color="error">
                {` ${unread}`}
              </Text>
            </Button>
          </Box>
          <Box marginTop={1}>
            <Text color="success" wrap="truncate-end">
              {text}
            </Text>
          </Box>
          <Box flexDirection="column" marginTop={1}>
            <Box flexDirection="column" borderStyle="round" borderColor="warning" paddingX={1}>
              <Box flexDirection="row" gap={1}>
                <Text color="warning">
                  ⚠
                </Text>
                <Text>
                  {displayName2}
                </Text>
                <Text color="warning">
                  {`请求${approvalKindLabel}`}
                </Text>
                <Text color="error">
                  风险:高
                </Text>
                <Text dimColor>
                  {ago}
                </Text>
              </Box>
              <Box paddingX={1}>
                <Code source={`${text}`} language="bash" wrap="wrap" />
              </Box>
              <Box flexDirection="row" gap={1}>
                <Button plain dimColor>
                  收起
                </Button>
                <Button plain dimColor>
                  复制命令
                </Button>
              </Box>
              <Box flexDirection="row" gap={1}>
                <Button variant="primary">
                  批准一次
                </Button>
                <Button variant="secondary">
                  总是批准
                </Button>
                <Button plain dimColor>
                  拒绝
                </Button>
              </Box>
            </Box>
          </Box>
          <Box flexDirection="column" marginTop={1}>
            <Box flexDirection="column" borderStyle="round" borderColor="warning" paddingX={1}>
              <Box flexDirection="row" gap={1}>
                <Text color="warning">
                  ⚠
                </Text>
                <Text>
                  {displayName3}
                </Text>
                <Text color="warning">
                  {`请求${approvalKindLabel}`}
                </Text>
                <Text color="error">
                  风险:高
                </Text>
                <Text dimColor>
                  {ago2}
                </Text>
              </Box>
              <Box paddingX={1}>
                <Code source={`${text}`} language="bash" wrap="wrap" />
              </Box>
              <Box flexDirection="row" gap={1}>
                <Button plain dimColor>
                  收起
                </Button>
                <Button plain dimColor>
                  复制命令
                </Button>
              </Box>
              <Box flexDirection="row" gap={1}>
                <Button variant="primary">
                  批准一次
                </Button>
                <Button variant="secondary">
                  总是批准
                </Button>
                <Button plain dimColor>
                  拒绝
                </Button>
              </Box>
            </Box>
          </Box>
          <Box flexDirection="column" marginTop={1}>
            <Box flexDirection="column" borderStyle="round" borderColor="warning" paddingX={1}>
              <Box flexDirection="row" gap={1}>
                <Text color="warning">
                  ⚠
                </Text>
                <Text>
                  {displayName4}
                </Text>
                <Text color="warning">
                  {`请求${approvalKindLabel}`}
                </Text>
                <Text color="error">
                  风险:高
                </Text>
                <Text dimColor>
                  {ago3}
                </Text>
              </Box>
              <Box paddingX={1}>
                <Code source={`${text}`} language="bash" wrap="wrap" />
              </Box>
              <Box flexDirection="row" gap={1}>
                <Button plain dimColor>
                  收起
                </Button>
                <Button plain dimColor>
                  复制命令
                </Button>
              </Box>
              <Box flexDirection="row" gap={1}>
                <Button variant="primary">
                  批准一次
                </Button>
                <Button variant="secondary">
                  总是批准
                </Button>
                <Button plain dimColor>
                  拒绝
                </Button>
              </Box>
            </Box>
          </Box>
          <Box flexDirection="row" gap={1} alignItems="center" marginTop={1}>
            <Text color="warning">
              {`共 ${length} 条待审批`}
            </Text>
            <Button plain>
              只看第一条
            </Button>
          </Box>
        </Box>
        <Box flexDirection="column" flexShrink={0} marginBottom={1}>
          <Box flexDirection="column">
            <Box flexDirection="row" alignItems="center" gap={1}>
              <Text color="suggestion">
                ●
              </Text>
              <Text>
                {id2}
              </Text>
              <Box flexGrow={1} flexShrink={1}>
                <Text dimColor wrap="truncate-end">
                  {`正在:${lt}`}
                </Text>
              </Box>
              <Client module="./elapsed.tsx" />
              <Button plain>
                停止中…
              </Button>
            </Box>
            <Box flexDirection="row" alignItems="center" gap={1}>
              <Text color="suggestion">
                ●
              </Text>
              <Text>
                {id3}
              </Text>
              <Box flexGrow={1} flexShrink={1}>
                <Text dimColor wrap="truncate-end">
                  {`正在:${lt}`}
                </Text>
              </Box>
              <Client module="./elapsed.tsx" />
              <Button plain>
                停止中…
              </Button>
            </Box>
            <Box flexDirection="row" alignItems="center" gap={1}>
              <Text color="suggestion">
                ●
              </Text>
              <Text>
                {id4}
              </Text>
              <Box flexGrow={1} flexShrink={1}>
                <Text dimColor wrap="truncate-end">
                  {`正在:${lt}`}
                </Text>
              </Box>
              <Client module="./elapsed.tsx" />
              <Button plain>
                停止中…
              </Button>
            </Box>
            <Text dimColor>
              {`另有 ${length} 位在执行`}
            </Text>
          </Box>
          <Text dimColor>
            {doneLine}
          </Text>
          <Text dimColor>
            {doneLine2}
          </Text>
          <Text dimColor>
            {doneLine3}
          </Text>
          <Box flexDirection="column" marginTop={1}>
            <Box flexDirection="row" gap={1} alignItems="center">
              <Text dimColor>
                发给
              </Text>
              <Text bold>
                全员
              </Text>
              <Box flexDirection="row" gap={1} alignItems="center" flexShrink={1}>
                <Text color="permission" wrap="truncate-end">
                  {`↩ #${replyTo} ${replySnip}`}
                </Text>
                <Button plain dimColor>
                  ✕
                </Button>
              </Box>
            </Box>
            <Box flexDirection="row" flexGrow={1}>
              <Input placeholder={`${placeholder}`} submitLabel="发送中…" />
            </Box>
            <Box flexDirection="column" borderStyle="round" paddingX={1}>
              <Box flexDirection="row" gap={1} alignItems="center">
                <Svg source={`${avatarSvg}`} alt={`${displayName}`} width="20" height="20" />
                <Button plain>
                  <Text>
                    {`@${id}`}
                  </Text>
                </Button>
                <Text dimColor wrap="truncate-end">
                  {description}
                </Text>
                <Text dimColor>
                  ↵
                </Text>
              </Box>
              <Box flexDirection="row" gap={1} alignItems="center">
                <Svg source={`${avatarSvg}`} alt={`${displayName}`} width="20" height="20" />
                <Button plain>
                  <Text>
                    {`@${id}`}
                  </Text>
                </Button>
                <Text dimColor wrap="truncate-end">
                  {description2}
                </Text>
                <Text dimColor>
                  ↵
                </Text>
              </Box>
              <Box flexDirection="row" gap={1} alignItems="center">
                <Svg source={`${avatarSvg}`} alt={`${displayName}`} width="20" height="20" />
                <Button plain>
                  <Text>
                    {`@${id}`}
                  </Text>
                </Button>
                <Text dimColor wrap="truncate-end">
                  {description3}
                </Text>
                <Text dimColor>
                  ↵
                </Text>
              </Box>
            </Box>
            <Text dimColor>
              {`Enter 选 @${id} · 继续输入缩小范围`}
            </Text>
          </Box>
        </Box>
        <Box flexDirection="column">
          <Box flexDirection="column" gap={1}>
            <Text dimColor>
              这里还没有消息:发一句话试试,@名字 可以指定对象
            </Text>
            <Box flexDirection="row" gap={1}>
              <Svg source={`${avatarSvg}`} alt={`${displayName}`} width="28" height="28" />
              <Box flexDirection="column" flexGrow={1}>
                <Box flexDirection="row" gap={1} alignItems="center">
                  <Text bold>
                    {displayName5}
                  </Text>
                  <Text color="suggestion">
                    {`正在调用 ${lt}`}
                  </Text>
                  <Client module="./elapsed.tsx" />
                </Box>
                <Box borderStyle="round" paddingX={1}>
                  <Text dimColor>
                    {`${text} ▍`}
                  </Text>
                </Box>
              </Box>
            </Box>
            <Box flexDirection="row" gap={1}>
              <Svg source={`${avatarSvg}`} alt={`${displayName}`} width="28" height="28" />
              <Box flexDirection="column" flexGrow={1}>
                <Box flexDirection="row" gap={1} alignItems="center">
                  <Text bold>
                    {displayName6}
                  </Text>
                  <Text color="suggestion">
                    {`正在调用 ${lt}`}
                  </Text>
                  <Client module="./elapsed.tsx" />
                </Box>
                <Box borderStyle="round" paddingX={1}>
                  <Text dimColor>
                    {`${text} ▍`}
                  </Text>
                </Box>
              </Box>
            </Box>
            <Box flexDirection="row" gap={1}>
              <Svg source={`${avatarSvg}`} alt={`${displayName}`} width="28" height="28" />
              <Box flexDirection="column" flexGrow={1}>
                <Box flexDirection="row" gap={1} alignItems="center">
                  <Text bold>
                    {displayName7}
                  </Text>
                  <Text color="suggestion">
                    {`正在调用 ${lt}`}
                  </Text>
                  <Client module="./elapsed.tsx" />
                </Box>
                <Box borderStyle="round" paddingX={1}>
                  <Text dimColor>
                    {`${text} ▍`}
                  </Text>
                </Box>
              </Box>
            </Box>
            <Box flexDirection="row" justifyContent="center">
              <Button variant="secondary">
                加载中…
              </Button>
            </Box>
          </Box>
        </Box>
      </Box>
    )
  })

  on('session.start', async ($, e, next) => {
    const errText = '…'
    const status = '…'
    const message = '…'
    await $.ui.toast(`发送失败: ${errText}`)
    await $.ui.toast(`发送失败 ${status}: ${message}`)
    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.

integrations/xmuse-panel/hooks/register.tsx lines 2016–2016 · Pane
  on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => drawPanel($, e))
integrations/xmuse-panel/hooks/register.tsx lines 1240–1399 · Pane
async function drawPanel($: any, e: any) {
  const ui = $.ui.resolve(e) as any
  const { Box, Text, Button, Input, Markdown, Code, Select, Client } = ui
  // the pane's width in cells (a code-font advance each, about 7 px; absent before the first layout: then wide)
  const cols = Number(e?.viewport?.columns ?? 0)
  const narrow = cols > 0 && cols < NARROW_COLS
  const view = await read($, viewAtom)
  const conn = await read($, connAtom)
  const tab = await read($, tabAtom)
  const replyTo = await read($, replyAtom)
  const promoted = await read($, promotedAtom)
  const typed = await read($, typedAtom)
  const done = await read($, doneAtom)
  const fold = await read($, foldAtom)
  const light = await read($, themeAtom)
  const pal = palOf(light)
  await read($, avatarVerAtom) // redraw when a custom avatar file has been picked up

  const open = await read($, openAtom)
  const briefMissing = (await read($, briefAtom)) || (await $.store.get(STORE_BRIEF)) === true
  const noRoom = conn.phase === 'noroom'
  const target = noRoom ? await roomTarget($) : ''
  // "no room here yet" with the button, the progress of opening it, or why it failed
  const roomBar = (noRoom || open.busy || open.error) ? (
    <Box flexDirection="column" gap={1}>
      {noRoom ? <Text>这个目录还没有 xmuse 房间{conn.error ? `(${conn.error})` : ''}</Text> : null}
      {open.busy ? <Text color={C_AMBER}>… {open.msg}</Text> : null}
      {open.error ? <Text color={C_RED}>⚠ 开房间失败:{open.error}</Text> : null}
      {noRoom && !open.busy ? (
        <Box flexDirection="column" gap={1}>
          <Text dimColor>{`将在 ${target} 开房间:会在该目录写入 .xmuse.json、AGENTS.md 和技能目录,并在 CLAUDE.md 末尾加一行 @AGENTS.md。`}</Text>
          <Button key="open-room" variant="primary" onPress={() => openRoomLater($)}>确认在此目录开房间</Button>
        </Box>
      ) : null}
    </Box>
  ) : null

  // X1: cannot connect: a red card with the reason and a primary retry
  const errorCard = conn.phase === 'error' ? (
    <Box flexDirection="column" borderStyle="round" borderColor={C_RED} paddingX={1}>
      <Text color={C_RED}>连不上 hub</Text>
      <Text wrap="truncate-end">{conn.error}</Text>
      <Text dimColor>hub 没启动?点"启动 hub",或在别处启动后点重试;也会自动重试。</Text>
      <Box flexDirection="row" gap={1}>
        <Button key="retry" variant="primary" onPress={() => startLoop($)}>重试</Button>
        <Button key="start-hub" variant="secondary" onPress={() => startHubLater($)}>启动 hub</Button>
      </Box>
    </Box>
  ) : null

  if (!view) {
    return (
      <Box flexDirection="column" gap={1}>
        <Text bold>xmuse</Text>
        {noRoom ? roomBar : (
          <Box flexDirection="column" gap={1}>
            {roomBar}
            {errorCard}
            {conn.phase === 'connecting' ? <Text dimColor>正在连接 hub…</Text> : null}
            {conn.phase !== 'error' && conn.phase !== 'connecting' ? (
              <Box flexDirection="row" gap={1} alignItems="center">
                <Text dimColor>未连接</Text>
                <Button key="retry" onPress={() => startLoop($)}>重试</Button>
              </Box>
            ) : null}
          </Box>
        )}
      </Box>
    )
  }

  const rawMembers: any[] = Array.isArray(view.members) ? view.members : []
  const look: Look = { light, pal, vend: {}, badges: {} }
  for (const m of rawMembers) {
    look.vend[m.id] = String(m.vendor ?? '')
    look.badges[m.id] = badgeOf(m.id, m.vendor, rawMembers)
  }
  const nc = (id: string) => memberColor(id, look.vend[id], light)

  const members = membersOf(view)
  const hostId: string = view.room?.host ?? ''
  const meId: string = view.me?.id ?? ''
  const tabs = tabsOf(view)
  const activeTab = tabs.some(t => t.id === tab) ? tab : 'all'
  // the view's recent page plus any older pages loaded with the button at the bottom
  // (the view carries only the latest page, so every message seen is kept: one that slid out of the page stays)
  const older = await read($, olderAtom)
  if (seenRoom !== String(view.room?.id ?? '')) { seenRoom = String(view.room?.id ?? ''); seenMsgs.clear() }
  for (const m of older.items) if (typeof m?.id === 'number' && !seenMsgs.has(m.id)) seenMsgs.set(m.id, m)
  for (const m of (Array.isArray(view.timeline) ? view.timeline : [])) if (typeof m?.id === 'number') seenMsgs.set(m.id, m)
  const histView = { ...view, timeline: [...seenMsgs.values()].sort((a, b) => a.id - b.id) }
  const hasOlder = older.items.length ? older.hasMore : !!view.timeline_cursor?.has_more
  const msgs = messagesFor(histView, activeTab, POOL).reverse() // newest first (see the layout note below)
  const rows = buildRows(msgs)
  const replied = msgs.find(m => m.id === replyTo)
  const replySnip = replied ? `${displayName(replied.from)}:${String(replied.text ?? '').replace(/\s+/g, ' ').slice(0, 40)}` : ''
  const activeLabel = tabs.find(t => t.id === activeTab)?.label ?? activeTab
  const placeholder = narrow ? '说点什么…(@ 指定成员)' : '说点什么…  @ 指定成员 · Enter 发送 · \\n 换行'
  const approvals = approvalsOf(view)
  const working = workingMembers(view)
  const nowMs = await $.clock.now() // the host clock; the per-second times are drawn by the elapsed Client (elapsed.tsx)
  const sendN = await read($, sendNAtom)
  const sending = await read($, sendingAtom)
  const addOpen = await read($, addOpenAtom)
  const expanded = await read($, expandedAtom)
  const busy = await read($, busyAtom)
  const decision = await read($, decisionAtom)
  const mq = await read($, mentionAtom)
  const forced = await read($, forcedAtom)
  const autoWake = (await $.store.get(STORE_AUTO)) === true
  const seenRaw = await $.store.get(STORE_SEEN)
  const wakePending = wakeCandidates(view, typeof seenRaw === 'number' ? seenRaw : maxWakeId(view)).length
  const stale = conn.phase === 'error' // the view is old: no live-looking states
  const cands = mq !== null ? mentionCandidates(view, mq, 6) : []
  const selfCtx = await read($, selfCtxAtom)
  const reveal = await read($, revealAtom)
  const mp = await read($, modelAtom)
  const cpBusy = (id: string) => !!busy[`cp${id}`]

  // one message: optional header, bubble, hover actions. `head` false = continuation inside a group
  const unit = (m: any, head: boolean) => {
    const from = m.from ?? '?'
    const mine = from === 'human'
    if (m.retracted) {
      return (
        <Box key={`m-${m.id}`} flexDirection="row" justifyContent="center">
          <Text dimColor>{`${mine ? '你' : displayName(from)}撤回了一条消息 · ${fmtClock(m.at)}`}</Text>
        </Box>
      )
    }
    const toMe = isToClaude(m, meId)
    const decided = promoted[String(m.id)]
    const full = String(m.text ?? '')
    const expanded = !!fold[`l${m.id}`]
    // just arrived: a grow Client draws its prefix and a caret until the reveal reaches the end, then reports back
    const growing = reveal.run > 0 && reveal.id === m.id && reveal.steps.length > 0
    const folded = expanded || growing ? null : foldLong(full)
    const longOpen = expanded && foldLong(full) !== null
    const blocks = growing ? [] : splitBlocks(folded ? folded.text : full)
    const quote = m.reply_to ? replyLabel(view, m.reply_to) : ''
    const bg = mine ? pal.mine : toMe ? pal.toClaude : pal.bubble
    const bd = mine ? pal.mineBorder : toMe ? C_ORANGE : mixHex(pal.bubbleBorder, nc(from), 0.35)
    const actions = (
      <Box flexDirection="row" gap={1}>
        {head ? null : <Text dimColor>{fmtClock(m.at)}</Text>}
        <Button key={`re-${m.id}`} plain onPress={() => setReply($, m.id)}>回复</Button>
        {decided ? null : <Button key={`pr-${m.id}`} plain onPress={() => promote($, m.id)}>{busy[`pr${m.id}`] ? '处理中…' : '设为决定'}</Button>}
        <Button key={`cp-${m.id}`} plain onPress={(p: any) => copyText($, full, p?.surface)}>复制</Button>
        {mine ? <Button key={`rt-${m.id}`} plain hover={{ color: C_RED }} onPress={() => retractMsg($, m.id, full)}>{busy[`rt${m.id}`] ? '撤回中…' : '撤回'}</Button> : null}
      </Box>
    )
    // actions sit in the flow, never over other text (an absolute overlay covered the header and lost clicks):
    // in the header row of a first message, in a row of their own above a continuation; shown while hovered
    const hoverActs = HOVER_ACTIONS
      ? <Box display="none" hover={{ display: 'flex' }} flexDirection="row">{actions}</Box>
      : actions
    const overlay = head ? null : (
      <Box flexDirection="row" justifyContent={mine ? 'flex-end' : 'flex-start'}>{hoverActs}</Box>
    )
    const bubble = (
integrations/xmuse-panel/hooks/register.tsx lines 1228–1232 · Pane
function avatar(ui: any, id: string, size: number, look: Look) {
  const v = look.vend[id]
  const img = avatarImgs[id] ?? avatarImgs['v:' + vendorKey(id, v)] ?? ''
  return <ui.Svg source={avatarSvg(id, size, v, look.badges[id] ?? '', img)} alt={displayName(id)} width={size} height={size} />
}
Licence text (MIT)
MIT License

Copyright (c) 2026 iiyazu

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 programswrites filesdrives Claudetool callsremembers

What its code shows

Read from the source at commit 300ce84d87f4. 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.integrations/xmuse-panel/hooks/register.tsx
ParsesEvery file parses as TypeScript or JavaScript.6 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.its repository's .claude-plugin/marketplace.json does not list it: no marketplace line to give; the page shows how to try the commit read
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.integrations/xmuse-panel/hooks/register.tsx:128 fetch(`${url}/v1/view?since=0&wait=0`); integrations/xmuse-panel/hooks/register.tsx:149 fetch(`${c.url}/v1/rebind`); integrations/xmuse-panel/hooks/register.tsx:228 fetch(`${url}/v1/rooms`); integrations/xmuse-panel/hooks/register.tsx:319 fetch(`${url}/v1/join`); integrations/xmuse-panel/hooks/register.tsx:357 fetch(conn.url + path)
ProgramsWhether every program it starts is named in the code and is not a shell, an interpreter or a network tool.integrations/xmuse-panel/hooks/register.tsx:202 wsl.exe (a shell or interpreter); integrations/xmuse-panel/hooks/register.tsx:573 a program named at run time
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 files and reaches the 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
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.prompt.submit (as the person), adds tool ?, adds command xmuse
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: tool.call, config.set, command.run (xmuse) · reads: ui.message · also: session.start, session.compact, session.measure, ui.render (Pane) · timers: clock.after
Reads, by nameThe environment variables and files it names, and whether it reads the transcript, settings.json, the prompt box or the mouse selection.files: a path computed at run time, …/hubs.json, …/sidebar.key, …/….png
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: a path computed at run time; the clipboard

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.

Its repository's .claude-plugin/marketplace.json does not list it, so there is no marketplace line to give.

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/iiyazu/Cross-Muse
git -C Cross-Muse checkout 300ce84d87f418c3d652a2021ae435aa86edb425
claude plugin validate Cross-Muse/integrations/xmuse-panel
claude --plugin-dir Cross-Muse/integrations/xmuse-panel

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 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 "iiyazu-xmuse-2" with its code and make me one like it

Add the ModsCode MCP to Claude or ChatGPT

Similar mods

More from this repository

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/iiyazu-xmuse-2.svg)](https://modscode.com/claude-mods/mods/iiyazu-xmuse-2/)