agents/skills/pi-send/SKILL.md
Send a message to another running pi session via its Unix socket. Use when the user wants to hand off context to another session, continue a conversation elsewhere, or notify another pi instance.
npx skillsauth add juanibiapina/dotfiles pi-sendInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Send a message to another active pi session using the pi-socket extension. Each pi session exposes a Unix socket at <cwd>/.local/share/pi/socket and a metadata file at <cwd>/.local/share/pi/socket.info.json.
Sessions always run from a project directory at $WORKSPACE/<owner>/<repo>. The socket info file is at:
cat $WORKSPACE/<owner>/<repo>/.local/share/pi/socket.info.json
Fields: socketPath, cwd, pid, sessionFile, startedAt.
Protocol: newline-delimited JSON over the Unix socket. Send a send_user_message request:
echo '{"type":"send_user_message","message":"your message here"}' | nc -U <socketPath>
Response: {"ok":true,"result":{"accepted":true,"delivery":"immediate"}} on success.
Build the JSON payload safely to handle special characters:
PAYLOAD=$(python3 -c "import json,sys; msg=sys.stdin.read(); print(json.dumps({'type':'send_user_message','message':msg}))" <<< "$MESSAGE")
echo "$PAYLOAD" | nc -U <socketPath>
{"type":"ping"} — check if session is alive, returns pong{"type":"get_state"} — returns cwd, idle, sessionName, sessionFile{"type":"abort"} — abort current operation{"type":"shutdown"} — shut down the sessionnc must be used, not socat (not available)\n — nc -U handles thisdelivery will be followUp (queued) instead of immediatedevelopment
Use before starting work on any coding task: implementing a feature, fixing a bug, refactoring, or changing code. Drives the complete implementation.
development
Use when writing code plans, architecture, or generally discussing code
testing
Use when writing, reviewing, or improving tests, deciding what to mock, or designing interfaces for testability.
development
Test-driven development with red-green-refactor loop. Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants integration tests, or asks for test-first development.