Communication Platform Workflows
Overview
Use this umbrella for agent-operated communication channels: email mailboxes, social platforms, group chats, direct messages, and platform-specific command-line/API clients. The shared workflow is: identify the account/channel, verify read access cheaply, protect credentials, confirm intent before writes, then return a verifiable result.
When to use
- Reading, searching, replying to, forwarding, or sending email through a mailbox CLI.
- Posting, searching, reading, liking, replying, quoting, DMing, or uploading media on X/Twitter.
- Yuanbao (元宝) group operations, @mentions, member lookup, group info, and DMs.
- Any communication platform where a Hermes gateway reply is itself the outbound message.
Universal workflow
- Resolve the platform, account, workspace/channel/group, and target identity.
- Verify prerequisites without exposing secrets: version/help command, auth status, account list, group/member lookup, or a cheap read.
- For write actions, confirm the target and exact action unless the user already provided unambiguous text and target.
- Use structured output where available and preserve stable identifiers: message ID, post ID, URL, group code, user ID, or command output.
- Never print credential files, tokens, auth headers, or inline secrets into the conversation.
Platform subsections
Himalaya email CLI
Use the external himalaya CLI for mailbox operations over IMAP/SMTP/Notmuch/Sendmail. This is separate from Hermes' email gateway adapter. Prefer --output json for reads and pipe templates for non-interactive sends/replies. For Gmail, configure folder aliases with folder.aliases.sent = "[Gmail]/Sent Mail"; the old singular folder.alias form can make SMTP delivery succeed while save-to-Sent fails, causing duplicate emails if retried. See references/himalaya-cli.md, references/himalaya-configuration.md, and references/himalaya-message-composition.md.
X/Twitter via xurl
Use official xurl first for X API work. It supports shortcuts and raw v2 endpoints, with OAuth2 tokens stored under ~/.xurl. Never read or print ~/.xurl, never use verbose mode in agent sessions, and never pass inline secret flags. Check xurl auth status, then a cheap read like xurl whoami before writes. See references/xurl-cli.md. The older x-cli/xitter backend is preserved only as a fallback reference in references/xurl-xitter.md.
Yuanbao gateway groups and DMs
In Yuanbao group chats, the assistant's normal final reply is the outbound group message. Include @nickname after resolving the exact nickname with the Yuanbao member lookup tool; do not claim the agent cannot mention users. Use the Yuanbao DM tool for private messages, not generic send_message. See references/yuanbao-gateway.md.
Common pitfalls
- Retrying a communication write after a partial-success error without checking whether the first send/post already happened.
- Reading credential stores (
~/.xurl, provider .env files, app-password files) into LLM context.
- Using an interactive editor flow when a piped/template send would be deterministic.
- Guessing social handles, group nicknames, or email recipients instead of resolving them.
- Forgetting that a gateway final reply may already be the message being sent.
Verification checklist
1---2name: communication-platform-workflows3description: Use when operating communication platforms from Hermes through CLIs, gateway tools, or platform APIs, including email mailboxes, X/Twitter, Yuanbao groups/DMs, posting, reading, searching, replying, mentions, and safe credential handling.4license: MIT5---67# Communication Platform Workflows89## Overview10Use this umbrella for agent-operated communication channels: email mailboxes, social platforms, group chats, direct messages, and platform-specific command-line/API clients. The shared workflow is: identify the account/channel, verify read access cheaply, protect credentials, confirm intent before writes, then return a verifiable result.1112## When to use13- Reading, searching, replying to, forwarding, or sending email through a mailbox CLI.14- Posting, searching, reading, liking, replying, quoting, DMing, or uploading media on X/Twitter.15- Yuanbao (元宝) group operations, @mentions, member lookup, group info, and DMs.16- Any communication platform where a Hermes gateway reply is itself the outbound message.1718## Universal workflow191. Resolve the platform, account, workspace/channel/group, and target identity.202. Verify prerequisites without exposing secrets: version/help command, auth status, account list, group/member lookup, or a cheap read.213. For write actions, confirm the target and exact action unless the user already provided unambiguous text and target.224. Use structured output where available and preserve stable identifiers: message ID, post ID, URL, group code, user ID, or command output.235. Never print credential files, tokens, auth headers, or inline secrets into the conversation.2425## Platform subsections2627### Himalaya email CLI28Use the external `himalaya` CLI for mailbox operations over IMAP/SMTP/Notmuch/Sendmail. This is separate from Hermes' email gateway adapter. Prefer `--output json` for reads and pipe templates for non-interactive sends/replies. For Gmail, configure folder aliases with `folder.aliases.sent = "[Gmail]/Sent Mail"`; the old singular `folder.alias` form can make SMTP delivery succeed while save-to-Sent fails, causing duplicate emails if retried. See `references/himalaya-cli.md`, `references/himalaya-configuration.md`, and `references/himalaya-message-composition.md`.2930### X/Twitter via xurl31Use official `xurl` first for X API work. It supports shortcuts and raw v2 endpoints, with OAuth2 tokens stored under `~/.xurl`. Never read or print `~/.xurl`, never use verbose mode in agent sessions, and never pass inline secret flags. Check `xurl auth status`, then a cheap read like `xurl whoami` before writes. See `references/xurl-cli.md`. The older `x-cli`/xitter backend is preserved only as a fallback reference in `references/xurl-xitter.md`.3233### Yuanbao gateway groups and DMs34In Yuanbao group chats, the assistant's normal final reply is the outbound group message. Include `@nickname` after resolving the exact nickname with the Yuanbao member lookup tool; do not claim the agent cannot mention users. Use the Yuanbao DM tool for private messages, not generic send_message. See `references/yuanbao-gateway.md`.3536## Common pitfalls371. Retrying a communication write after a partial-success error without checking whether the first send/post already happened.382. Reading credential stores (`~/.xurl`, provider `.env` files, app-password files) into LLM context.393. Using an interactive editor flow when a piped/template send would be deterministic.404. Guessing social handles, group nicknames, or email recipients instead of resolving them.415. Forgetting that a gateway final reply may already be the message being sent.4243## Verification checklist44- [ ] Platform/account/channel identified.45- [ ] Prerequisites and auth checked without exposing secrets.46- [ ] Target identity resolved before mention/DM/write.47- [ ] Write actions have explicit target and content.48- [ ] Result includes an ID, URL, or command/tool status.