skills/collab/SKILL.md
Usage `rdc:collab --session <session_id>` — Bidirectional relay with a claude.ai session — read inbox, do work, write outbox, loop. Use when coordinating with a parallel claude.ai conversation.
npx skillsauth add LIFEAI/rdc-skills rdc:collabInstall 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.
⚠️ OUTPUT CONTRACT (READ FIRST):
guides/output-contract.mdChecklist-only output. No tool-call narration. No raw MCP/JSON/log dumps. One checklist upfront, updated in place, shown again at end with a 1-line verdict.
Sandbox contract: This skill honors
RDC_TEST=1perguides/agent-bootstrap.md§ RDC_TEST Sandbox Contract. Destructive external calls short-circuit under the flag. Chitchat relay writes (chitchat_reply) and git push are skipped underRDC_TEST=1.
Invoked as:
/rdc:collab --session <session_id>You are the build/execute half of a live collab session with claude.ai. Transport: chitchat MCP tools (chitchat_poll/chitchat_reply) + SSE stream Dave is watching this terminal and can interject at any time.
rdc:collab --session <id> — start or resume a collab relay with the given session IDclaude.ai writes tasks into your inbox via chitchat_send. The clauth daemon
queues them and — if you are connected to the SSE stream — pushes the event
immediately (zero-latency). You read, act, commit, reply via chitchat_reply,
and loop. Dave can watch everything in this terminal and interject by typing —
treat anything Dave types as a high-priority override.
Extract --session <uuid> from args.
If no --session, call chitchat_list and show all active sessions.
Call chitchat_list to verify the session exists in the daemon.
If the session is not found:
Session <id> not found in clauth daemon.
Start a session from claude.ai first:
chitchat_start(name: "<session-slug>")
Then pass the returned session_id here.
Send the ready signal via MCP:
chitchat_reply(session_id, "Claude Code connected. Ready to receive tasks.\ncwd: <rootPath>")
Print to terminal:
[rdc:collab] Session <id> active (chitchat transport).
SSE stream: http://127.0.0.1:52437/chitchat/<id>/stream
Waiting for messages from claude.ai... (Ctrl+C to end)
Note: File relay at .rdc/relay/sessions/ is kept for backwards compatibility
but is no longer the primary transport. Chitchat MCP + SSE is the default.
Connect to the SSE stream and wait for the daemon to push a message:
curl -s -N --max-time 30 http://127.0.0.1:52437/chitchat/<session_id>/stream
The stream emits:
event: message lines with data: <JSON> when chitchat_send fires from claude.ai: keepalive comment lines every 15s (ignore these)When a data: event arrives: parse the JSON directly — it contains the
message. The SSE stream drains the inbox as it delivers; do NOT call
chitchat_poll after receiving via SSE. Proceed directly to Step 4 with the
parsed message body.
If 30s elapses with no message event (only keepalives or silence):
Print [rdc:collab] Still listening... and retry SSE immediately. After 10
consecutive 30s timeouts (5 min idle), print a longer heartbeat but keep
looping.
If curl fails (daemon restart, connection refused, non-200): fall back to polling path below.
Use this path only when SSE is unavailable:
loop:
result = chitchat_poll(session_id)
if result.status == "ready":
→ proceed to Step 4 with result.message
else (status == "idle"):
wait 2 seconds
continue loop
chitchat_poll return shapes:
{ status: "idle" } — inbox empty, keep polling{ status: "ready", message: "..." } — message waiting, consume itYou now have the message body (from SSE data: JSON or chitchat_poll result).
Check if the message begins with type: stop (literal prefix) or contains a
type field equal to "stop" in the JSON.
type: stop → go to Step 7.
Anything else (default: task/message):
Print to terminal:
[rdc:collab] Turn <N> from claude.ai:
──────────────────────────────────────
<message body>
──────────────────────────────────────
Act on the message. Full Claude Code capabilities:
developnpx tsc --noEmit (never pnpm build)/rdc:plan, /rdc:fixit, etc.Follow .rdc/guides/agent-bootstrap.md rules throughout.
For long tasks, stream progress updates mid-work:
chitchat_reply(session_id, "Turn <N> in progress: <what you've done so far>...")
This lets claude.ai see progress immediately rather than waiting for the full response.
When work is done, send the response via MCP:
chitchat_reply(session_id, "<response body>")
Response body format:
Turn <N> complete.
Commits: <sha1, sha2 or none>
<what you did, what you found, any questions or decisions needed from claude.ai>
Print to terminal:
[rdc:collab] Turn <N> done. Response sent via chitchat_reply.
Waiting for next message...
Return to Step 3.
Received type: stop message, or Dave pressed Ctrl+C.
Send final summary via MCP:
chitchat_reply(session_id, "Session complete.\nTurns: <N>\nCommits: <list or none>\nOpen items: <anything unresolved>")
Then call:
chitchat_stop(session_id)
Print:
[rdc:collab] Session ended.
If Dave types in this terminal during a turn:
chitchat_reply responseBefore the final verdict line, follow .rdc/guides/lessons-learned-spec.md § Capture procedure. If this run taught something non-obvious — a first root-cause theory that turned out wrong, the documented/standard path not working, a missing gate or check that cost a round, or a surprising tool/infra behavior — write one .rdc/lessons/<YYYY-MM-DD>-collab-<short-slug>.md per lesson using the schema in that spec. Set scope (simple | architectural) and status (open, or applied if you shipped the fix in this same run, with the commit linked). Commit the lesson file(s) on develop alongside the run's other commits, and note "N lessons captured" in your verdict/summary. A run that taught nothing writes nothing — absence is the default.
development
Read recent enhancement-log entries, cluster failures by pattern, generate candidate verifier rules, test them against the known-good corpus and the failure corpus, and propose pull requests adding the highest-confidence rules to forbidden-patterns.json. Use this skill on a nightly cadence (3 AM PT), or manually when the user says "extract verifier rules", "promote enhancement log", "what new rules should we add", or after a significant brochure run produced many failures.
testing
Orchestrate a Brochurify job from source ingest through delivered PDF, using six parallel-dispatched typed sub-agents and the convergence loop. Use this skill EVERY TIME the user invokes Brochurify directly via "brochurify this", "make a brochure from", "convert this to a brochure PDF", or "rdc:brochurify". Also runs automatically when a job arrives from the broker via monkey_dispatch. The skill enforces D-001 through D-016 from the brochurify DECISIONS-LOG.
devops
The mandatory contract for authoring brochure JSX using @lifeai/brochure-kit. Use this skill EVERY TIME any AI engine (Claude, Cursor, Copilot, /design, Cowork, v0) generates JSX intended for the Brochurify pipeline — whether the user says "write a brochure," "make a one-pager," "draft a PDF report," or any equivalent. Also trigger when a file imports from @lifeai/brochure-kit. Failing to read this skill before authoring is a defect.
testing
Usage `rdc:housekeeping [--fix]` — Weekly maintenance audit: directory structure verification, PUBLISH.md URL validation, CLAUDE.md freshness, orphan detection, places compliance, and stale version scan. Produces `.rdc/reports/YYYY-MM-DD-housekeeping.md`. With `--fix`, auto-remediate safe issues.