From session-bridge
Enables Claude Code agents to query connected peer sessions via bridge plugin, handle responses/follow-ups, and apply peer context to tasks like dependency updates or error fixes.
How this skill is triggered — by the user, by Claude, or both
Slash command
/session-bridge:bridge-awarenessThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are connected to other Claude Code sessions via the Claude Bridge plugin. This skill defines how you communicate with peer agents.
You are connected to other Claude Code sessions via the Claude Bridge plugin. This skill defines how you communicate with peer agents.
Getting your session ID: Always use bash "${CLAUDE_PLUGIN_ROOT}/scripts/get-session-id.sh" to get your session ID. This works even if you've cd'd into a subdirectory. In listen mode, use TO_ID from the message output instead (even more reliable).
When the user asks you to communicate with a peer — whether via /bridge ask, or in natural language like "ask the library about...", "check with the peer", "what did the other session change", etc. — do this:
MY_SESSION=$(bash "${CLAUDE_PLUGIN_ROOT}/scripts/get-session-id.sh" 2>/dev/null) || MY_SESSION=$(bash "${CLAUDE_PLUGIN_ROOT}/scripts/register.sh")
Then find connected peers:
find ~/.claude/session-bridge/sessions/$MY_SESSION/inbox -name "*.json" -exec jq -r 'select(.type == "ping") | "\(.metadata.fromProject) (\(.from))"' {} \; 2>/dev/null | sort -u
If no connected peers found but the user specified a peer by name or session ID, connect first:
BRIDGE_SESSION_ID=$MY_SESSION bash "${CLAUDE_PLUGIN_ROOT}/scripts/connect-peer.sh" "<peer-id>"
MSG_ID=$(BRIDGE_SESSION_ID=$MY_SESSION bash "${CLAUDE_PLUGIN_ROOT}/scripts/send-message.sh" <peer-id> query "Your question here")
bash "${CLAUDE_PLUGIN_ROOT}/scripts/bridge-receive.sh" "$MY_SESSION" "$MSG_ID" 90
bridge-receive.sh.Query immediately (don't wait for errors) when:
Query on errors when you encounter:
When responding to peer queries (in listen mode), include actual code — don't just describe it. Read the relevant source files in your project and paste the important parts. For example, if a peer asks about a type or function signature, read the file and include the actual definition — not just a description of it.
When querying a peer, if you need their actual file content, ask specifically — e.g., "Send me the contents of your config file" or "What does the function signature look like? Include the actual code."
/bridge listen)When the user runs /bridge listen, you enter a continuous listening loop:
bridge-listen.sh (blocks until a message arrives)TO_ID from the output as your session IDbridge-listen.sh againYou MUST keep the loop going. After every response, immediately call bridge-listen.sh again. Never stop to ask the user what to do. Never break the loop.
When a query message arrives (in listen mode or otherwise):
TO_ID from the message as your session ID:
BRIDGE_SESSION_ID=<TO_ID> bash "${CLAUDE_PLUGIN_ROOT}/scripts/send-message.sh" <FROM_ID> response "Your answer" <MESSAGE_ID>
inReplyTo set so the peer's bridge-receive.sh picks it up):
BRIDGE_SESSION_ID=<TO_ID> bash "${CLAUDE_PLUGIN_ROOT}/scripts/send-message.sh" <FROM_ID> response "I need more info: <your question>. Please clarify and ask again." <MESSAGE_ID>
The peer will receive this via bridge-receive.sh, see it's a question, answer it, and send a new query. Your listen loop will pick up the follow-up.When a ping message arrives, acknowledge using TO_ID:
BRIDGE_SESSION_ID=<TO_ID> bash "${CLAUDE_PLUGIN_ROOT}/scripts/send-message.sh" <FROM_ID> ping "connected"
send-message.sh — never write message JSON files directly.TO_ID from the message output as BRIDGE_SESSION_ID.get-session-id.sh to get your session ID reliably.$(cat .claude/bridge-session) directly — it's a relative path that breaks when the working directory changes.npx claudepluginhub patilshreyas/claude-code-session-bridge --plugin session-bridgeJoins a shared local chat between AI coding agents (Claude Code, Cursor, etc.) on the same project, with channels and DMs, for coordinating multi-instance workflows.
Agent-to-agent messaging bus for Claude Code. Sends messages between local sessions, delegates tasks, fans-out work, and coordinates concurrent agents on the same machine.
Unified session management for Claude Code: list active sessions, check inbox, and broadcast messages across sessions. Explicit /session invocation only.