[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71FYCBV0MGANZMPJVTY0Y0B":3,"skill-same:01M71FYCBV0MGANZMPJVTY0Y0B":64},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":6,"ownerHtmlUrl":48,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":49,"install":50,"resources":63},"01M71FYCBV0MGANZMPJVTY0Y0B","agent-mail",null,"MCP Agent Mail - Mail-like coordination layer for multi-agent workflows. Identities, inbox\u002Foutbox, file reservations, contact policies, threaded messaging, pre-commit guard, Human Overseer, static exports, disaster recovery. Git+SQLite backed. Python\u002FFastMCP.","JSGforever\u002Fskillguard","JSGforever","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F85541948?v=4","01M71FQD3E132VMR5F4TAYX3YS","01M71FQD4DYW0XJ4XQ4YQH75Y9",2,"GPL-3.0","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__Dicklesworthstone--agent-mail\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"agent mail","mail","coordination","static","for","layer","reservations","human","outbox","multi-agent","MCP","sqlite","pre-commit","messaging","inbox","fastmcp","git","commit","workflows","python","2026-11-10 10:12:30",false,"---\nname: agent-mail\ndescription: \"MCP Agent Mail - Mail-like coordination layer for multi-agent workflows. Identities, inbox\u002Foutbox, file reservations, contact policies, threaded messaging, pre-commit guard, Human Overseer, static exports, disaster recovery. Git+SQLite backed. Python\u002FFastMCP.\"\n---\n\n# MCP Agent Mail\n\nA mail-like coordination layer for coding agents exposed as an HTTP-only FastMCP server. Provides memorable identities, inbox\u002Foutbox, file reservation leases, contact policies, searchable message history, and Human Overseer messaging. Backed by Git (human-auditable artifacts) and SQLite (fast queries with FTS5).\n\n## Why This Exists\n\nWithout coordination, multiple agents:\n- Overwrite each other's edits or panic on unexpected diffs\n- Miss critical context from parallel workstreams\n- Require humans to relay messages between tools\n\nAgent Mail solves this with:\n- Memorable identities (adjective+noun names like \"GreenCastle\")\n- Advisory file reservations to signal editing intent\n- Threaded messaging with importance levels and acknowledgments\n- Pre-commit guard to enforce reservations at commit time\n- Human Overseer for direct human-to-agent communication\n\n## Starting the Server\n\n```bash\n# Quickest way (alias added during install)\nam\n\n# Or manually\ncd ~\u002Fprojects\u002Fmcp_agent_mail\n.\u002Fscripts\u002Frun_server_with_token.sh\n```\n\nDefault: `http:\u002F\u002F127.0.0.1:8765`\nWeb UI for humans: `http:\u002F\u002F127.0.0.1:8765\u002Fmail`\n\n## Core Concepts\n\n### Projects\nEach working directory (absolute path) is a project. Agents in the same directory share a project namespace. Use the same `project_key` for agents that need to coordinate.\n\n### Agent Identity\nAgents register with adjective+noun names (GreenCastle, BlueLake). Names are unique per project, memorable, and appear in inboxes, commit logs, and the web UI.\n\n### File Reservations (Leases)\nAdvisory locks on file paths or globs. Before editing files, reserve them to signal intent. Other agents see the reservation and can choose different work. The optional pre-commit guard blocks commits that conflict with others' exclusive reservations.\n\n### Contact Policies\nPer-agent policies control who can message whom:\n\n| Policy | Behavior |\n|--------|----------|\n| `open` | Accept any message in the project |\n| `auto` (default) | Allow if shared context exists (same thread, overlapping reservations, recent contact) |\n| `contacts_only` | Require explicit contact approval first |\n| `block_all` | Reject all new contacts |\n\n### Messages\nGitHub-Flavored Markdown with threading, importance levels (`low`, `normal`, `high`, `urgent`), and optional acknowledgment requirements. Images are auto-converted to WebP.\n\n## Essential Workflow\n\n### 1. Start Session (One-Call Bootstrap)\n\n```\nmacro_start_session(\n  human_key=\"\u002Fabs\u002Fpath\u002Fto\u002Fproject\",\n  program=\"claude-code\",\n  model=\"opus-4.5\",\n  task_description=\"Implementing auth module\"\n)\n```\n\nReturns: `{project, agent, file_reservations, inbox}`\n\nThis single call: ensures project exists, registers your identity, optionally reserves files, fetches your inbox.\n\n### 2. Reserve Files Before Editing\n\n```\nfile_reservation_paths(\n  project_key=\"\u002Fabs\u002Fpath\u002Fto\u002Fproject\",\n  agent_name=\"GreenCastle\",\n  paths=[\"src\u002Fauth\u002F**\u002F*.ts\", \"src\u002Fmiddleware\u002Fauth.ts\"],\n  ttl_seconds=3600,\n  exclusive=true,\n  reason=\"bd-123\"\n)\n```\n\nReturns: `{granted: [...], conflicts: [...]}`\n\nConflicts are reported but reservations are still granted. Check conflicts and coordinate if needed.\n\n### 3. Announce Your Work\n\n```\nsend_message(\n  project_key=\"\u002Fabs\u002Fpath\u002Fto\u002Fproject\",\n  sender_name=\"GreenCastle\",\n  to=[\"BlueLake\"],\n  subject=\"[bd-123] Starting auth refactor\",\n  body_md=\"Reserving src\u002Fauth\u002F**. Will update session handling.\",\n  thread_id=\"bd-123\",\n  importance=\"normal\",\n  ack_required=true\n)\n```\n\n### 4. Check Inbox Periodically\n\n```\nfetch_inbox(\n  project_key=\"\u002Fabs\u002Fpath\u002Fto\u002Fproject\",\n  agent_name=\"GreenCastle\",\n  limit=20,\n  urgent_only=false,\n  include_bodies=true\n)\n```\n\nOr use resources for fast reads:\n```\nresource:\u002F\u002Finbox\u002FGreenCastle?project=\u002Fabs\u002Fpath&limit=20&include_bodies=true\n```\n\n### 5. Release Reservations When Done\n\n```\nrelease_file_reservations(\n  project_key=\"\u002Fabs\u002Fpath\u002Fto\u002Fproject\",\n  agent_name=\"GreenCastle\"\n)\n```\n\n## The Four Macros\n\nPrefer macros for speed and smaller models. Use granular tools when you need fine control.\n\n| Macro | Purpose |\n|-------|---------|\n| `macro_start_session` | Bootstrap: ensure project → register agent → optional file reservations → fetch inbox |\n| `macro_prepare_thread` | Join existing conversation: register → summarize thread → fetch inbox context |\n| `macro_file_reservation_cycle` | Reserve files, do work, optionally auto-release when done |\n| `macro_contact_handshake` | Request contact permission, optionally auto-accept, send welcome message |\n\n## Beads Integration (bd-### Workflow)\n\nWhen using Beads for task management, keep identifiers aligned:\n\n```\n1. Pick ready work:     bd ready --json → choose bd-123\n2. Reserve files:       file_reservation_paths(..., reason=\"bd-123\")\n3. Announce start:      send_message(..., thread_id=\"bd-123\", subject=\"[bd-123] Starting...\")\n4. Work and update:     Reply in thread with progress\n5. Complete:            bd close bd-123\n                        release_file_reservations(...)\n                        send_message(..., subject=\"[bd-123] Completed\")\n```\n\nUse `bd-###` as:\n- Mail `thread_id`\n- Message subject prefix `[bd-###]`\n- File reservation `reason`\n- Commit message reference\n\n## Beads Viewer (bv) Integration\n\nUse bv's robot flags for intelligent task selection:\n\n| Flag | Output | Use Case |\n|------|--------|----------|\n| `bv --robot-insights` | PageRank, critical path, cycles | \"What's most impactful?\" |\n| `bv --robot-plan` | Parallel tracks, unblocks | \"What can run in parallel?\" |\n| `bv --robot-priority` | Recommendations with confidence | \"What should I work on next?\" |\n| `bv --robot-diff --diff-since \u003Cref>` | Changes since commit\u002Fdate | \"What changed?\" |\n\n**Rule of thumb:** Use `bd` for task operations, use `bv` for task intelligence.\n\n## Cross-Project Coordination\n\nFor frontend\u002Fbackend or multi-repo projects:\n\n**Option A: Shared project_key**\nBoth repos use the same `project_key`. Agents coordinate automatically.\n\n**Option B: Separate projects with contact links**\n```\n# Backend agent requests contact with frontend agent\nrequest_contact(\n  project_key=\"\u002Fabs\u002Fpath\u002Fbackend\",\n  from_agent=\"GreenCastle\",\n  to_agent=\"BlueLake\",\n  to_project=\"\u002Fabs\u002Fpath\u002Ffrontend\",\n  reason=\"API contract coordination\"\n)\n\n# Frontend agent accepts\nrespond_contact(\n  project_key=\"\u002Fabs\u002Fpath\u002Ffrontend\",\n  to_agent=\"BlueLake\",\n  from_agent=\"GreenCastle\",\n  accept=true\n)\n```\n\n## Pre-Commit Guard\n\nInstall the guard to block commits that conflict with others' exclusive reservations:\n\n```\ninstall_precommit_guard(\n  project_key=\"\u002Fabs\u002Fpath\u002Fto\u002Fproject\",\n  code_repo_path=\"\u002Fabs\u002Fpath\u002Fto\u002Fproject\"\n)\n```\n\n### Guard Features\n- **Composition-safe**: Chain-runner preserves existing hooks in `hooks.d\u002F`\n- **Rename-aware**: Checks both old and new paths for renames\u002Fmoves\n- **NUL-safe**: Handles paths with special characters\n- **Git-native matching**: Uses Git wildmatch pathspec semantics\n\nSet `AGENT_NAME` environment variable so the guard knows who you are.\n\nBypass in emergencies: `AGENT_MAIL_BYPASS=1 git commit ...`\n\n## Tools Reference\n\n### Project & Identity\n\n| Tool | Purpose |\n|------|---------|\n| `ensure_project(human_key)` | Create\u002Fensure project exists |\n| `register_agent(project_key, program, model, name?, task_description?)` | Register identity |\n| `whois(project_key, agent_name)` | Get agent profile with recent commits |\n| `create_agent_identity(project_key, program, model)` | Always create new unique agent |\n\n### Messaging\n\n| Tool | Purpose |\n|------|---------|\n| `send_message(project_key, sender, to, subject, body_md, ...)` | Send message |\n| `reply_message(project_key, message_id, sender, body_md)` | Reply (preserves thread) |\n| `fetch_inbox(project_key, agent, limit?, since_ts?, urgent_only?)` | Get messages |\n| `mark_message_read(project_key, agent, message_id)` | Mark as read |\n| `acknowledge_message(project_key, agent, message_id)` | Acknowledge receipt |\n| `search_messages(project_key, query)` | FTS5 search |\n| `summarize_thread(project_key, thread_id)` | Extract key points and actions |\n\n### File Reservations\n\n| Tool | Purpose |\n|------|---------|\n| `file_reservation_paths(project_key, agent, paths, ttl?, exclusive?)` | Reserve files |\n| `release_file_reservations(project_key, agent, paths?)` | Release reservations |\n| `renew_file_reservations(project_key, agent, extend_seconds?)` | Extend TTL |\n| `force_release_file_reservation(project_key, agent, reservation_id)` | Clear stale reservation |\n\n### Contact Management\n\n| Tool | Purpose |\n|------|---------|\n| `request_contact(project_key, from_agent, to_agent, reason?)` | Request permission to message |\n| `respond_contact(project_key, to_agent, from_agent, accept)` | Accept\u002Fdeny contact request |\n| `list_contacts(project_key, agent_name)` | List contact links |\n| `set_contact_policy(project_key, agent_name, policy)` | Set open\u002Fauto\u002Fcontacts_only\u002Fblock_all |\n\n## Resources (Fast Reads)\n\nUse resources for quick, non-mutating reads:\n\n```\nresource:\u002F\u002Finbox\u002F{agent}?project=\u003Cpath>&limit=20&include_bodies=true\nresource:\u002F\u002Fthread\u002F{thread_id}?project=\u003Cpath>&include_bodies=true\nresource:\u002F\u002Fmessage\u002F{id}?project=\u003Cpath>\nresource:\u002F\u002Ffile_reservations\u002F{slug}?active_only=true\nresource:\u002F\u002Fproject\u002F{slug}\nresource:\u002F\u002Fprojects\nresource:\u002F\u002Fagents\u002F{project_key}\n```\n\n## Search Syntax (FTS5)\n\n```\n\"exact phrase\"\nprefix*\nterm1 AND term2\nterm1 OR term2\nsubject:login\nbody:\"api key\"\n(auth OR login) AND NOT admin\n```\n\nExample: `search_messages(project_key, '\"auth module\" AND error NOT legacy')`\n\n## Web UI Features\n\nBrowse at `http:\u002F\u002F127.0.0.1:8765\u002Fmail`:\n\n- **Unified inbox** across all projects\n- **Per-project search** with FTS5\n- **Thread viewer** with markdown rendering\n- **File reservations** browser\n- **Human Overseer**: Send high-priority messages to agents from the web UI\n- **Related Projects Discovery**: AI-powered suggestions for linking repos\n\n### Human Overseer\n\nSend direct messages to agents with automatic preamble:\n- Messages marked as `high` importance\n- Bypasses contact policies\n- Agents are instructed to pause current work, complete request, then resume\n\n## Static Mailbox Export\n\nExport projects to portable, read-only bundles for auditors, stakeholders, or archives:\n\n```bash\n# Interactive wizard (recommended)\nuv run python -m mcp_agent_mail.cli share wizard\n\n# Manual export\nuv run python -m mcp_agent_mail.cli share export --output .\u002Fbundle\n\n# With signing\nuv run python -m mcp_agent_mail.cli share export \\\n  --output .\u002Fbundle \\\n  --signing-key .\u002Fkeys\u002Fsigning.key\n\n# Preview locally\nuv run python -m mcp_agent_mail.cli share preview .\u002Fbundle\n```\n\n### Export Features\n- Ed25519 cryptographic signing\n- Age encryption for confidential distribution\n- Scrub presets: `standard` (removes secrets) or `strict` (redacts bodies)\n- Deploy to GitHub Pages or Cloudflare Pages via wizard\n\n## Disaster Recovery\n\n```bash\n# Save current state\nuv run python -m mcp_agent_mail.cli archive save --label nightly\n\n# List restore points\nuv run python -m mcp_agent_mail.cli archive list --json\n\n# Restore after disaster\nuv run python -m mcp_agent_mail.cli archive restore \u003Cfile>.zip --force\n```\n\n## Mailbox Health (Doctor)\n\n```bash\n# Run diagnostics\nuv run python -m mcp_agent_mail.cli doctor check\n\n# Preview repairs\nuv run python -m mcp_agent_mail.cli doctor repair --dry-run\n\n# Apply repairs (creates backup first)\nuv run python -m mcp_agent_mail.cli doctor repair\n```\n\nChecks: stale locks, database integrity, orphaned records, FTS sync, expired reservations.\n\n## Common Pitfalls\n\n| Error | Fix |\n|-------|-----|\n| \"sender_name not registered\" | Call `register_agent` or `macro_start_session` first |\n| \"FILE_RESERVATION_CONFLICT\" | Wait for expiry, coordinate, or use non-exclusive |\n| \"CONTACT_BLOCKED\" | Use `request_contact` and wait for approval |\n| Empty inbox | Check `since_ts`, `urgent_only`, verify agent name matches exactly |\n\n## Installation\n\n```bash\n# One-liner (recommended)\ncurl -fsSL \"https:\u002F\u002Fraw.githubusercontent.com\u002FDicklesworthstone\u002Fmcp_agent_mail\u002Fmain\u002Fscripts\u002Finstall.sh?$(date +%s)\" | bash -s -- --yes\n\n# Custom port\ncurl -fsSL ... | bash -s -- --port 9000 --yes\n\n# Change port after installation\nuv run python -m mcp_agent_mail.cli config set-port 9000\n```\n\n## Key Environment Variables\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `STORAGE_ROOT` | `~\u002F.mcp_agent_mail_git_mailbox_repo` | Root for repos and SQLite DB |\n| `HTTP_PORT` | `8765` | Server port |\n| `HTTP_BEARER_TOKEN` | — | Static bearer token for auth |\n| `LLM_ENABLED` | `true` | Enable LLM for summaries\u002Fdiscovery |\n| `CONTACT_ENFORCEMENT_ENABLED` | `true` | Enforce contact policy |\n\n## Docker\n\n```bash\ndocker build -t mcp-agent-mail .\ndocker run --rm -p 8765:8765 \\\n  -e HTTP_HOST=0.0.0.0 \\\n  -v agent_mail_data:\u002Fdata \\\n  mcp-agent-mail\n```\n\n## Integration with Flywheel\n\n| Tool | Integration |\n|------|-------------|\n| **NTM** | Agent panes coordinate via mail, dashboard shows inbox |\n| **BV** | Task IDs become thread IDs, robot flags inform task selection |\n| **CASS** | Search mail threads across sessions |\n| **CM** | Extract procedural memory from mail archives |\n| **DCG** | Mail notifies agents of blocked commands |\n| **RU** | Coordinate multi-repo updates via cross-project mail |\n","# MCP Agent Mail\n\nA mail-like coordination layer for coding agents exposed as an HTTP-only FastMCP server. Provides memorable identities, inbox\u002Foutbox, file reservation leases, contact policies, searchable message history, and Human Overseer messaging. Backed by Git (human-auditable artifacts) and SQLite (fast queries with FTS5).\n\n## Why This Exists\n\nWithout coordination, multiple agents:\n- Overwrite each other's edits or panic on unexpected diffs\n- Miss critical context from parallel workstreams\n- Require humans to relay messages between tools\n\nAgent Mail solves this with:\n- Memorable identities (adjective+noun names like \"GreenCastle\")\n- Advisory file reservations to signal editing intent\n- Threaded messaging with importance levels and acknowledgments\n- Pre-commit guard to enforce reservations at commit time\n- Human Overseer for direct human-to-agent communication\n\n## Starting the Server\n\n```bash\n# Quickest way (alias added during install)\nam\n\n# Or manually\ncd ~\u002Fprojects\u002Fmcp_agent_mail\n.\u002Fscripts\u002Frun_server_with_token.sh\n```\n\nDefault: `http:\u002F\u002F127.0.0.1:8765`\nWeb UI for humans: `http:\u002F\u002F127.0.0.1:8765\u002Fmail`\n\n## Core Concepts\n\n### Projects\nEach working directory (absolute path) is a project. Agents in the same directory share a project namespace. Use the same `project_key` for agents that need to coordinate.\n\n### Agent Identity\nAgents register with adjective+noun names (GreenCastle, BlueLake). Names are unique per project, memorable, and appear in inboxes, commit logs, and the web UI.\n\n### File Reservations (Leases)\nAdvisory locks on file paths or globs. Before editing files, reserve them to signal intent. Other agents see the reservation and can choose different work. The optional pre-commit guard blocks commits that conflict with others' exclusive reservations.\n\n### Contact Policies\nPer-agent policies control who can message whom:\n\n| Policy | Behavior |\n|--------|----------|\n| `open` | Accept any message in the project |\n| `auto` (default) | Allow if shared context exists (same thread, overlapping reservations, recent contact) |\n| `contacts_only` | Require explicit contact approval first |\n| `block_all` | Reject all new contacts |\n\n### Messages\nGitHub-Flavored Markdown with threading, importance levels (`low`, `normal`, `high`, `urgent`), and optional acknowledgment requirements. Images are auto-converted to WebP.\n\n## Essential Workflow\n\n### 1. Start Session (One-Call Bootstrap)\n\n```\nmacro_start_session(\n  human_key=\"\u002Fabs\u002Fpath\u002Fto\u002Fproject\",\n  program=\"claude-code\",\n  model=\"opus-4.5\",\n  task_description=\"Implementing auth module\"\n)\n```\n\nReturns: `{project, agent, file_reservations, inbox}`\n\nThis single call: ensures project exists, registers your identity, optionally reserves files, fetches your inbox.\n\n### 2. Reserve Files Before Editing\n\n```\nfile_reservation_paths(\n  project_key=\"\u002Fabs\u002Fpath\u002Fto\u002Fproject\",\n  agent_name=\"GreenCastle\",\n  paths=[\"src\u002Fauth\u002F**\u002F*.ts\", \"src\u002Fmiddleware\u002Fauth.ts\"],\n  ttl_seconds=3600,\n  exclusive=true,\n  reason=\"bd-123\"\n)\n```\n\nReturns: `{granted: [...], conflicts: [...]}`\n\nConflicts are reported but reservations are still granted. Check conflicts and coordinate if needed.\n\n### 3. Announce Your Work\n\n```\nsend_message(\n  project_key=\"\u002Fabs\u002Fpath\u002Fto\u002Fproject\",\n  sender_name=\"GreenCastle\",\n  to=[\"BlueLake\"],\n  subject=\"[bd-123] Starting auth refactor\",\n  body_md=\"Reserving src\u002Fauth\u002F**. Will update session handling.\",\n  thread_id=\"bd-123\",\n  importance=\"normal\",\n  ack_required=true\n)\n```\n\n### 4. Check Inbox Periodically\n\n```\nfetch_inbox(\n  project_key=\"\u002Fabs\u002Fpath\u002Fto\u002Fproject\",\n  agent_name=\"GreenCastle\",\n  limit=20,\n  urgent_only=false,\n  include_bodies=true\n)\n```\n\nOr use resources for fast reads:\n```\nresource:\u002F\u002Finbox\u002FGreenCastle?project=\u002Fabs\u002Fpath&limit=20&include_bodies=true\n```\n\n### 5. Release Reservations When Done\n\n```\nrelease_file_reservations(\n  project_key=\"\u002Fabs\u002Fpath\u002Fto\u002Fproject\",\n  agent_name=\"GreenCastle\"\n)\n```\n\n## The Four Macros\n\nPrefer macros for speed and smaller models. Use granular tools when you need fine control.\n\n| Macro | Purpose |\n|-------|---------|\n| `macro_start_session` | Bootstrap: ensure project → register agent → optional file reservations → fetch inbox |\n| `macro_prepare_thread` | Join existing conversation: register → summarize thread → fetch inbox context |\n| `macro_file_reservation_cycle` | Reserve files, do work, optionally auto-release when done |\n| `macro_contact_handshake` | Request contact permission, optionally auto-accept, send welcome message |\n\n## Beads Integration (bd-### Workflow)\n\nWhen using Beads for task management, keep identifiers aligned:\n\n```\n1. Pick ready work:     bd ready --json → choose bd-123\n2. Reserve files:       file_reservation_paths(..., reason=\"bd-123\")\n3. Announce start:      send_message(..., thread_id=\"bd-123\", subject=\"[bd-123] Starting...\")\n4. Work and update:     Reply in thread with progress\n5. Complete:            bd close bd-123\n                        release_file_reservations(...)\n                        send_message(..., subject=\"[bd-123] Completed\")\n```\n\nUse `bd-###` as:\n- Mail `thread_id`\n- Message subject prefix `[bd-###]`\n- File reservation `reason`\n- Commit message reference\n\n## Beads Viewer (bv) Integration\n\nUse bv's robot flags for intelligent task selection:\n\n| Flag | Output | Use Case |\n|------|--------|----------|\n| `bv --robot-insights` | PageRank, critical path, cycles | \"What's most impactful?\" |\n| `bv --robot-plan` | Parallel tracks, unblocks | \"What can run in parallel?\" |\n| `bv --robot-priority` | Recommendations with confidence | \"What should I work on next?\" |\n| `bv --robot-diff --diff-since \u003Cref>` | Changes since commit\u002Fdate | \"What changed?\" |\n\n**Rule of thumb:** Use `bd` for task operations, use `bv` for task intelligence.\n\n## Cross-Project Coordination\n\nFor frontend\u002Fbackend or multi-repo projects:\n\n**Option A: Shared project_key**\nBoth repos use the same `project_key`. Agents coordinate automatically.\n\n**Option B: Separate projects with contact links**\n```\n# Backend agent requests contact with frontend agent\nrequest_contact(\n  project_key=\"\u002Fabs\u002Fpath\u002Fbackend\",\n  from_agent=\"GreenCastle\",\n  to_agent=\"BlueLake\",\n  to_project=\"\u002Fabs\u002Fpath\u002Ffrontend\",\n  reason=\"API contract coordination\"\n)\n\n# Frontend agent accepts\nrespond_contact(\n  project_key=\"\u002Fabs\u002Fpath\u002Ffrontend\",\n  to_agent=\"BlueLake\",\n  from_agent=\"GreenCastle\",\n  accept=true\n)\n```\n\n## Pre-Commit Guard\n\nInstall the guard to block commits that conflict with others' exclusive reservations:\n\n```\ninstall_precommit_guard(\n  project_key=\"\u002Fabs\u002Fpath\u002Fto\u002Fproject\",\n  code_repo_path=\"\u002Fabs\u002Fpath\u002Fto\u002Fproject\"\n)\n```\n\n### Guard Features\n- **Composition-safe**: Chain-runner preserves existing hooks in `hooks.d\u002F`\n- **Rename-aware**: Checks both old and new paths for renames\u002Fmoves\n- **NUL-safe**: Handles paths with special characters\n- **Git-native matching**: Uses Git wildmatch pathspec semantics\n\nSet `AGENT_NAME` environment variable so the guard knows who you are.\n\nBypass in emergencies: `AGENT_MAIL_BYPASS=1 git commit ...`\n\n## Tools Reference\n\n### Project & Identity\n\n| Tool | Purpose |\n|------|---------|\n| `ensure_project(human_key)` | Create\u002Fensure project exists |\n| `register_agent(project_key, program, model, name?, task_description?)` | Register identity |\n| `whois(project_key, agent_name)` | Get agent profile with recent commits |\n| `create_agent_identity(project_key, program, model)` | Always create new unique agent |\n\n### Messaging\n\n| Tool | Purpose |\n|------|---------|\n| `send_message(project_key, sender, to, subject, body_md, ...)` | Send message |\n| `reply_message(project_key, message_id, sender, body_md)` | Reply (preserves thread) |\n| `fetch_inbox(project_key, agent, limit?, since_ts?, urgent_only?)` | Get messages |\n| `mark_message_read(project_key, agent, message_id)` | Mark as read |\n| `acknowledge_message(project_key, agent, message_id)` | Acknowledge receipt |\n| `search_messages(project_key, query)` | FTS5 search |\n| `summarize_thread(project_key, thread_id)` | Extract key points and actions |\n\n### File Reservations\n\n| Tool | Purpose |\n|------|---------|\n| `file_reservation_paths(project_key, agent, paths, ttl?, exclusive?)` | Reserve files |\n| `release_file_reservations(project_key, agent, paths?)` | Release reservations |\n| `renew_file_reservations(project_key, agent, extend_seconds?)` | Extend TTL |\n| `force_release_file_reservation(project_key, agent, reservation_id)` | Clear stale reservation |\n\n### Contact Management\n\n| Tool | Purpose |\n|------|---------|\n| `request_contact(project_key, from_agent, to_agent, reason?)` | Request permission to message |\n| `respond_contact(project_key, to_agent, from_agent, accept)` | Accept\u002Fdeny contact request |\n| `list_contacts(project_key, agent_name)` | List contact links |\n| `set_contact_policy(project_key, agent_name, policy)` | Set open\u002Fauto\u002Fcontacts_only\u002Fblock_all |\n\n## Resources (Fast Reads)\n\nUse resources for quick, non-mutating reads:\n\n```\nresource:\u002F\u002Finbox\u002F{agent}?project=\u003Cpath>&limit=20&include_bodies=true\nresource:\u002F\u002Fthread\u002F{thread_id}?project=\u003Cpath>&include_bodies=true\nresource:\u002F\u002Fmessage\u002F{id}?project=\u003Cpath>\nresource:\u002F\u002Ffile_reservations\u002F{slug}?active_only=true\nresource:\u002F\u002Fproject\u002F{slug}\nresource:\u002F\u002Fprojects\nresource:\u002F\u002Fagents\u002F{project_key}\n```\n\n## Search Syntax (FTS5)\n\n```\n\"exact phrase\"\nprefix*\nterm1 AND term2\nterm1 OR term2\nsubject:login\nbody:\"api key\"\n(auth OR login) AND NOT admin\n```\n\nExample: `search_messages(project_key, '\"auth module\" AND error NOT legacy')`\n\n## Web UI Features\n\nBrowse at `http:\u002F\u002F127.0.0.1:8765\u002Fmail`:\n\n- **Unified inbox** across all projects\n- **Per-project search** with FTS5\n- **Thread viewer** with markdown rendering\n- **File reservations** browser\n- **Human Overseer**: Send high-priority messages to agents from the web UI\n- **Related Projects Discovery**: AI-powered suggestions for linking repos\n\n### Human Overseer\n\nSend direct messages to agents with automatic preamble:\n- Messages marked as `high` importance\n- Bypasses contact policies\n- Agents are instructed to pause current work, complete request, then resume\n\n## Static Mailbox Export\n\nExport projects to portable, read-only bundles for auditors, stakeholders, or archives:\n\n```bash\n# Interactive wizard (recommended)\nuv run python -m mcp_agent_mail.cli share wizard\n\n# Manual export\nuv run python -m mcp_agent_mail.cli share export --output .\u002Fbundle\n\n# With signing\nuv run python -m mcp_agent_mail.cli share export \\\n  --output .\u002Fbundle \\\n  --signing-key .\u002Fkeys\u002Fsigning.key\n\n# Preview locally\nuv run python -m mcp_agent_mail.cli share preview .\u002Fbundle\n```\n\n### Export Features\n- Ed25519 cryptographic signing\n- Age encryption for confidential distribution\n- Scrub presets: `standard` (removes secrets) or `strict` (redacts bodies)\n- Deploy to GitHub Pages or Cloudflare Pages via wizard\n\n## Disaster Recovery\n\n```bash\n# Save current state\nuv run python -m mcp_agent_mail.cli archive save --label nightly\n\n# List restore points\nuv run python -m mcp_agent_mail.cli archive list --json\n\n# Restore after disaster\nuv run python -m mcp_agent_mail.cli archive restore \u003Cfile>.zip --force\n```\n\n## Mailbox Health (Doctor)\n\n```bash\n# Run diagnostics\nuv run python -m mcp_agent_mail.cli doctor check\n\n# Preview repairs\nuv run python -m mcp_agent_mail.cli doctor repair --dry-run\n\n# Apply repairs (creates backup first)\nuv run python -m mcp_agent_mail.cli doctor repair\n```\n\nChecks: stale locks, database integrity, orphaned records, FTS sync, expired reservations.\n\n## Common Pitfalls\n\n| Error | Fix |\n|-------|-----|\n| \"sender_name not registered\" | Call `register_agent` or `macro_start_session` first |\n| \"FILE_RESERVATION_CONFLICT\" | Wait for expiry, coordinate, or use non-exclusive |\n| \"CONTACT_BLOCKED\" | Use `request_contact` and wait for approval |\n| Empty inbox | Check `since_ts`, `urgent_only`, verify agent name matches exactly |\n\n## Installation\n\n```bash\n# One-liner (recommended)\ncurl -fsSL \"https:\u002F\u002Fraw.githubusercontent.com\u002FDicklesworthstone\u002Fmcp_agent_mail\u002Fmain\u002Fscripts\u002Finstall.sh?$(date +%s)\" | bash -s -- --yes\n\n# Custom port\ncurl -fsSL ... | bash -s -- --port 9000 --yes\n\n# Change port after installation\nuv run python -m mcp_agent_mail.cli config set-port 9000\n```\n\n## Key Environment Variables\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `STORAGE_ROOT` | `~\u002F.mcp_agent_mail_git_mailbox_repo` | Root for repos and SQLite DB |\n| `HTTP_PORT` | `8765` | Server port |\n| `HTTP_BEARER_TOKEN` | — | Static bearer token for auth |\n| `LLM_ENABLED` | `true` | Enable LLM for summaries\u002Fdiscovery |\n| `CONTACT_ENFORCEMENT_ENABLED` | `true` | Enforce contact policy |\n\n## Docker\n\n```bash\ndocker build -t mcp-agent-mail .\ndocker run --rm -p 8765:8765 \\\n  -e HTTP_HOST=0.0.0.0 \\\n  -v agent_mail_data:\u002Fdata \\\n  mcp-agent-mail\n```\n\n## Integration with Flywheel\n\n| Tool | Integration |\n|------|-------------|\n| **NTM** | Agent panes coordinate via mail, dashboard shows inbox |\n| **BV** | Task IDs become thread IDs, robot flags inform task selection |\n| **CASS** | Search mail threads across sessions |\n| **CM** | Extract procedural memory from mail archives |\n| **DCG** | Mail notifies agents of blocked commands |\n| **RU** | Coordinate multi-repo updates via cross-project mail |\n",{"name":5,"description":7},"main","f2ec4b3b9133d34eeaf9b38e4b0a97e8e5705a7f","benchmarks\u002Ffinal\u002Fskills\u002Fasset1__Dicklesworthstone--agent-mail",0,"https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard","https:\u002F\u002Fgithub.com\u002FJSGforever","2026-08-29 18:27:56",{"source":8,"skillName":5,"commands":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add JSGforever\u002Fskillguard --skill agent-mail",{"tool":56,"command":57},"bunx","bunx skills add JSGforever\u002Fskillguard --skill agent-mail",{"tool":59,"command":60},"pnpm","pnpm dlx skills add JSGforever\u002Fskillguard --skill agent-mail","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__Dicklesworthstone--agent-mail\u002FSKILL.md",true,[],[65,92,103,130,149,169],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":38},"01M71HY2SNXBA9Q00WZDTZQ31Z","skillguard-codex-scanner","Hybrid deterministic+LLM agent-skill security scanner. Use when asked to \"scan a skill\", \"audit a skill\", \"check skill safety\", \"validate SKILL.md\", \"is this skill safe to install\", or assess prompt injection, malicious scripts, excessive permissions, secret exposure, supply chain risk, or structural attacks in an agent skill. Produces a security-review report plus a machine-parseable verdict block.","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fsrc\u002Fskillguard\u002Fstatic_scanner\u002Fskillguard-codex-scanner\u002FSKILL.md",[],[72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91],"scanner","skillguard codex scanner","skillguard","codex","chain","skill security","security-review","review report","structural","secret","prompt injection","security scanner","when","review","malicious","permissions","exposure","audit","scripts","safe",{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":96,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":38},"01M71HY0SPKTT3S27BC2HPAC5M","data-exfiltrator","Analyzes data files","MIT","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Fsmoke-one-skill\u002Fasset1__cisco-ai-defense--data-exfiltrator\u002FSKILL.md",[],[100,101,102],"data","data exfiltrator","files",{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":38},"01M71HXVS9EMN44BGDW215FZ72","real-time-collaboration-engine","Build real-time collaborative editing with WebSockets, OT\u002FCRDT conflict resolution, and presence awareness. Implements cursor tracking, optimistic updates, and offline sync. Use for collaborative editors, whiteboards, video editing. Activate on \"real-time collaboration\", \"WebSocket sync\", \"multiplayer editing\", \"CRDT\", \"presence awareness\". NOT for simple chat, request-response APIs, or single-user apps.","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__curiositech--real-time-collaboration-engine\u002FSKILL.md",[],[110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129],"time","real time collaboration engine","real time collaboration","collaboration","engine","real time","Video","reliability","video editing","performance","conflict resolution","presence","access","apps","updates","Bash","activate","optimizer","react","streaming",{"skillNo":131,"name":132,"nameZh":6,"description":133,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":134,"categories":135,"keywords":136,"publishedAt":38},"01M71HXP6CTY4KFN0QVMMN0V7J","react-performance-optimizer","Optimize React apps for 60fps performance. Implements memoization, virtualization, code splitting, bundle optimization. Use for slow renders, large lists, bundle bloat. Activate on \"React performance\", \"slow render\", \"useMemo\", \"bundle size\", \"virtualization\". NOT for backend optimization, non-React frameworks, or premature optimization.","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__curiositech--react-performance-optimizer\u002FSKILL.md",[],[119,137,127,128,138,139,140,141,142,143,110,144,145,123,125,146,126,129,147,148],"react performance optimizer","react performance","performance optimizer","app","nextjs","expert","re","render","2025","code","router","strategies",{"skillNo":150,"name":151,"nameZh":6,"description":152,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":153,"categories":154,"keywords":155,"publishedAt":38},"01M71HXH7QXSQB4QTDZ7SP7YXQ","llm-streaming-response-handler","Build production LLM streaming UIs with Server-Sent Events, real-time token display, cancellation, error recovery. Handles OpenAI\u002FAnthropic\u002FClaude streaming APIs. Use for chatbots, AI assistants, real-time text generation. Activate on \"LLM streaming\", \"SSE\", \"token stream\", \"chat UI\", \"real-time AI\". NOT for batch processing, non-streaming APIs, or WebSocket bidirectional chat.","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__curiositech--llm-streaming-response-handler\u002FSKILL.md",[],[156,129,157,158,159,160,119,110,161,162,163,125,126,127,164,128,165,166,167,168],"llm streaming response handler","handler","error","processing","retry","chat ui","error recovery","critical","batch","display","text","server","read",{"skillNo":170,"name":171,"nameZh":6,"description":172,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":173,"categories":174,"keywords":175,"publishedAt":38},"01M71HXCB0E1YRKYW1Y8T0Y106","github-actions-pipeline-builder","Build production CI\u002FCD pipelines with GitHub Actions. Implements matrix builds, caching, deployments, testing, security scanning. Use for automated testing, deployments, release workflows. Activate on \"GitHub Actions\", \"CI\u002FCD\", \"workflow\", \"deployment pipeline\", \"automated testing\". NOT for Jenkins\u002FCircleCI, manual deployments, or non-GitHub repositories.","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__curiositech--github-actions-pipeline-builder\u002FSKILL.md",[],[176,177,178,179,180,181,182,117,142,183,184,36,126,148,185,168,186,187,188,34],"github actions pipeline builder","actions","github actions","pipeline builder","github","builder","pipeline","testing","ci","run","release","write","edit"]