| name | cc-connect-chat |
| description | How to participate in a cc-connect Room. Use whenever the user asks you to "tell the room", "send to chat", "ping <person>", "share <file> with the room", "summarise the chat", or anything else that involves the cc-connect chat substrate. Always call MCP tools — never paste raw text into the answer hoping the user will copy it. For creating / joining / leaving Rooms, see the `cc-connect-room` skill instead. |
cc-connect chat
How you know you're in a Room
If your hook output starts with [cc-connect] active room context, this Claude has been bound (via the Claude PID Binding, ADR-0006) to one or more cc-connect Rooms. The header tells you:
topics: the topic ids of the rooms you're in (12-char prefixes)
you (this Claude) = <nick>-cc — the display name peers see for your messages
- the MCP tools you can call
Below the header, every line tagged [chatroom @<peer> HH:MMZ] <body> is an unread chat message from a peer. Lines tagged [chatroom for-you @<peer> …] are addressed to you (@<your_nick>-cc / @cc / @claude / @all / @here) — read them first, they're the most likely to need a reply.
In multi-Room sessions, lines may also carry a [chatroom <room-tag> …] 6-char topic prefix so you can tell rooms apart. Use that prefix to disambiguate when calling tools (see "Multi-Room hygiene" below).
When to call which tool
| Tool | Use when |
|---|
cc_send(body, topic?) | Volunteer information ("CI just went green"), ask the room a question, broadcast status. |
cc_at(nick, body, topic?) | Address a specific peer. Use the nickname you saw in [chatroom @nick …] lines. nick="cc" addresses every Claude in the room; nick="all"/"here" addresses everyone. |
cc_drop(path, topic?) | Share a file with the room. Use absolute paths or paths relative to your working directory. Bytes flow over iroh-blobs; peers see it as @file:<local_path> on their next prompt. |
cc_recent(limit, topic?) | Pull the last N chat lines. Useful when the user asks "what did we discuss earlier?" and the hook only injected a tail. Default 20, max 200. |
cc_list_files(limit, topic?) | List files dropped into the room with their on-disk paths. Combine with Read to see the contents. |
cc_save_summary(text, topic?) | Overwrite ~/.cc-connect/rooms/<topic>/summary.md. The hook injects this on every prompt, so future Claude instances (you on the next turn, your peers' Claudes) pick up your distilled context for free. |
The topic? argument is optional. If this Claude is bound to exactly one Room, omit it. If you're in multiple Rooms, you must pass topic (the full 64-char hex from cc_list_rooms) — the MCP server will refuse otherwise rather than guess.
Patterns to follow
Reply to a mention:
- A line tagged
[chatroom for-you @alice 12:01Z] @dave which DB? means alice asked you (you are dave). After thinking, call cc_at("alice", "going with postgres — already have the migration drafted").
Ack a question to the whole room:
- "@cc what's your plan for caching?" — call
cc_send("Looking at it now, will report back in 5.") so all peers see your acknowledgement.
Summarise on demand:
- User says "summarise this room and save it." Call
cc_recent(200) to get raw history → think → call cc_save_summary("…"). Keep the summary terse (≤ 1 KiB). Re-running overwrites.
Share a file:
- User says "send the design doc." If you know the path:
cc_drop("/abs/path/design.md"). If you don't: ask once, then call cc_drop.
Multi-Room hygiene
When the orientation header lists more than one topic:
- Look at the
<room-tag> prefix on each chat line to know which Room it came from.
- When the user says something like "tell the team-A room about X", call
cc_list_rooms() first to see the full topic hex for each tag, then pass topic=<full hex> to cc_send / cc_at.
- Don't cross-post the same body into multiple Rooms unless the user asks. Each Room is its own audience.
Things you should NOT do
- Don't paste raw text in your reply when the user asks you to "send to the chat." That delivers nothing — chat goes through the cc-connect substrate, not your output. Always use
cc_send / cc_at / cc_drop.
- Don't @-mention names you haven't seen in the chat lines. If the user says "tell @bob", check the recent
[chatroom @… ] lines for who's actually present. If "bob" isn't there, use cc_send (a plain broadcast); bob's hook will tag it as for-you if their nick matches.
- Don't summarise unprompted on every turn.
cc_save_summary is a write; calling it constantly thrashes the file and wastes tokens. Save when the user asks, when the conversation has clearly moved on from the previous summary, or when you've digested ≥ 50 lines of chat the user hasn't seen yet.
- Don't leak ticket strings into chat. A peer sharing a ticket via
cc_send is fine; you re-broadcasting the user's own ticket without being asked is not.
- Don't accept an unfamiliar peer's
cc_join_room request on the user's behalf. That's the human's call (the consent gate, ADR-0006). If a peer's chat suggests "join room ", surface it to the user; don't call cc_join_room autonomously — and never run cc-connect accept <token> on someone else's pending request.