jack-michaud/nix/peer-bus

Claude Code and agent skill by jack-michaud/nix

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Negotiate a consensual, scoped connection between two agent sessions over an external filesystem bus (registry for discovery, transient claim-by-rename spool as the wire, kernel state as the record), then exchange messages across family-reach boundaries with watcher-driven agent_message wakes. Use when two sessions that cannot message each other directly (different roots, different trees) need to communicate, when the user asks to connect/bridge two agents, or when building orchestrator-of-orchestrators topologies without daemon changes.

Install

npx vskill@latest install jack-michaud/nix/peer-bus

SKILL.md

The same SKILL.md was published earlier as jack-michaud/nix/peer-bus.

peer-bus

Consent-based peer connections between agent sessions. Protocol v1: OFFER / ACCEPT (may narrow scopes — subset only) / REJECT / MSG / REVOKE; accepts are permanent until revoked. Disk holds only the opt-in registry and in-flight frames (claim-by-rename spool); connections, offers, and history live in each agent's own kernel. State loss degrades to a fresh OFFER — consent is re-confirmed, never resurrected.

Acceptor bootstrap (minimal)

python
my_alias = peer_bus.init("oss-contrib")
me = (await agent_message.list_agents())["current"] # authoritative id + depth
peer_bus.publish("domain orchestrator: owns OSS contributions",
session_id=me["id"], depth=me["depth"]) # so peers know HOW to wake me
await rlm(peer_bus.watcher_prompt(my_alias), name="self-watch") # a child that wakes ME on new frames
# end turn; on each "peer-bus wake" agent_message:
for f in peer_bus.pump():
... # OFFER → peer_bus.accept(f["id"], scopes=[...]) per policy (narrow freely)
# MSG → work, then peer_bus.connection(f["from"]).send(answer)
# REVOKE → verified via peer_bus.connections()

Initiator bootstrap (minimal)

python
peer_bus.init("front-door") # wait until registry() shows the peer accepting
me = (await agent_message.list_agents())["current"]
peer_bus.publish("initiator", session_id=me["id"], depth=me["depth"])
peer_bus.offer("oss-contrib", scopes=["delegate-task"])
# poll pump() until the ACCEPT arrives, then:
conn = peer_bus.connection("oss-contrib")
reply = conn.request("delegate-task: ...", timeout_s=900) # sync sugar
conn.revoke("mission complete")

Waking a passive/idle peer

The spool is inert disk; delivery of an agent_message is what starts a turn. But agent_message reach is family-only — parent, siblings, own children — and every courier you can spawn is your child, so a courier is never a root. That constrains who may wake someone else; it never constrains waking yourself. Reach matrix (target → who can send the wake):

TargetReachable byShape
Yourself — any depth, root includeda courier you spawn (self-watch)your child's roster lists you as its parent: agent_message.send(..., receiver_role="parent") with no receiver_name. This is the standard pattern for an idle root that wants its own spool watched
Another root (depth 0)another root, directly — or a courier that root spawns for itselfroots are siblings of each other: agent_message.send(..., receiver_role="sibling", receiver_name=<target session id>) from your own kernel — never from a child you spawn. If you are not a root, ask the target to self-watch instead
Another agent's child (depth ≥ 1)its parent, or a sibling courierspawn the courier in the target's family: from the target itself (it wakes receiver_role="parent") or from the target's parent (receiver_role="sibling")
Anything else (cousin, grandchild, unknown)nobodyno reach — say so, do not retry

watcher_prompt(alias) reads the target's registry card and generates the right prompt: it names the session id to send to and tells the courier to resolve the role from await agent_message.list_agents() — which lands on parent for a self-watch courier and on sibling/child for anyone else. It raises `ValueError` only for the provably impossible other-root case, rather than spawning a doomed courier (the real 2026-08-25 failure: RuntimeError: No sibling matches "lomz-subdomains"). Passing your own alias is never refused, at any depth.

python
await rlm(peer_bus.watcher_prompt("oss-contrib"), name="bus-watcher") # courier-reachable target
await rlm(peer_bus.watcher_prompt(my_alias), name="self-watch") # my OWN spool — allowed at any depth
# ValueError → the target is ANOTHER root: send it yourself, from your own kernel:
card = {c["alias"]: c for c in peer_bus.registry()}["oss-contrib"]
await agent_message.send("peer-bus wake: frames in your spool",
receiver_role="sibling", receiver_name=card["session_id"])

A wake is an optimisation, not a delivery guarantee: both sides also drain the spool organically whenever they pump() on their own next turn, so a missed wake delays a frame, it never loses one. A peer that published no session_id (old v0 card) can only be guessed at — the generated prompt says so out loud.

Notes

  • pump() is the single drain primitive; call it on every wake.
  • init() returns your alias — keep it (my_alias = peer_bus.init("front-door")) for self-watch.
  • conn.inbox() / conn.history() are kernel reads, no I/O.
  • PEER_BUS_TRACE=1 appends frame evidence to trace.jsonl (off by default — privacy).
  • PEER_BUS_DIR overrides the bus root (default ~/.prime/agent/peer-bus).
  • Registry cards carry optional session_id / depth; peer_bus.identity() sniffs them from

the environment when you do not pass them, and omits what it cannot prove (never guesses).

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
3
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/jack-michaud/nix/peer-bus/badge)](https://verified-skill.com/skills/jack-michaud/nix/peer-bus)

Something wrong with this skill or its page? Tell us.