ModsCode / Claude Code Mods / Ranking / xmuse
xmuse
xmuse 2 sidebar for Claude Code: room members, timeline, approvals and @-wake-up for a local multi-agent room
What it does
- Draws a pane, a band above the prompt, toasts
- Adds /xmuse
- Watches tool calls and can refuse them
- Hooks session.start
- Keeps its own state between turns
Good points
- Starts no processes
- Written in TypeScript
- 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 xmuse by xmuse (pane, band, toast), as ModsCode read it from the mod's code:
// https://modscode.com/claude-mods/mods/iiyazu-cross-muse-xmuse/
// 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, Input } = $.ui.resolve(e)
const name = '…'
const room_id = '…'
const dir = '…'
const name2 = '…'
const room_id2 = '…'
const dir2 = '…'
const name3 = '…'
const room_id3 = '…'
const dir3 = '…'
const newRoom = '…'
const joinCode = '…'
const notice = '…'
return (
<Box flexDirection="column" gap={1}>
<Text bold>
xmuse:这个会话还没有加入房间
</Text>
<Text bold>
本机房间(一键加入,不用邀请码)
</Text>
<Box flexDirection="column" gap={1}>
<Box>
<Text>
{"● "}
{name}
(
{room_id}
{")· "}
{dir}
{" · 主控 "}
?
(当前)
{" "}
</Text>
<Button label="加入" variant="primary" />
</Box>
<Box>
<Text>
{"● "}
{name2}
(
{room_id2}
{")· "}
{dir2}
{" · 主控 "}
?
(当前)
{" "}
</Text>
<Button label="加入" variant="primary" />
</Box>
<Box>
<Text>
{"● "}
{name3}
(
{room_id3}
{")· "}
{dir3}
{" · 主控 "}
?
(当前)
{" "}
</Text>
<Button label="加入" variant="primary" />
</Box>
</Box>
<Button label="刷新房间列表" />
<Text dimColor>
开房间:当前会话成为主控(也是房间里的一个成员)。
</Text>
<Input label="房间名" placeholder="xmuse-dev" value={`${newRoom}`} submitLabel="开房间" />
<Button label="开房间" variant="primary" />
<Text dimColor>
加入:粘贴别处生成的邀请码(10 分钟内有效,只能用一次)。
</Text>
<Input label="邀请码" placeholder="K7Q2-9F" value={`${joinCode}`} submitLabel="加入" />
<Button label="加入" />
<Text color="red">
{notice}
</Text>
</Box>
)
})
// the band above the prompt; what else goes there is drawn under it
on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
const { Box, Text, Button } = $.ui.resolve(e)
const text = '…'
return (
<Box flexDirection="column">
<Box>
<Text dimColor>
{text}
{" "}
</Text>
<Button label="打开" />
</Box>
{await next(e)}
</Box>
)
})
on('session.start', async ($, e, next) => {
const code = '…'
const vendor = '…'
const command = '…'
await $.ui.toast(`邀请码 ${code}(${vendor}):在目标会话里运行 ${command}`)
await $.ui.toast(`邀请码 ${code}(${vendor}):在目标会话里运行 ${command}`)
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.
archive/claude-mod-t0/hooks/register.tsx lines 1480–1482 · Pane
on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
return renderPane($, e)
})archive/claude-mod-t0/hooks/register.tsx lines 998–1157 · Pane
async function renderPane($: any, e: any) {
const { Box, Text, Button, Markdown, Input, Select } = $.ui.resolve(e) as any
const ui = (await read($, uiAtom)) as XmuseUi
const conn = await read($, connAtom)
const view = await read($, viewAtom)
const more = await read($, moreAtom)
const notice = ui.notice ? <Text color="red">{ui.notice}</Text> : null
// --- not in a room: rooms / open / join forms ---
const preRooms = await cachedRooms($)
if (conn.status === 'none') {
return (
<Box flexDirection="column" gap={1}>
<Text bold>xmuse:这个会话还没有加入房间</Text>
<Text bold>本机房间(一键加入,不用邀请码)</Text>
{roomsList($, preRooms, '')}
<Button key="rl-refresh" label="刷新房间列表" onPress={() => cachedRooms($, true).then(() => setNotice($, '房间列表已刷新'))} />
<Text dimColor>开房间:当前会话成为主控(也是房间里的一个成员)。</Text>
<Input
key="new-room"
label="房间名"
placeholder="xmuse-dev"
value={ui.newRoom}
submitLabel="开房间"
onInput={(v: string) => setUi($, { newRoom: v })}
onSubmit={() => newRoomFromPane($)}
/>
<Button key="new-room-go" label="开房间" variant="primary" onPress={() => newRoomFromPane($)} />
<Text dimColor>加入:粘贴别处生成的邀请码(10 分钟内有效,只能用一次)。</Text>
<Input
key="join-code"
label="邀请码"
placeholder="K7Q2-9F"
value={ui.joinCode}
submitLabel="加入"
onInput={(v: string) => setUi($, { joinCode: v })}
onSubmit={() => joinFromPane($)}
/>
<Button key="join-go" label="加入" onPress={() => joinFromPane($)} />
{notice}
</Box>
)
}
const connLine =
conn.status === 'ok'
? null
: (
<Box flexDirection="column">
<Text color="yellow">
{conn.status === 'down' ? 'hub 连接中断,重试中:' : conn.status === 'stale' ? '会话已变:' : conn.status === 'unauth' ? '令牌失效:' : ''}
{clip(conn.error, 200)}
</Text>
{conn.status === 'stale' ? <Button key="rebind" label="接管:把成员绑定到当前会话" variant="primary" onPress={() => rebindFromPane($)} /> : null}
</Box>
)
if (!view) {
return (
<Box flexDirection="column" gap={1}>
<Text bold>xmuse:已绑定为 {conn.memberId || '?'},正在从 hub 取数据…</Text>
{connLine}
<Button key="leave" label="离开房间" onPress={() => leaveFromPane($)} />
{notice}
</Box>
)
}
const meId = view.me.id
const isHost = view.room.host === meId
const nApprovals = view.approvals.length
const nUnread = (view.members.find(m => m.id === meId) || { unread: 0 }).unread
const tabs = (
<Box>
{SECTIONS.map(s => {
const badge = s.id === 'approvals' && nApprovals ? ` ${nApprovals}` : s.id === 'timeline' && nUnread ? ` ${nUnread}` : ''
return (
<Button
key={'sec-' + s.id}
label={(ui.section === s.id ? '● ' : '') + s.label + badge}
variant={ui.section === s.id ? 'primary' : undefined}
onPress={() => setUi($, { section: s.id })}
/>
)
})}
</Box>
)
let body: any = null
if (ui.section === 'timeline') {
const threadOptions = [{ value: 'all', label: '全部(按话题/私聊分组)' }].concat(
view.threads.map(t => ({ value: t.id, label: t.title + (t.unread ? ` (${t.unread})` : '') })),
)
const recips = recipientOptions(view, meId)
const to = recips.some(r => r.value === ui.to) ? ui.to : recips.length ? recips[0].value : ''
body = (
<Box flexDirection="column" gap={1}>
<Select
key="thread"
label="查看"
value={threadOptions.some(o => o.value === ui.thread) ? ui.thread : 'all'}
options={threadOptions}
onSelect={(v: string) => setUi($, { thread: v })}
/>
<Markdown text={renderTimeline(view, more.items, ui.thread)} />
<Box>
{more.hasMore || view.timeline_cursor.has_more ? <Button key="older" label="加载更早的" onPress={() => loadOlder($)} /> : null}
{nUnread ? <Button key="markread" label={`@我的 ${nUnread} 条标为已读`} onPress={() => markRead($)} /> : null}
</Box>
{recips.length ? (
<Box flexDirection="column">
<Select key="to" label="发给" value={to} options={recips} onSelect={(v: string) => setUi($, { to: v })} />
<Input
key="draft"
label="消息"
placeholder="可以用 @成员 点名"
value={ui.draft}
submitLabel="发送"
onInput={(v: string) => setUi($, { draft: v, to })}
onSubmit={() => sendDraft($)}
/>
<Button key="send" label="发送" variant="primary" onPress={() => setUi($, { to }).then(() => sendDraft($))} />
</Box>
) : (
<Text dimColor>房间里还没有其他成员,先到「房间」里邀请。</Text>
)}
</Box>
)
} else if (ui.section === 'members') {
const others = view.members.map(m => ({ value: m.id, label: m.id }))
const target = others.some(o => o.value === ui.target) ? ui.target : others.length ? others[0].value : ''
const privates = view.threads.filter(t => t.private)
const grpPick = privates.some(t => t.id === ui.grpPick) ? ui.grpPick : privates.length ? privates[0].id : ''
body = (
<Box flexDirection="column" gap={1}>
<Markdown text={renderMembers(view, meId)} />
{target ? (
<Box flexDirection="column">
<Select key="target" label="成员菜单" value={target} options={others} onSelect={(v: string) => setUi($, { target: v })} />
<Box>
<Button key="m-pause" label="暂停" onPress={() => setUi($, { target }).then(() => memberAct($, 'pause'))} />
<Button key="m-resume" label="恢复" onPress={() => setUi($, { target }).then(() => memberAct($, 'resume'))} />
<Button key="m-host" label="设为主控" onPress={() => setUi($, { target }).then(() => memberAct($, 'transfer_host'))} />
<Button key="m-remove" label="移出" onPress={() => setUi($, { target }).then(() => memberAct($, 'remove'))} />
<Button key="m-dm" label="私聊" onPress={() => setUi($, { target }).then(() => dmFromPane($))} />
</Box>
<Box>
<Select
key="m-edit-role"
label="改角色"
value={ui.editRole}
options={[{ value: '', label: '不改' }].concat(ROLES)}
onSelect={(v: string) => setUi($, { editRole: v })}
/>
<Input
key="m-edit-desc"
label="改描述"
placeholder="职责描述(空=不改)"archive/claude-mod-t0/hooks/register.tsx lines 977–994 · Pane
function roomsList($: any, rooms: RegistryEntry[], current: string) {
if (!rooms.length) return <Text dimColor>本机没有登记的房间(hub 没启动?登记表目录对吗)</Text>
return (
<Box flexDirection="column" gap={1}>
{rooms.map(r => (
<Box key={'rl-row-' + r.room_id}>
<Text>
{r.room_id === current ? '● ' : ''}{r.name}({r.room_id})· {r.dir} · 主控 {r.host || '?'}
{r.room_id === current ? '(当前)' : ''}{' '}
</Text>
{r.room_id === current ? null : (
<Button key={'rl-go-' + r.room_id} label="加入" variant="primary" onPress={() => joinLocalFromPane($, r.room_id)} />
)}
</Box>
))}
</Box>
)
}archive/claude-mod-t0/hooks/register.tsx lines 1484–1486 · Band
on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
return renderBand($, e, next)
})archive/claude-mod-t0/hooks/register.tsx lines 1386–1409 · Band
async function renderBand($: any, e: any, next: any) {
if (e.props.hasSurvey) return next(e)
const view = await read($, viewAtom)
const conn = await read($, connAtom)
if (conn.status === 'stale') {
const { Box, Text, Button } = $.ui.resolve(e) as any
return (
<Box>
<Text color="yellow">xmuse:绑定的是另一个会话 </Text>
<Button key="open" label="打开" onPress={() => openPane($)} />
</Box>
)
}
if (!view) return next(e)
const text = bannerText(view, view.me.id)
if (!text) return next(e)
const { Box, Text, Button } = $.ui.resolve(e) as any
return (
<Box>
<Text dimColor>{text} </Text>
<Button key="open" label="打开" onPress={() => openPane($)} />
</Box>
)
}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
networkreads 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 read | Every module hooks/hooks.json names was read.archive/claude-mod-t0/hooks/register.tsx |
| Parses | Every file parses as TypeScript or JavaScript.4 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, the same in both |
| 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.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 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.archive/claude-mod-t0/hooks/register.tsx:137 fetch(hub + path) |
| 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).reads files 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.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.prompt.submit (as the person), adds tool say, adds command xmuse |
| 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 (xmuse), tool.call · also: session.start, ui.render (Pane, AbovePrompt) · timers: 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.files: a path computed at run time |
| 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.
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-Musegit -C Cross-Muse checkout 300ce84d87f418c3d652a2021ae435aa86edb425claude plugin validate Cross-Muse/archive/claude-mod-t0claude --plugin-dir Cross-Muse/archive/claude-mod-t0The 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-cross-muse-xmuse" with its code and make me one like itAdd the ModsCode MCP to Claude or ChatGPT
Similar mods
- code-modernizationAnthropic★ 38,060
- ai-maestro-secrets23blocks-OS★ 820
- hopeSaad Shahd★ 37
- agent-discoverkeshrath★ 7
- fanyijax★ 5
- glossary-browserFabrizio Duroni★ 5
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/iiyazu-cross-muse-xmuse/)