$npx -y skills add chenhg5/agencycli --skill agency-messagingDiscover all agents in the current agency and send/receive async messages between agents and the human owner via the inbox system.
| 1 | # Skill: Agency Messaging |
| 2 | |
| 3 | You can discover every agent in this agency and exchange async messages with them or with the human owner. Messages are non-blocking: the sender continues working immediately, and the recipient reads the message on their next wakeup. |
| 4 | |
| 5 | The agency workspace is at: `$AGENCY_DIR` |
| 6 | |
| 7 | --- |
| 8 | |
| 9 | ## Discover Agents |
| 10 | |
| 11 | ```bash |
| 12 | agencycli --dir $AGENCY_DIR list agents |
| 13 | agencycli --dir $AGENCY_DIR show agent <project> <agent> |
| 14 | ``` |
| 15 | |
| 16 | ### Recipient address format |
| 17 | - **Human owner**: `human` |
| 18 | - **Any agent**: `<project>/<agent>` — e.g. `cc-connect/pm`, `cc-connect/qa-reviewer` |
| 19 | |
| 20 | --- |
| 21 | |
| 22 | ## Send a Message |
| 23 | |
| 24 | ```bash |
| 25 | # Single recipient |
| 26 | agencycli --dir $AGENCY_DIR inbox send \ |
| 27 | --from <your-address> \ |
| 28 | --to <recipient-address> \ |
| 29 | --subject "<subject>" \ |
| 30 | --body "<body>" |
| 31 | |
| 32 | # Group send — repeat --to for multiple recipients |
| 33 | agencycli --dir $AGENCY_DIR inbox send \ |
| 34 | --from cc-connect/pm \ |
| 35 | --to cc-connect/dev-claude --to cc-connect/qa-reviewer --to human \ |
| 36 | --subject "Sprint kick-off" \ |
| 37 | --body "New sprint starts Monday. See backlog for tasks." |
| 38 | ``` |
| 39 | |
| 40 | **Examples:** |
| 41 | |
| 42 | ```bash |
| 43 | # PM → dev-claude: extra context |
| 44 | agencycli --dir $AGENCY_DIR inbox send \ |
| 45 | --from cc-connect/pm --to cc-connect/dev-claude \ |
| 46 | --subject "Issue #205 extra context" \ |
| 47 | --body "Only reproduces with UTF-8 filenames. Reproduce: echo '测试' > test.txt" |
| 48 | |
| 49 | # PM → human: async progress update |
| 50 | agencycli --dir $AGENCY_DIR inbox send \ |
| 51 | --from cc-connect/pm --to human \ |
| 52 | --subject "Backlog updated" \ |
| 53 | --body "Added 3 new issues (P2). No action needed, just FYI." |
| 54 | |
| 55 | # PM → QA: heads-up |
| 56 | agencycli --dir $AGENCY_DIR inbox send \ |
| 57 | --from cc-connect/pm --to cc-connect/qa-reviewer \ |
| 58 | --subject "PR incoming for #205" \ |
| 59 | --body "dev-claude is working on it. Expect a PR within the hour." |
| 60 | ``` |
| 61 | |
| 62 | --- |
| 63 | |
| 64 | ## Reply to a Message |
| 65 | |
| 66 | ```bash |
| 67 | agencycli --dir $AGENCY_DIR inbox reply <msg-id> \ |
| 68 | --from <your-address> \ |
| 69 | --body "<reply text>" |
| 70 | ``` |
| 71 | |
| 72 | --- |
| 73 | |
| 74 | ## Forward a Message |
| 75 | |
| 76 | ```bash |
| 77 | # Forward to a single recipient |
| 78 | agencycli --dir $AGENCY_DIR inbox fwd <msg-id> \ |
| 79 | --from <your-address> \ |
| 80 | --to <recipient-address> |
| 81 | |
| 82 | # Forward to multiple recipients with a note |
| 83 | agencycli --dir $AGENCY_DIR inbox fwd <msg-id> \ |
| 84 | --from cc-connect/pm \ |
| 85 | --to cc-connect/dev-claude --to cc-connect/qa-reviewer \ |
| 86 | --note "Please coordinate on this." |
| 87 | ``` |
| 88 | |
| 89 | The forwarded message includes the original sender, subject, and body. Subject is auto-prefixed with `Fwd:`. |
| 90 | |
| 91 | --- |
| 92 | |
| 93 | ## Read Messages |
| 94 | |
| 95 | ```bash |
| 96 | # Your unread messages (also auto-injected into your wakeup prompt) |
| 97 | agencycli --dir $AGENCY_DIR inbox messages --recipient <your-address> |
| 98 | |
| 99 | # Filter by sender |
| 100 | agencycli --dir $AGENCY_DIR inbox messages --recipient <your-address> --from human |
| 101 | |
| 102 | # All messages including already-read |
| 103 | agencycli --dir $AGENCY_DIR inbox messages --recipient <your-address> --all |
| 104 | |
| 105 | # Show archived messages |
| 106 | agencycli --dir $AGENCY_DIR inbox messages --recipient <your-address> --archived |
| 107 | |
| 108 | # Mark all as read after listing |
| 109 | agencycli --dir $AGENCY_DIR inbox messages --recipient <your-address> --mark-read |
| 110 | ``` |
| 111 | |
| 112 | --- |
| 113 | |
| 114 | ## Per-Message Status Management |
| 115 | |
| 116 | ```bash |
| 117 | # Mark a single message as read |
| 118 | agencycli --dir $AGENCY_DIR inbox read <msg-id> --recipient <your-address> |
| 119 | |
| 120 | # Archive (hides from normal listing, retrievable with --archived) |
| 121 | agencycli --dir $AGENCY_DIR inbox archive <msg-id> --recipient <your-address> |
| 122 | |
| 123 | # Permanently delete |
| 124 | agencycli --dir $AGENCY_DIR inbox delete <msg-id> --recipient <your-address> |
| 125 | agencycli --dir $AGENCY_DIR inbox rm <msg-id> --recipient <your-address> |
| 126 | ``` |
| 127 | |
| 128 | --- |
| 129 | |
| 130 | ## When to Use Messaging vs. Confirm-Request |
| 131 | |
| 132 | | Situation | Use | |
| 133 | |-----------|-----| |
| 134 | | Need human to make a decision before you continue | `task confirm-request` (non-blocking, archived) | |
| 135 | | Sending info or a heads-up, no reply needed immediately | `inbox send` (non-blocking) | |
| 136 | | Coordinating context between agents asynchronously | `inbox send` (non-blocking) | |
| 137 | | Broadcast to multiple participants at once | `inbox send --to A --to B --to C` | |
| 138 | | Forwarding a message to someone else | `inbox fwd` | |
| 139 | | Replying to a message someone sent you | `inbox reply` | |
| 140 | |
| 141 | --- |
| 142 | |
| 143 | ## Common PM Messaging Patterns |
| 144 | |
| 145 | ```bash |
| 146 | # 1. Broadcast sprint kick-off to all agents |
| 147 | agencycli --dir $AGENCY_DIR inbox send \ |
| 148 | --from cc-connect/pm \ |
| 149 | --to cc-connect/dev-claude --to cc-connect/qa-reviewer --to cc-connect/biz-dev \ |
| 150 | --subject "Sprint W14 kick-off" \ |
| 151 | --body "Focus this week: <priorities>. See backlog for assigned tasks." |
| 152 | |
| 153 | # 2. Notify dev of approved task |
| 154 | agencycli --dir $AGENCY_DIR inbox send \ |
| 155 | --from cc-connect/pm --to cc-connect/dev-claude \ |
| 156 | --subject "New task approved: <task-title>" \ |
| 157 | --body "Human confirmed. Priority: P<N>. Key context: <notes>" |
| 158 | |
| 159 | # 3. Escalate stale task to human |
| 160 | agencycli --dir $AGENCY_DIR inbox send \ |
| 161 | --from cc-connect/pm --to human \ |
| 162 | --subject "Task stale: <task-title>" \ |
| 163 | -- |