openclaw-messaging
Send messages, system events, and agent notifications through the openclaw CLI. Use when an agent needs to notify a user (Telegram, Slack, Discord), trigger another agent, broadcast updates, send system events, or coordinate agent-to-agent communication via swarmmail. Covers all three messaging layers - external channels, agent invocation, and internal swarmmail.
What this skill does
# OpenClaw Messaging Three messaging layers, from user-facing to agent-internal. ## 1. System Events (Most Common for Agents) Notify the active agent session (Grimlock) of state changes, completions, or discoveries. ```bash # Immediate delivery — agent processes NOW openclaw system event --mode now --text "Deployed atproto-agents to prod. CF Worker live at agents.joelhooks.com" # Batched — delivered on next heartbeat (default 15m) openclaw system event --text "Non-urgent: test suite passing, 47/47 green" # Wait for agent response openclaw system event --mode now --text "Need decision: use D1 or KV for session state?" --expect-final --json ``` **When to use:** After shipping to main, completing a task, discovering something important, or needing a decision routed through the system agent. ## 2. Direct Messages (External Channels) Send to Telegram, Slack, Discord, WhatsApp, Signal, and 12+ other channels. ### Send ```bash # Telegram (most common) openclaw message send --channel telegram --target @joelhooks -m "Build complete, PR ready for review" # Telegram with chat ID openclaw message send --channel telegram --target 123456789 -m "Deployment finished" # Slack openclaw message send --channel slack --target "#dev-ops" -m "CI green, merging to main" # With media attachment openclaw message send --channel telegram --target @joelhooks -m "Architecture diagram" --media ./diagram.png # Silent (no notification sound, Telegram only) openclaw message send --channel telegram --target @joelhooks -m "FYI: background job done" --silent # Dry run (preview without sending) openclaw message send --channel telegram --target @joelhooks -m "test" --dry-run ``` ### Broadcast Same message to multiple targets: ```bash openclaw message broadcast --channel telegram --targets @joelhooks 123456789 -m "System maintenance in 5 min" ``` ### Read Fetch recent messages from a conversation: ```bash openclaw message read --channel telegram --target @joelhooks --limit 10 --json openclaw message read --channel slack --target "#general" --limit 5 ``` ### React / Edit / Delete ```bash openclaw message react --channel slack --target "#dev" --message-id 1234 --emoji thumbsup openclaw message edit --channel telegram --target 123456789 --message-id 42 -m "Updated text" openclaw message delete --channel telegram --target 123456789 --message-id 42 ``` ## 3. Agent Invocation Trigger an agent turn and optionally deliver the response to a channel. ```bash # Trigger agent, get response in terminal openclaw agent -m "Summarize today's PRs" --json # Trigger specific named agent openclaw agent --agent ops -m "Check deployment status" # Trigger agent AND deliver reply to Telegram openclaw agent -m "Generate status report" --deliver --reply-channel telegram --reply-to @joelhooks # With thinking level openclaw agent -m "Analyze error logs" --thinking high # Target existing session openclaw agent --session-id abc123 -m "Continue from where we left off" ``` ## 4. Swarmmail (Agent-to-Agent) Internal message queue for coordinating between swarm workers. Available as MCP tools within agent sessions. ``` swarmmail_init — Start mail session (call once at session start) swarmmail_send — Send message to another agent swarmmail_inbox — Check incoming messages swarmmail_reserve — Lock files for exclusive editing swarmmail_release — Release file locks swarmmail_ack — Acknowledge message receipt swarmmail_health — Check session health ``` Swarmmail is for inter-agent coordination only. For user-facing notifications, use `openclaw message send` or `openclaw system event`. ## 5. Directory Lookups Find targets before sending: ```bash openclaw directory self --channel telegram # Your bot's info openclaw directory peers --channel telegram # Known contacts openclaw directory groups --channel telegram # Groups the bot is in openclaw directory peers --channel slack # Slack users ``` ## Quick Reference | Goal | Command | |------|---------| | Notify system agent (urgent) | `openclaw system event --mode now --text "..."` | | Notify system agent (can wait) | `openclaw system event --text "..."` | | Message user on Telegram | `openclaw message send --channel telegram --target @user -m "..."` | | Message Slack channel | `openclaw message send --channel slack --target "#channel" -m "..."` | | Send to multiple people | `openclaw message broadcast --channel telegram --targets @a @b -m "..."` | | Trigger agent + deliver reply | `openclaw agent -m "..." --deliver --reply-channel telegram --reply-to @user` | | Read conversation history | `openclaw message read --channel telegram --target @user --limit 10` | | Preview without sending | Add `--dry-run` to any send/broadcast command | | JSON output for scripting | Add `--json` to any command | ## Channel Support Telegram, Slack, Discord, WhatsApp, Signal, iMessage, Google Chat, MS Teams, Mattermost, Matrix, Nostr, Feishu, Nextcloud Talk, BlueBubbles, Line, Zalo, Tlon. Check active channels: `openclaw channels status` ## Common Patterns ### Post-deploy notification ```bash openclaw system event --mode now --text "Shipped v1.2.3 to prod. Changes: new auth flow, fixed rate limiter." openclaw message send --channel telegram --target @joelhooks -m "v1.2.3 live on prod" ``` ### Agent handoff with context ```bash openclaw system event --mode now --text "Completed Phase 1 encryption. All tests passing. Ready for Phase 2 HITL gate review." ``` ### Swarm worker status update ```bash openclaw system event --mode now --text "Worker task-42 complete: implemented D1 schema migration. 12 tests added." ```
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.