chatroom
npx machina-cli add skill ctb111/claude-agent-chatroom/chatroom --openclawAgent Chatroom
This skill starts a real-time chatroom for coordination between parallel agents and the user. The chatroom is for quick communication, asking questions, and getting help - not for posting work output or results.
Starting the Chatroom
When this skill is invoked, you MUST:
-
Find the plugin root - look for the agent-chatroom plugin in the enabled plugins list or use this path:
- macOS/Linux:
~/.claude/plugins/*/agent-chatroomor the cloned repo location - The plugin root contains
spawn-terminal.jsandui.js
- macOS/Linux:
-
Start the chatroom server/UI by running:
node <plugin-root>/spawn-terminal.js <plugin-root>/ui.js -
Wait for the server to be ready (check port 3030):
nc -z localhost 3030 && echo "Ready" || echo "Starting..." -
Confirm to the user that the chatroom is open.
Agent Instructions
After starting the chatroom, whenever you spawn agents (using the Task tool):
- ALWAYS use
run_in_background: trueso agents run independently - MUST append the chatroom instructions below to each agent's prompt
## ⛔ CRITICAL: NEVER RETURN TEXT - IT DISCONNECTS YOU ⛔
**THIS IS THE MOST IMPORTANT RULE:**
- You must NEVER return/output a text response directly
- Returning text = completing your task = disconnecting from the team
- If you want to report ANYTHING, use `chatroom_broadcast` tool instead
- Your ONLY allowed outputs are TOOL CALLS
- Every response you give MUST end with a tool call (chatroom_check, chatroom_broadcast, or work tools)
**WHY:** When you return text without a tool call, you EXIT and disconnect. The team loses you.
**CORRECT behavior:**
- Starting work? → `chatroom_status(name: "yourname", status: "busy", task: "Reading auth.ts")`
- Finished work? → `chatroom_status(name: "yourname", status: "idle")`
- Want to report something? → `chatroom_broadcast(message: "Found the bug!", name: "yourname")`
- Nothing to do? → `chatroom_check(name: "yourname")` (and keep checking every 20 seconds)
**WRONG behavior (NEVER DO THIS):**
- Returning "Here's my status report..."
- Returning "I've completed the task..."
- Returning any text without a tool call
## Chatroom Instructions
You have access to a real-time chatroom for **coordination only**.
**At start:**
- Call `chatroom_join` with your agent name
**During work:**
- **Before starting work:** Call `chatroom_status(name: "yourname", status: "busy", task: "what you're doing")`
- **After finishing work:** Call `chatroom_status(name: "yourname", status: "idle")`
- Call `chatroom_broadcast(message: "...", name: "yourname")` for questions and important updates
- Call `chatroom_check(name: "yourname")` every 15-30 seconds to see messages
- Use other tools (Read, Edit, Bash, etc.) for your actual work
- **IMPORTANT:** Always include your `name` parameter on ALL chatroom calls
**Chatroom etiquette:**
- Brief messages only (like Slack)
- No code dumps or verbose logs
- Ask questions, coordinate, report blockers
## Your Work Loop (MANDATORY)
You MUST follow this pattern FOREVER:
INFINITE LOOP:
- chatroom_check(name: "yourname") - look for new messages/instructions
- If you have work to do: a. chatroom_status(name: "yourname", status: "busy", task: "description") b. Do the work (Read, Edit, Bash, etc.) c. chatroom_status(name: "yourname", status: "idle")
- If user says "@yourname stop" or "shutdown":
- chatroom_broadcast(message: "leaving", category: "leaving", name: "yourname")
- chatroom_leave(name: "yourname")
- ONLY THEN you may exit
- If no shutdown command: go back to step 1
- NEVER EXIT THIS LOOP WITHOUT SHUTDOWN COMMAND
## The ONLY Way to Exit
- User explicitly says "@yourname stop", "shutdown", or "all agents stop"
- You see this in chatroom_check results
- Then and ONLY then: broadcast "leaving", call `chatroom_leave(name: "yourname")`, and exit
**If you are unsure whether to exit: DON'T. Keep looping.**
User Interaction
The chatroom UI terminal allows the user to:
- See all agent messages in real-time
- Send messages/instructions to agents
- Close the terminal to shut down the chatroom (agents will detect this and exit)
Example Workflow
User: /chatroom then "spawn backend and frontend agents to build a feature"
You should:
- Start the chatroom (run the spawn-terminal command)
- Spawn agents with chatroom instructions appended to their prompts
- Agents join and work independently, using the chatroom to:
- Ask each other questions ("What endpoint should I call?")
- Request user decisions ("REST or GraphQL?")
- Get help when blocked ("Can't find the auth middleware")
- Post brief status ("Done with API, standing by")
- User can direct agents via the chatroom terminal
- Agents return their actual work output to the orchestrator (not the chatroom)
- When user closes the terminal, agents exit gracefully
Example Chatroom Messages
Good:
- "frontend: Hey backend, what's the response format for /users?"
- "backend: @frontend - JSON with {id, name, email}"
- "backend: User, should I add rate limiting?"
- "frontend: Blocked - need the API key location"
- "backend: Done with auth module, standing by"
Bad (don't do this):
- "Here are my 5 research findings: 1. Dragon fruit exports increased..."
- "Implementing the following code: function handleAuth() { ... }"
- "Full analysis complete: The market trends show..."
Source
git clone https://github.com/ctb111/claude-agent-chatroom/blob/main/skills/chatroom/SKILL.mdView on GitHub Overview
This skill starts a real-time chatroom for coordination between parallel agents and the user. It enables quick questions and help requests without posting work output. Use it when spawning multiple agents that need to communicate or when you want to monitor activity.
How This Skill Works
On invocation, the skill guides you to locate the agent-chatroom plugin root and start the server with node <plugin-root>/spawn-terminal.js <plugin-root>/ui.js. The chatroom supports coordination commands for reporting status, broadcasting questions, and checking for new messages, to keep agents synchronized. Agents must run in the background and have the chatroom instructions appended to their prompts.
When to Use It
- Spawning multiple agents that need to communicate in real time
- Monitoring activity and progress across parallel agents
- Asking quick questions or requesting assistance from teammates or the user
- Coordinating task handoffs between agents to avoid work duplication
- Reporting blockers or critical updates without sending task outputs
Quick Start
- Step 1: Locate the agent-chatroom plugin root in your enabled plugins or repository
- Step 2: Start the chatroom server with: node <plugin-root>/spawn-terminal.js <plugin-root>/ui.js
- Step 3: Check readiness on port 3030 (nc -z localhost 3030) and confirm the chatroom is open
Best Practices
- Keep chatroom messages brief and purpose-driven, like a Slack thread
- Always include the agent name on every chatroom call
- Run agents in the background using run_in_background: true
- Append the chatroom instructions to every agent prompt
- Use chatroom_check regularly (every 15-30 seconds) to stay updated
Example Use Cases
- Launching three agents to fetch and merge data in real time while communicating status in the chatroom
- Coordinating QA checks across parallel agents and flagging blockers via chatroom_broadcast
- Monitoring agent health with chatroom_check and updating task status with chatroom_status
- Users and agents collaborating to resolve a dependency by messaging in the chatroom before proceeding
- A supervisor requests progress updates and agents respond with brief status updates