mailbox

$npx mdskill add Soul-Brews-Studio/arra-oracle-skills-cli/mailbox

Preserve agent knowledge across sessions with persistent mailboxes.

  • Stores findings and standing orders for team agents.
  • Uses ψ/memory/mailbox/ directory for persistent storage.
  • Executes read, write, orders, and archive commands.
  • Delivers results via CLI arguments and file operations.

SKILL.md

.github/skills/mailboxView on GitHub ↗
---
name: mailbox
description: 'Persistent agent mailbox — store findings, standing orders, and context for team agents across sessions. Use when user says "mailbox", "agent memory", "standing orders", "what did scout find", or wants to manage persistent agent knowledge.'
argument-hint: "[read <agent> | write <agent> | orders <agent> | list | load <agent>]"

---

# /mailbox — Persistent Agent Memory

> Agents die. Knowledge survives. ψ/ remembers what ~/.claude/ forgets.

Team agents in Claude Code use ephemeral file-based mailboxes that die with the session. /mailbox adds a persistent layer in ψ/memory/mailbox/ — agents remember across sessions.

## Usage

```
/mailbox                                    # List all agent mailboxes
/mailbox read <agent>                       # Read agent's mailbox
/mailbox read-all                           # Read all mailboxes
/mailbox write <agent> "<subject>" "<msg>"  # Write finding to agent
/mailbox orders <agent> "<instructions>"    # Set standing orders
/mailbox load <agent>                       # Pre-load context for spawn prompt
/mailbox archive <agent> <team>             # Archive session end
/mailbox clear <agent>                      # Clear mailbox (→ /tmp, not deleted)
```

---

## How It Works

### Storage: ψ/memory/mailbox/

```
ψ/memory/mailbox/
├── scout/
│   ├── standing-orders.md          ← permanent instructions
│   ├── 2026-04-13_findings.md      ← what scout found (append-only)
│   ├── 2026-04-14_findings.md      ← next session's findings
│   ├── context.md                  ← saved working context
│   └── 2026-04-13_session-end.md   ← archive marker
├── builder/
│   ├── standing-orders.md
│   └── 2026-04-13_findings.md
└── auditor/
    └── standing-orders.md
```

**Why ψ/, not ~/.claude/?**

| Location | Owner | Lifetime | Purpose |
|----------|-------|----------|---------|
| `~/.claude/teams/` | Claude Code | Session only | Team config, ephemeral mailbox |
| `~/.claude/tasks/` | Claude Code | Session only | Task tracking |
| **`ψ/memory/mailbox/`** | **Oracle** | **Forever** | **Persistent agent knowledge** |

Claude Code's data dies with the session. Our data lives in the vault. Nothing is Deleted.

---

## Step 0: Run the Script

```bash
bash ~/.claude/skills/mailbox/scripts/mailbox.sh [command] [args]
```

The script handles all operations. Parse the user's `/mailbox` arguments and pass them through.

---

## Commands

### `/mailbox list`

Show all agents with mailboxes:

```
📬 Agent Mailboxes (ψ/memory/mailbox/)

  scout           3 files  orders: yes  last: 2026-04-13
  builder         1 files  orders: no   last: 2026-04-13
  auditor         1 files  orders: yes  last: never
```

### `/mailbox read <agent>`

Show an agent's mailbox — standing orders + latest findings:

```
📬 Mailbox: scout

  📋 Standing Orders:
    Always check security implications first. Report severity levels.

  📝 Latest Findings (2026-04-13_findings.md):
    ## Session 4 findings
    Found ghost agent bug in Claude Code...

  Total files: 3
```

### `/mailbox write <agent> "<subject>" "<content>"`

Append a finding to the agent's mailbox:

```
📬 Written to scout's mailbox: Session 4 findings
```

### `/mailbox orders <agent> "<instructions>"`

Set permanent standing orders for an agent. These are pre-loaded into every spawn:

```
📋 Standing orders set for scout
```

### `/mailbox load <agent>`

Output agent's context in a format ready to inject into a spawn prompt. Used by /team-agents when spawning agents with memory:

```markdown
## Previous Context for scout

### Standing Orders
Always check security implications first.

### Last Session Findings
Found ghost agent bug in Claude Code...
```

### `/mailbox archive <agent> <team>`

Mark session end. Called during /team-agents shutdown:

```
📦 Session archived for scout (team: whetstone-ops)
```

### `/mailbox clear <agent>`

Move mailbox to /tmp (Nothing is Deleted):

