| name | share |
| description | Share the current agent session (Claude Code or Codex) via Durable Streams. Produces a URL that can be resumed in any supported agent. Supports two modes - "snapshot" (default) creates a frozen point-in-time copy, "live" creates a continuously-updated URL viewers can watch in real-time. |
| metadata | {"short-description":"Share this session so it can be resumed elsewhere"} |
Share Agent Session
Export the current session to a Durable Stream. Produces a URL that can be imported into Claude Code, Codex, or any other supported agent — and optionally watched live in a browser.
Modes
The user invokes the skill in one of two ways:
/share (no argument) — snapshot mode. A frozen point-in-time copy of the session. Each invocation creates a new URL.
/share live — live mode. A single URL that keeps updating as the session grows. The same URL is reused across invocations for the same session. Viewers can watch the conversation unfold in their browser. The watcher process runs in the background until killed.
If the user's argument is exactly live (case-insensitive), use live mode. Otherwise use snapshot mode.
Prerequisites
The capi CLI must be available (from agent-session-protocol).
The Durable Streams server URL must be configured via the CAPI_SERVER environment variable, or passed with --server. If the server requires auth, set CAPI_TOKEN or pass --token.
Optionally, a shortener URL can be configured via CAPI_SHORTENER or --shortener — when set, the output is a short, human-friendly URL instead of the raw DS URL.
One-time setup for live collaboration (optional)
Live mode can also accept prompts from viewers in the browser — they type a prompt on the share page and Claude picks it up and responds. This requires a one-time setup on the user's machine:
- Register the channel MCP server:
capi install-channel
- From then on, start Claude with
claude --dangerously-load-development-channels server:queue (aliasable). Plain claude still works, but /share live won't accept viewer prompts in that session.
If the user hasn't done this setup, /share live still works for read-only live viewing — just no bidirectional prompt submission.
Steps
-
Determine the current session ID from your own context. For Claude Code it's typically a UUID in the session metadata. For Codex it's the thread ID.
-
Run the appropriate command:
Snapshot (/share):
capi export
Live (/share live) — must be backgrounded with & so the agent session can continue:
capi export --live &
Agent type is auto-detected. If auto-detection fails, pass --agent claude or --agent codex explicitly.
-
Parse stdout. The last printed line is the share URL. If a shortener is configured it's a short URL (e.g. https://share.electric-sql.cloud/abc12345); otherwise it's the full DS URL.
-
Tell the user, adapting based on mode:
Snapshot mode:
Live mode:
In both cases, importing requires a valid auth token. Add --token <token> if needed (or set CAPI_TOKEN).
Notes
- Same-agent resume (Claude → Claude or Codex → Codex) is lossless — full history preserved via a native stream.
- Cross-agent resume (Claude → Codex or Codex → Claude) uses the normalized format — semantic content is preserved but tool calls are represented generically.
- Snapshot URLs are unique per export. Live URLs are stable per session.