Free-text messages route through Agent SDK (Haiku) with 4 Gmail MCP tools (list, search, read, draft).
Safety Controls
Mutex
1 agent query at a time
Timeout
2-minute maximum per query
Circuit Breaker
3 failures in a row disables agent for 10 minutes
Anti-contamination
Skill contamination detection on all agent responses
Auth Guard
Only responds to authorized TELEGRAM_CHAT_ID
Running Manually
cd
~/own/amonic
&&
bun run
"
$HOME
/.claude/plugins/marketplaces/cc-skills/plugins/gmail-commander/scripts/bot.ts"
References
command-reference.md
— All commands with examples
compose-flow.md
— Multi-step compose/reply state machine
display-patterns.md
— Email rendering rules
Post-Change Checklist
YAML frontmatter valid (no colons in description)
Trigger keywords current
Path patterns use $HOME not hardcoded paths