```
📦 scout mailbox moved to /tmp/mailbox-scout-20260413_104500
```

---

## Integration with /team-agents

### On Spawn (auto-load)

When /team-agents spawns an agent, it pre-loads mailbox context:

```bash
CONTEXT=$(bash ~/.claude/skills/mailbox/scripts/mailbox.sh load scout 2>/dev/null)
```

Injected into the agent's prompt so it starts with memory.

### On Shutdown (auto-archive)

When /team-agents shuts down, it archives each agent's session:

```bash
bash ~/.claude/skills/mailbox/scripts/mailbox.sh archive scout whetstone-ops
```

### Standing Orders + Spawn

If scout has standing orders, every spawn includes them:

```
You are scout on team "whetstone-ops".

## Previous Context (from ψ/memory/mailbox/scout/)

### Standing Orders
Always check security implications first. Report severity levels.

### Last Session Findings
Found ghost agent bug in Claude Code. isActive() returns true always.
```

Scout starts every session knowing what it knows.

---

## Rules

1. **ψ/ is home** — all data lives in ψ/memory/mailbox/, never in ~/.claude/
2. **Append-only findings** — each session appends, never overwrites
3. **Nothing is Deleted** — clear moves to /tmp, not rm
4. **Standing orders persist** — until explicitly changed
5. **Load is cheap** — last 30 lines only, keeps spawn prompt small
6. **Agent identity = name** — same name across sessions = same mailbox
7. **No secrets** — never store tokens, passwords, or keys in mailbox

---

ARGUMENTS: $ARGUMENTS

More from Soul-Brews-Studio/arra-oracle-skills-cli

SkillDescription
about-oracleWhat is Oracle — told by the AI itself. Origin story, stats, family count, ecosystem overview. Use when someone asks "what is oracle", "about oracle", "tell me about this project", or wants the origin story. Do NOT trigger for "who are you" (use /who-are-you), "philosophy" (use /philosophy), or session status questions.
alpha-featureFull skill development pipeline — create, compile, test, commit, install. Use when user says "new skill", "create skill", "alpha-feature", or wants to build a skill end-to-end.
auto-retrospectiveConfigure auto-rrr and auto-forward triggers based on context window usage. Use when user says "auto rrr", "auto-scale", "configure auto triggers", "change rrr interval", "toggle auto", or wants to adjust when /rrr and /forward auto-trigger. Do NOT trigger for running /rrr manually (use /rrr) or creating handoffs (use /forward).
awakenGuided Oracle birth and awakening ritual. Default is Soul Sync (~20min), or --fast (~5min). Use when creating a new Oracle in a fresh repo, when user says 'awaken', 'birth oracle', 'create oracle', 'new oracle', or wants to set up Oracle identity in an empty repository. Do NOT trigger for general repo setup, git init, or project scaffolding without Oracle context.
bampenpienบำเพ็ญเพียร — diligent practice. A guided conversation between human and Oracle about doing hard things without knowing why. Like /awaken but repeatable — a practice, not a birth. Use when user says 'bampenpien', 'บำเพ็ญเพียร', 'why am I doing this', 'hard work', 'keep going', 'what am I building', or needs to reconnect with purpose through difficulty.
birthPrepare Oracle birth props for a new repo — Issue #1, MCP thread, identity data. Use when user says "birth", "new oracle", "prepare repo", or wants to bootstrap a new Oracle before /awaken.
budCreate a new oracle via maw bud — yeast-colony reproduction. Use when user says "bud", "new oracle", "create oracle", "spawn oracle", or wants to create a new permanent oracle from the current one.
create-shortcutCreate local skills as shortcuts — makes real /commands in .claude/skills/. Use when user says "create shortcut", "create skill", "make a command for", "add shortcut", or wants a quick custom /slash-command. Also lists and deletes local skills. ALSO triggers on "Unknown skill", "skill not found", or any unrecognized /slash-command — auto-creates it on the fly.
digMine Claude Code sessions — timeline, gaps, repo attribution, session history. Use when user says "dig", "sessions", "past sessions", "timeline", "what did I work on", or wants to see session history. Do NOT trigger for finding code/projects (use /trace), exploring repos (use /learn), or current session status (use /recap).
feelCapture how the system feels — energy, momentum, burnout, breakthrough. Emotional intelligence for Oracle-human collaboration. Use when user says 'feel', 'how are we', 'energy check', 'burnout', 'momentum', or wants emotional awareness of the work.