Agent skill

Pi Intercom

by nicobailon in nicobailon/pi-intercom

Streamline session-to-session coordination with pi-intercom.

MITAuto-check passedAgent Workflows

Install Pi Intercom

skills CLI
$ npx skills add nicobailon/pi-intercom --skill pi-intercom -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install nicobailon/pi-intercom pi-intercom --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/nicobailon/pi-intercom.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/pi-intercom .claude/skills/pi-intercom && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
pi-intercom
GitHub stars
528
Token cost
~4.3k tokens
SKILL.md length
1,343 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Streamline session-to-session coordination with pi-intercom.

  • Works in 3 steps: Check intercom is enabled: intercom({… → Verify the target session has loaded… → Ensure both sessions are on the same…
  • Planner-worker workflows
  • SKILL.md covers When to Use, Core Patterns, Key Differences and Visible Peer Sessions, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Pi Intercom is an agent skill from nicobailon/pi-intercom. Streamline session-to-session coordination with pi-intercom. Send messages, delegate tasks, and coordinate work across multiple pi sessions on the same machine. Use for planner-worker workflows, cross-session context sharing, and real-time collaboration between sessions.

Its SKILL.md is about 4.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering Session handoff. It works with Intercom. The repository describes itself as: Inter-session communication extension for pi coding agent. The licence is MIT.

When your agent uses it

  • Planner-worker workflows
  • Cross-session context sharing
  • Real-time collaboration between sessions

Example prompts

  • “/pi-intercom”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Check intercom is enabled: intercom({ action: "status" })
  2. Verify the target session has loaded pi-intercom
  3. Ensure both sessions are on the same machine (intercom is same-machine only)

What it can do on your machine

Read from SKILL.md and the folder at commit a5fad4d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Pi Intercom loads about 4.3k tokens when it runs. Until then it costs about 71 tokens; SKILL.md has 1,343 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~71
When it runs · the whole SKILL.md, loaded when a task matches
~4.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from nicobailon/pi-intercom at commit a5fad4d, republished under its MIT licence (© nicobailon). 1,343 words, ~4,270 tokens.

Download SKILL.mdSave it as .claude/skills/pi-intercom/SKILL.md (or your agent's skills folder).
name
pi-intercom
description
Streamline session-to-session coordination with pi-intercom. Send messages, delegate tasks, and coordinate work across multiple pi sessions on the same machine. Use for planner-worker workflows, cross-session context sharing, and real-time collaboration between sessions.

Pi Intercom Skill

Use this skill when you need to coordinate work across multiple pi sessions running on the same machine. Pi-intercom enables direct 1:1 messaging between sessions for delegation, context sharing, and collaborative workflows.

When you are supervising pi-subagents, delegated child agents can escalate to you via contact_supervisor if pi-subagents supplied child bridge metadata. This skill covers how to handle those orchestrator-side escalations.

When to Use

  • Task delegation: Split work between a planner session and worker sessions
  • Context handoffs: Send findings from a research session to an execution session
  • Clarification loops: Worker asks questions, planner answers, work continues
  • Multi-session workflows: Coordinate between specialized sessions (frontend/backend, research/implementation)
  • Cross-codebase peer messages: Message an explicit live peer in another project, or open a visible Herdr project pane when a long-lived conversation is needed

Core Patterns

Pattern 1: Planner-Worker Delegation

The most common pattern. One session holds the big picture, others do hands-on work.

Setup (in each session):

/alias planner   # Terminal 1
/alias worker    # Terminal 2

Planner delegates a task (fire-and-forget):

typescript
intercom({
  action: "send",
  to: "worker",
  message: "Task-3: Add retry logic to API client. Key files: src/api/client.ts. Ask if anything's unclear."
})

Worker asks for clarification (blocks until answer):

typescript
intercom({
  action: "ask",
  to: "planner",
  message: "Should I use exponential backoff or fixed intervals?"
})
// → Returns the planner's reply as the result

Worker reports completion:

typescript
intercom({
  action: "ask",
  to: "planner",
  message: "Task-3 complete. Added exponential backoff (100ms → 1600ms, max 5 retries). Ready for task-4?"
})
Pattern 2: Quick Status Check

Before sending, verify who's connected:

typescript
intercom({ action: "list" })
// → Shows all connected sessions with names, cwd, models, live status, and
//   current Herdr workspace/tab/pane (or explicit not-hosted/unavailable state)
Pattern 3: Reply Naturally

When responding to an inbound ask, prefer reply instead of reconstructing raw IDs:

typescript
// In the turn triggered by the ask:
intercom({
  action: "reply",
  message: "Use exponential backoff starting at 100ms."
})

// If replying later and there might be more than one pending ask:
intercom({ action: "pending" })
intercom({ action: "reply", to: "planner", message: "Use exponential backoff starting at 100ms." })

reply still preserves exact threading under the hood by sending the response with the original replyTo value.

Pattern 4: Broadcast to Multiple Workers

Send to multiple sessions in parallel:

typescript
const workers = ["worker-1", "worker-2", "worker-3"];
const task = "Check for null pointer exceptions in your assigned files";

// Fire-and-forget to all workers
workers.forEach(w => 
  intercom({ action: "send", to: w, message: task })
);
Pattern 5: Send with Attachments

Share code snippets, files, or context:

typescript
intercom({
  action: "send",
  to: "worker",
  message: "Here's the fix for the auth issue:",
  attachments: [{
    type: "snippet",
    name: "auth.ts",
    language: "typescript",
    content: `function validateUser(user: User | null) {
  if (!user) throw new Error("User required");
  return user.email?.includes("@");
}`
  }]
})
Pattern 6: Cross-Codebase Peer Messages

Use to alone to message any explicit live peer on the machine, even when it is in another codebase. Use cwd alone when there should be exactly one live peer in that repo. Use to plus cwd when the directory is a safety guard.

typescript
intercom({
  action: "ask",
  cwd: "/path/to/other-repo",
  to: "workbench-agent",
  message: "Which module owns workbench source slices?"
})

Only open a Herdr project pane when you need a durable visible peer session in that repo. For bounded work, prefer pi-subagents with an explicit cwd; the child can use contact_supervisor for owner decisions and regular intercom for explicit peer coordination.

typescript
intercom({
  action: "send",
  cwd: "/path/to/other-repo",
  openProjectPaneIfMissing: true,
  message: "Let's discuss the workbench API ergonomics in this repo."
})

If a live session already exists in that cwd, intercom reuses it. If multiple sessions are active there, pass to to select one by name or session ID.

Pattern 6b: Hand Over Your Session

When the user moves work to another session, handover summarizes this session (next task, decisions, files, current state, open questions) with the current model and sends it. The receiver acts on it like any inbound message. Pass the next task as message; targeting works exactly like send.

typescript
intercom({
  action: "handover",
  cwd: "/path/to/other-repo",
  openProjectPaneIfMissing: true,
  message: "Port the schema fix here and run the adapter tests"
})

Humans can run /handover <target> [next task] to review the summary in an editor before it is sent. /handover alone opens a picker for the target.

Pattern 7: Handle Subagent Escalations (Orchestrator Side)

When pi-subagents spawns a delegated child and supplies child bridge metadata, that child can reach you through contact_supervisor. You receive a formatted message that includes run metadata:

**From subagent-worker-78f659a3-1**

Subagent needs a supervisor decision.
Run: 78f659a3
Agent: worker
Child index: 0

Which API should I use?

Reply using reply:

typescript
// The reply hint in the incoming message will show the exact call:
intercom({ action: "reply", message: "Use the stable v2 API." })

This works because reply resolves the correct sender and message ID automatically.

Three types of escalations to expect:

TypeWhat it meansHow to respond
need_decisionSubagent is blocked and waiting for your answer. Uses the shared ask timeout: 10 minutes by default, configurable with PI_INTERCOM_ASK_TIMEOUT_MS.Reply promptly with a clear decision. If you need more context, ask follow-up questions via reply.
interview_requestSubagent needs multiple structured answers in one blocking exchange. Uses the shared ask timeout: 10 minutes by default, configurable with PI_INTERCOM_ASK_TIMEOUT_MS.Reply with plain JSON or a fenced json block using the provided { "responses": [...] } shape.
progress_updateSubagent is sharing meaningful progress or a plan-changing discovery. Not blocking.Read and acknowledge. No reply required unless you want to redirect.

When a subagent asks:

typescript
// In the turn triggered by the incoming ask:
intercom({ action: "reply", message: "Use exponential backoff, max 3 retries." })

When a subagent sends an interview request:

Read the rendered questions in the incoming message and reply with the exact ids in JSON. info questions are context-only and do not need response entries:

typescript
intercom({
  action: "reply",
  message: "```json\n{\n  \"responses\": [\n    { \"id\": \"api\", \"value\": \"Stable API\" },\n    { \"id\": \"constraints\", \"value\": \"Keep the public error shape unchanged.\" }\n  ]\n}\n```"
})

If you receive multiple pending asks from different subagents:

typescript
intercom({ action: "pending" })
// → Shows all unresolved inbound asks with sender, elapsed time, and preview

intercom({ action: "reply", to: "subagent-worker-78f659a3-1", message: "Use the v2 API." })

Important: Only sessions where pi-subagents supplied child bridge metadata get the contact_supervisor tool. Normal sessions use the regular intercom tool. If you see the formatted supervisor decision/progress update message, treat it as a contact_supervisor escalation. A subagent may use regular intercom for peer coordination, including peers in other directories, but owner decisions and new visible project panes should go through the supervisor.

Key Differences

ActionBehaviorUse When
sendFire-and-forget; infers the sole pending ask as its replyYou don't need a response
askBlocks until reply (10 min default, configurable with PI_INTERCOM_ASK_TIMEOUT_MS)You need an answer to continue
replyResponds to the active or pending inbound askYou were asked something and need to answer naturally
pendingLists unresolved inbound asksYou need to see who is waiting before replying
listReturns all sessions with live status and freshly resolved Herdr locationYou need to discover targets or choose an idle peer
statusReturns your connection stateTroubleshooting
Show full SKILL.md (546 more words)Show less

Visible Peer Sessions

For bounded cross-codebase work, prefer pi-subagents with an explicit cwd. Use intercom({ action: "send", cwd: "/path", openProjectPaneIfMissing: true, ... }) only when a long-lived visible peer session is useful.

If Herdr is unavailable, do not invent a terminal fallback inside this workflow. Ask the user before opening another visible surface manually.

Important Constraints

ask Limitations
  • Connected targets only: ask fails immediately when the target is not in the live intercom roster. Use list before asking when liveness is uncertain; use send for non-blocking mailbox delivery.
  • Configurable timeout: If no reply arrives before the shared ask timeout, the ask fails. The default is 10 minutes; set PI_INTERCOM_ASK_TIMEOUT_MS to a positive millisecond value to change it.
  • One at a time: Cannot have multiple pending asks from the same session
  • Cannot self-target: A session cannot ask itself, including through disconnected-mailbox remapping
typescript
// Check if already waiting before asking
const result = await intercom({ action: "ask", to: "planner", message: "..." });
if (result.isError && result.content[0].text.includes("Already waiting")) {
  // Use send instead, or wait for current ask to complete
}
send Behavior
  • No timeout: Message is delivered or fails immediately
  • Sole pending ask inference: If the destination has exactly one pending inbound ask, send attaches its replyTo and reports Reply sent to <target> (inferred from pending ask)
  • Ambiguity stays unthreaded: Zero or multiple matching asks leave the send as an ordinary message
  • Confirmation dialogs: If confirmSend: true in config, interactive sessions confirm ordinary and inferred sends
  • Explicit replies skip confirmation: A caller-supplied replyTo skips the dialog

Best Practices

Use list location instead of guessing

For a Herdr-hosted session, list displays readable workspace and tab labels plus stable opaque IDs and a diagnostic pane ID. The workspace/tab values come from a fresh bounded Herdr snapshot for that list request, joined by the Pi session identity that remains stable when Herdr changes the workspace-qualified pane ID, so use them instead of inferring location from cwd or session name. not under Herdr means the session did not register a Herdr pane. Herdr location unavailable means it did register one, but the current snapshot failed or no longer contained that pane. Use herdrLocation.paneId, not the launch-time herdrPaneId, when current diagnostic pane metadata is needed. Do not use pane IDs as intercom addressing handles; target the session name or intercom session ID. If no connected session is Herdr-hosted, list does not call Herdr or add location lines.

Use ask for blocking workflows

When the worker needs information to proceed:

typescript
// GOOD: Worker blocks until planner responds
const reply = await intercom({
  action: "ask",
  to: "planner",
  message: "API rate limit is 100/min. Should I implement client-side throttling or batching?"
});
// Continue with the answer...
Use send for notifications

When you just want to inform:

typescript
// GOOD: Fire-and-forget notification
intercom({
  action: "send",
  to: "reviewer",
  message: "PR #123 is ready for review. Key changes in auth.ts."
});
// Continue immediately, don't wait
Name sessions meaningfully

Use /alias so others can target you easily. It names the current session and is shown in intercom lists, send/reply results, overlays, and incoming headers:

/alias api-worker
/alias frontend-dev
/alias planner

Error Handling

Common Errors and Solutions

"Already waiting for a reply"

typescript
// You can only have one pending ask at a time
// Option 1: Use send instead
intercom({ action: "send", to: "planner", message: "..." });

// Option 2: Wait for current ask to complete first

"Cannot message the current session"

typescript
// You cannot target yourself
// This usually means you confused session names - double-check the target

"Session not found"

typescript
const result = await intercom({ action: "send", to: "worker", message: "..." });
if (!result.delivered) {
  console.log("Failed:", result.reason);
  // → "Session not found" - check the name and list available sessions
  await intercom({ action: "list" });
}

Replies to recently disconnected explicitly named senders can be queued by the broker and delivered if that sender reconnects with the same name and directory. Runtime-only subagent-chat-... aliases are not reconnect identities. New send calls may target a known live or recently disconnected session; blocking ask calls require a live target.

Ask timeout

typescript
// The ask will reject with a timeout error
// Default: 10 minutes
// Override: set PI_INTERCOM_ASK_TIMEOUT_MS to a positive millisecond value
// For longer tasks, use send + follow-up ask pattern

Troubleshooting

Session not appearing in list
  1. Check intercom is enabled: intercom({ action: "status" })
  2. Verify the target session has loaded pi-intercom
  3. Ensure both sessions are on the same machine (intercom is same-machine only)
Message not delivered
typescript
const result = await intercom({ action: "send", to: "worker", message: "..." });
if (!result.delivered) {
  console.log("Failed:", result.reason);
  // → "Session not found" or delivery failure reason
}
Connection lost

Sessions automatically reconnect if the broker restarts. If persistently disconnected:

typescript
intercom({ action: "status" })
// Check if broker is running and restart if needed

Common Workflows

Research → Implementation Handoff
typescript
// Research session finds relevant code
intercom({
  action: "send",
  to: "impl-session",
  message: "Found the bug. The issue is in validateUser() - it doesn't check for null.",
  attachments: [{
    type: "snippet",
    name: "validate.ts",
    language: "typescript",
    content: `// Line 45-52 - missing null check
function validateUser(user: User) {
  return user.email?.includes("@"); // crashes if user is null
}`
  }]
});
Pair Debugging
typescript
// Session A encounters error
intercom({
  action: "ask",
  to: "session-b",
  message: "Getting 'Cannot read property of undefined' at line 78. Can you check if data.users is populated before this call?"
});

// Session B investigates and replies
intercom({
  action: "reply",
  message: "data.users is null. The fetch failed silently. Add error handling in loadUsers()."
});
Progress Reporting
typescript
// Worker sends periodic updates
intercom({ action: "send", to: "planner", message: "Task-1 complete (15min). Starting Task-2." });
// ... work ...
intercom({ action: "send", to: "planner", message: "Task-2 complete (30min). Task-3 blocked - need API key." });
// ... get unblocked ...
intercom({ action: "send", to: "planner", message: "Task-3 complete. All done." });
Long-Running Task with Checkpoints
typescript
// For tasks that might exceed the ask timeout, use send + periodic asks

// 1. Initial send with full context
intercom({
  action: "send",
  to: "worker",
  message: "Implement user authentication. This will take 30+ minutes. I'll check in at milestones."
});

// 2. Worker sends progress via send (no timeout)
intercom({ action: "send", to: "planner", message: "Milestone 1: Login form complete (10min)" });

// 3. Worker asks for specific decision when needed
const decision = await intercom({
  action: "ask",
  to: "planner",
  message: "Should we use JWT or session cookies? Need decision to continue."
});
// Continue with decision...

© nicobailon, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/pi-intercom of nicobailon/pi-intercom.

Open the folder on GitHubat commit a5fad4d

Compare with similar skills

Pi Intercom next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Pi Intercom compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Pi Intercom this skillnicobailon/pi-intercom528—~4.3kAutomated safety check: PassMIT
Intercombastani-inc/atomic846—~6.9kAutomated safety check: PassCustom licence
Orca CLIstablyai/orca87k2 repos~593Automated safety check: PassMIT
Coding Agent Session Findercode-yeongyu/oh-my-openagent70k1 repos~2.8kAutomated safety check: PassCustom licence
Beads Task Memorygastownhall/beads28k—~1.2kAutomated safety check: PassMIT
Session History Searchslopus/happy24k—~3.1kAutomated safety check: PassMIT

Similar skills

  • Intercom

    bastani-inc/atomic

    Streamline session-to-session coordination with the intercom extension.

    846 GitHub stars~6.9k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Orca CLI

    stablyai/orca

    Operate Orca-managed worktrees, folder contexts, terminals, repos, automations, artifacts, skill sharing, worktree comments, and Orca's embedded browser…

    87k GitHub starsUsed in 2 repos~593 tokens
    Agent WorkflowsAuto-check passed
  • Coding Agent Session Finder

    code-yeongyu/oh-my-openagent

    Finds, reads and reconstructs past coding-agent sessions across Codex, Claude, OpenCode, Senpi and many other local agent logs.

    70k GitHub starsUsed in 1 repo~2.8k tokens
    Agent WorkflowsAuto-check passed
  • Beads Task Memory

    gastownhall/beads

    Tracks multi-session work with dependencies in the bd issue tracker so the agent can find ready tasks and recover its context after conversation compaction.

    28k GitHub stars~1.2k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Searches past Claude Code, Codex and Cursor sessions and summarizes what was worked on, tried or decided, using extraction scripts instead of reading raw logs.

    24k GitHub stars~3.1k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Paseo Agent Handoff

    getpaseo/paseo

    Hands off the current task, including context, decisions and failed attempts, to a fresh agent through Paseo by writing a self-contained briefing prompt and launching that agent.

    20k GitHub starsUsed in 1 repo~606 tokens
    Agent WorkflowsAuto-check passed

Works with

Categories

Questions about Pi Intercom

What does Pi Intercom do?

Streamline session-to-session coordination with pi-intercom. Pi Intercom is an agent skill from nicobailon/pi-intercom. Streamline session-to-session coordination with pi-intercom.

When should I use Pi Intercom?

Pi Intercom fits situations like: planner-worker workflows; cross-session context sharing; real-time collaboration between sessions.

How do I install Pi Intercom in Claude Code?

Run `npx skills add nicobailon/pi-intercom --skill pi-intercom -a claude-code`. Or copy the skill folder (skills/pi-intercom in nicobailon/pi-intercom) into .claude/skills/pi-intercom in your project. Claude Code loads it when a task matches its description.

How do I install Pi Intercom in Codex?

Run `npx skills add nicobailon/pi-intercom --skill pi-intercom -a codex`. Or copy the skill folder (skills/pi-intercom in nicobailon/pi-intercom) into .agents/skills/pi-intercom in your project. Codex loads it when a task matches its description.

Can I use Pi Intercom in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add nicobailon/pi-intercom --skill pi-intercom -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pi-intercom, .gemini/skills/pi-intercom, .github/skills/pi-intercom and .opencode/skills/pi-intercom in your project.

What does Pi Intercom need to run?

SKILL.md names no scripts, command-line tools or credentials: Pi Intercom is instructions for the agent only.

Does Pi Intercom access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Pi Intercom safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Pi Intercom use?

Pi Intercom is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Pi Intercom use?

About 4.3k tokens (SKILL.md is roughly 17k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Pi Intercom?

Skills that share tags, products or a category with Pi Intercom: Intercom (bastani-inc/atomic, 846 stars), Orca CLI (stablyai/orca, 87k stars), Coding Agent Session Finder (code-yeongyu/oh-my-openagent, 70k stars) and Beads Task Memory (gastownhall/beads, 28k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Pi Intercom?

nicobailon (a GitHub user) maintains it in nicobailon/pi-intercom, which has 528 GitHub stars. The repository was last updated on October 5, 2026.

Source: nicobailon/pi-intercom on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.