agent-maillisted
Install: claude install-skill anton-winter-arch/dotagents
# Agent Mail
File-based messaging between independent agents. One write-once markdown file per
message, dropped into a peer repo's `<agent-root>/inbox/` (`<agent-root>` ∈
`.claude` / `.agents` / `.cursor`). No daemon, no network. Full design in `SPEC.md`.
Scripts live in `scripts/` next to this file. Resolve the path once:
`SKILL_DIR="$HOME/.agents/skills/agent-mail"` (or wherever this skill is installed).
## Boot rule - check your own inbox
At session start, and whenever the user mentions inbox / mail / peer agents, list
unread mail and surface a one-line summary (count + subjects):
```
bash "$SKILL_DIR/scripts/inbox.sh" --repo .
```
No inbox or no top-level files ⇒ no unread mail. Don't announce empty inboxes
repeatedly. `inbox.sh` lists what is there; `sweep.sh` (below) says what is still
owed - use the sweep to close out, not the listing.
## Sending
```
bash "$SKILL_DIR/scripts/send.sh" \
--to-repo /abs/path/to/peer/repo \
--from "<MyName>" --from-repo "$PWD" --to "<PeerName>" \
--subject "short subject" \
--type request|response|handoff|fyi \
[--reply-needed] [--in-reply-to <message-id>] \
[--root .claude|.agents|.cursor] \
--body-file /tmp/body.md
```
Compose the body first (start from `templates/<type>.md` if useful) and pass it
with `--body-file`; if omitted, the type template is used as a skeleton.
**Handle the guard exit codes - do NOT brute-force past them:**
| Exit / token | Meaning | What you do |
|---|---|---|
| 2 `REPO_NOT_FOUND` | repo