/claude-spread:sessions-receivefrom claude-spread
Browse and receive Claude Code sessions from another user over LAN or WebSocket relay, with passphrase encryption and session selection.
Ships in claude-spread. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
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 listWhat SKILL.md sets; muted values are Claude Code's defaults
6 skills in this plugin
/memory-shareShare project auto memory over LAN or relaynpx claudepluginhub namyunwoo/claudespread --plugin claude-spreadOther plugins' skills for the same job