1
0
Fork 0
claude-code-complete-agent/examples/07-messaging/prompt.md
Kjell Tore Guttormsen 0d0b83f98c feat: make examples cumulative with carry-forward chain and capstone
Add three new sections to all 14 examples:
- "Carry Forward": what output feeds into later examples (01-10)
- "The Cumulative Path": alternative prompt building on previous output (02-10)
- "Now Try It Yourself": personalized template with transferable pattern (all)
- "Building On" callout connecting back to previous examples (02-10)

Add Example 14: Build Your Personal Agent - capstone that guides reader
through writing their own CLAUDE.md, creating a personal skill, connecting
a messaging channel, setting up automation, and testing end-to-end.

Update README with cumulative path diagram, two usage modes, and example 14.
Update GETTING-STARTED.md with cross-references to relevant examples.

17 files changed, 703+ lines added. The examples now form a coherent
learning path from "see what it can do" to "build your own agent."

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 21:14:35 +01:00

3.9 KiB

Example 07: Messaging

Capability: Claude Code can send and receive messages via external channels. Native Telegram support arrived in v2.1.80. Other channels use MCP servers.

OpenClaw equivalent: 15+ native channels (WhatsApp, Telegram, Discord, Slack, Signal, iMessage, IRC, Matrix, Teams, and more).

Building on Example 06. You have a polished, reviewed document from the multi-agent cycle. This example shows how to deliver that result to your phone. A pipeline that produces output nobody sees is a pipeline that does not matter.


Architecture Difference

OpenClaw ships with all 15+ channels built in. Claude Code takes an MCP approach: each channel is a separate server you opt into. This means more setup per channel, but also more control over what data leaves your machine.

As of v2.1.80, Telegram is the first native channel in Claude Code. More are expected to follow the same pattern.


Option A: Telegram (Native, v2.1.80+)

Start Claude Code with the Channels flag:

claude --channels

Then in session:

Send a Telegram message to my personal chat that says:
"Claude Code pipeline completed. Check research-output.md for results."

Requires the Telegram plugin configured in .claude/settings.json. The permission relay (v2.1.81) lets you approve tool calls from Telegram directly, without returning to the terminal.


Option B: Slack (via MCP)

Add to .mcp.json:

{
  "mcpServers": {
    "slack": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-slack"],
      "env": {
        "SLACK_BOT_TOKEN": "xoxb-your-token",
        "SLACK_TEAM_ID": "T0123456"
      }
    }
  }
}

Then use the /skills/send-slack-message skill in this repo:

/send-slack-message channel=#general message="Pipeline finished successfully."

What Happens

For Telegram: Claude Code calls the native Channels API to deliver the message. For Slack: Claude Code calls the Slack MCP server, which relays via the Slack API.

Both confirm delivery in the terminal output.


Honest Comparison

If you need 15 channels working out of the box, OpenClaw wins today. Claude Code has Telegram natively and the rest via MCP. The gap is narrowing with each release. For most personal automation needs, Telegram is sufficient.


Carry Forward

You now have a delivery channel. Combined with what came before:

  • Example 08 schedules the pipeline so results arrive automatically
  • Example 10 produces pipeline output that you can deliver via messaging
  • Example 12 expands this into full remote access from your phone

Messaging turns Claude Code from "a tool at my desk" into "an assistant I can reach from anywhere."


The Cumulative Path

If you ran Example 06, you have pipeline-output/research-report/final-summary.md. This prompt delivers it to your phone.

Telegram:

Read pipeline-output/research-report/final-summary.md. Send the first
paragraph as a Telegram message with the note: "Full report saved to
pipeline-output/research-report/. Run /read-report to see the rest."

Slack:

Read pipeline-output/research-report/final-summary.md. Post the first
paragraph to #[your-channel] with a thread reply containing the full
summary. Use the /send-slack-message skill.

After running this, your pipeline has end-to-end delivery. Research goes from web to your phone in one flow.


Now Try It Yourself

Set up the channel that fits your workflow:

Send a [Telegram/Slack/Discord] message to [destination] with:
"[summary of what your pipeline produced]"

The pattern you just learned: read output + format for channel + deliver. Any pipeline step can send a notification. Typical triggers: pipeline completed, error occurred, daily summary ready.

Ideas worth trying:

  • Morning briefing delivered to your phone at 07:00
  • Slack notification when a scheduled report finishes
  • Error alerts when a cron job fails