From claude-spread
Browse shared Claude Code sessions from another user via LAN or relay, select one, decrypt with passphrase, and install locally as JSONL conversation history.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-spread:sessions-receiveThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are receiving Claude Code sessions from another user on the network.
You are receiving Claude Code sessions from another user on the network.
Note: Received sessions contain full conversation history from the sender.
Run the receive_sessions.py script in list mode:
LAN mode:
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/receive_sessions.py "{{passphrase}}"
Relay mode (if --relay and --room are provided):
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/receive_sessions.py --relay --room "{{room}}" "{{passphrase}}"
This will output a JSON object with {"type": "SESSION_LIST", "sessions": [...]}.
Parse the sessions from stdout (ignore any status lines on stderr).
Sort the sessions by modified (newest first).
Use AskUserQuestion to let the user pick a session. Show up to 4 recent sessions as options:
summary (or first 40 chars of firstPrompt if summary is empty){gitBranch} · {messageCount} msgs · {relative time of modified}If there are more than 4 sessions, add an "Other..." option. When selected, display the full numbered list and ask the user to enter a number.
If there are 4 or fewer sessions, just show them all directly as AskUserQuestion options.
Run receive_sessions.py in select mode:
LAN mode:
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/receive_sessions.py --select "SELECTED_SESSION_ID" "{{passphrase}}"
Relay mode:
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/receive_sessions.py --relay --room "{{room}}" --select "SELECTED_SESSION_ID" "{{passphrase}}"
This outputs the decrypted .jsonl content to stdout.
Capture the .jsonl output and the session metadata, then pipe to install_session.py:
Create a JSON payload with the session info and pipe it:
echo '{"sessionId": "ORIGINAL_ID", "metadata": {SELECTED_SESSION_METADATA}, "jsonl_content": "ESCAPED_JSONL"}' | python3 ${CLAUDE_PLUGIN_ROOT}/skills/sessions-receive/scripts/install_session.py
Important: The jsonl_content can be very large. Instead of piping through echo, write the install payload to a temporary file first, then pass it as an argument:
# Pseudocode for the install step:
# 1. Save received .jsonl content to a temp file
# 2. Build install JSON with metadata + jsonl_content
# 3. Write to temp file, pass to install_session.py
Use a bash approach like:
python3 -c "
import json, sys
metadata = json.loads(sys.argv[1])
jsonl_path = sys.argv[2]
with open(jsonl_path) as f:
jsonl = f.read()
payload = {'sessionId': metadata['sessionId'], 'metadata': metadata, 'jsonl_content': jsonl}
json.dump(payload, sys.stdout)
" 'SESSION_METADATA_JSON' /path/to/temp.jsonl | python3 ${CLAUDE_PLUGIN_ROOT}/skills/sessions-receive/scripts/install_session.py
After successful installation, tell the user:
/resume — it will appear in the session listnpx claudepluginhub namyunwoo/claudespread --plugin claude-spreadShares selected Claude Code sessions: scans files, builds catalog, encrypts with passphrase, serves via mDNS or WebSocket relay for browsing/resuming.
Manages Claude Code sessions: lists active sessions, checks inbox, and broadcasts messages. Invoked via /session for session management tasks.
Unified session management for Claude Code: list active sessions, check inbox, and broadcast messages across sessions. Explicit /session invocation only.