/agent-slackbot
Interact with Slack workspaces using bot tokens - send messages, read channels, manage reactions
$ npx -y skills add agent-messenger/agent-messenger --skill agent-slackbot --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/agent-slackbot
Context preview
The summary Claude sees to decide when to auto-load this skill.
Interact with Slack workspaces using bot tokens - send messages, read channels, manage reactions
SKILL.md
agent-slackbot.SKILL.mdname: agent-slackbot
description: Interact with Slack workspaces using bot tokens - send messages, read channels, manage reactions
version: 2.36.0
allowed-tools: Bash(agent-slackbot:*)
metadata:
openclaw:
requires:
bins:
- agent-slackbot
install:
- kind: node
package: agent-messenger
bins: [agent-slackbot]Agent SlackBot
A TypeScript CLI tool that enables AI agents and humans to interact with Slack workspaces using bot tokens (xoxb-). Unlike agent-slack which extracts user tokens from the desktop app, agent-slackbot uses standard Slack Bot tokens for server-side and CI/CD integrations.
Key Concepts
Before diving in, a few things about Slack Bot integration:
- **Bot tokens (xoxb-)** — Issued from the Slack App config (api.slack.com/apps). Bots act as the bot user, not as you. Different name, different permissions, different identity.
- **Workspace + Bot hierarchy** — Each workspace can have multiple bot tokens (one per Slack App). The CLI stores bots under their workspace and lets you switch between them.
- **Channel access requires invitation** — Bots must be invited to private channels with `/invite @YourBotName` before they can read or post.
- **Bot scopes are immutable per-token** — Token capabilities are baked in at App creation. Adding a new scope means re-installing the App and refreshing the token.
- **Edit/delete is bot-scoped** — A bot can only edit/delete messages it sent. It cannot modify other users' messages.
- **Real-time events** — Available via the SDK's Socket Mode listener (separate `xapp-` app-level token required), not via the CLI.
Quick Start
# Set your bot token
agent-slackbot auth set xoxb-your-bot-token
# Or set with a custom bot identifier for multi-bot setups
agent-slackbot auth set xoxb-your-bot-token --bot deploy --name "Deploy Bot"
# Verify authentication
agent-slackbot auth status
# Send a message
agent-slackbot message send C0ACZKTDDC0 "Hello from bot!"
# List channels
agent-slackbot channel list
Authentication
Bot Token Setup
agent-slackbot uses Slack Bot tokens (xoxb-) which you get from the Slack App configuration:
# Set bot token (validates against Slack API before saving)
agent-slackbot auth set xoxb-your-bot-token
# Set with a custom bot identifier
agent-slackbot auth set xoxb-your-bot-token --bot deploy --name "Deploy Bot"
# Check auth status
agent-slackbot auth status
# Clear stored credentials
agent-slackbot auth clear
Multi-Bot Management
Store multiple bot tokens and switch between them:
# Add multiple bots
agent-slackbot auth set xoxb-deploy-token --bot deploy --name "Deploy Bot"
agent-slackbot auth set xoxb-alert-token --bot alert --name "Alert Bot"
# List all stored bots
agent-slackbot auth list
# Switch active bot
agent-slackbot auth use deploy
# Use a specific bot for one command (without switching)
agent-slackbot message send C0ACZKTDDC0 "Alert!" --bot alert
# Remove a stored bot
agent-slackbot auth remove deploy
# Disambiguate bots with same ID across workspaces
agent-slackbot auth use T123456/deploy
The `--bot <id>` flag is available on all commands to override the active bot for a single invocation.
For bot token setup (Slack App creation, required scopes, app manifest) and CI/CD environment variables, see [references/authentication.md](references/authentication.md).
Memory
The agent maintains a `~/.config/agent-messenger/MEMORY.md` file as persistent memory across sessions. This is agent-managed — the CLI does not read or write this file. Use the `Read` and `Write` tools to manage your memory file.
Reading Memory
At the **start of every task**, read `~/.config/agent-messenger/MEMORY.md` using the `Read` tool to load any previously discovered workspace IDs, channel IDs, user IDs, and preferences.
- If the file doesn't exist yet, that's fine — proceed without it and create it when you first have useful information to store.
- If the file can't be read (permissions, missing directory), proceed without memory — don't error out.
Writing Memory
After discovering useful information, update `~/.config/agent-messenger/MEMORY.md` using the `Write` tool. Write triggers include:
- After discovering workspace IDs (from `auth status`)
- After discovering useful channel IDs and names (from `channel list`, etc.)
- After discovering user IDs and names (from `user list`, etc.)
- After the user gives you an alias or preference ("call this the alerts bot", "my main workspace is X")
- After setting up bot identifiers (from `auth list`)
When writing, include the **complete file content** — the `Write` tool overwrites the entire file.
What to Store
- Workspace IDs with names
- Channel IDs with names and purpose
- User IDs with display names
- Bot identifiers and their purposes
- User-given aliases ("alerts bot", "deploys channel")
- Any user preference expressed during interaction
What NOT to Store
Never store bot tokens, credentials, or any sensitive data. Never store full message content (just IDs and channel context). Never store file upload contents.
Handling Stale Data
If a memorized ID returns an error (channel not found, user not found), remove it from `MEMORY.md`. Don't blindly trust memorized data — verify when something seems off. Prefer re-listing over using a memorized ID that might be stale.
Format / Example
# Agent Messenger Memory
## Slack Workspaces (Bot)
- `T0ABC1234` — Acme Corp
## Bots (Acme Corp)
- `deploy` — Deploy Bot (active)
- `alert` — Alert Bot
## Channels (Acme Corp)
- `C012ABC` — #general (company-wide announcements)
- `C034DEF` — #engineering (team discussion)
- `C056GHI` — #deploys (CI/CD notifications)
## Users (Acme Corp)
- `U0ABC123` — Alice (engineering lead)
- `U0DEF456` — Bob (backend)
## Aliases
- "deploys" → `C056GHI` (#deploys in Acme Corp)
## Notes
- Deploy Bot is used for CI/CD notifications
- Alert Bot is used for er
Read more
name: agent-slackbot
description: Interact with Slack workspaces using bot tokens - send messages, read channels, manage reactions
version: 2.36.0
allowed-tools: Bash(agent-slackbot:*)
metadata:
openclaw:
requires:
bins:
- agent-slackbot
install:
- kind: node
package: agent-messenger
bins: [agent-slackbot]Agent SlackBot
A TypeScript CLI tool that enables AI agents and humans to interact with Slack workspaces using bot tokens (xoxb-). Unlike agent-slack which extracts user tokens from the desktop app, agent-slackbot uses standard Slack Bot tokens for server-side and CI/CD integrations.
Key Concepts
Before diving in, a few things about Slack Bot integration:
- **Bot tokens (xoxb-)** — Issued from the Slack App config (api.slack.com/apps). Bots act as the bot user, not as you. Different name, different permissions, different identity.
- **Workspace + Bot hierarchy** — Each workspace can have multiple bot tokens (one per Slack App). The CLI stores bots under their workspace and lets you switch between them.
- **Channel access requires invitation** — Bots must be invited to private channels with `/invite @YourBotName` before they can read or post.
- **Bot scopes are immutable per-token** — Token capabilities are baked in at App creation. Adding a new scope means re-installing the App and refreshing the token.
- **Edit/delete is bot-scoped** — A bot can only edit/delete messages it sent. It cannot modify other users' messages.
- **Real-time events** — Available via the SDK's Socket Mode listener (separate `xapp-` app-level token required), not via the CLI.
Quick Start
# Set your bot token agent-slackbot auth set xoxb-your-bot-token # Or set with a custom bot identifier for multi-bot setups agent-slackbot auth set xoxb-your-bot-token --bot deploy --name "Deploy Bot" # Verify authentication agent-slackbot auth status # Send a message agent-slackbot message send C0ACZKTDDC0 "Hello from bot!" # List channels agent-slackbot channel list
Authentication
Bot Token Setup
agent-slackbot uses Slack Bot tokens (xoxb-) which you get from the Slack App configuration:
# Set bot token (validates against Slack API before saving) agent-slackbot auth set xoxb-your-bot-token # Set with a custom bot identifier agent-slackbot auth set xoxb-your-bot-token --bot deploy --name "Deploy Bot" # Check auth status agent-slackbot auth status # Clear stored credentials agent-slackbot auth clear
Multi-Bot Management
Store multiple bot tokens and switch between them:
# Add multiple bots agent-slackbot auth set xoxb-deploy-token --bot deploy --name "Deploy Bot" agent-slackbot auth set xoxb-alert-token --bot alert --name "Alert Bot" # List all stored bots agent-slackbot auth list # Switch active bot agent-slackbot auth use deploy # Use a specific bot for one command (without switching) agent-slackbot message send C0ACZKTDDC0 "Alert!" --bot alert # Remove a stored bot agent-slackbot auth remove deploy # Disambiguate bots with same ID across workspaces agent-slackbot auth use T123456/deploy
The `--bot <id>` flag is available on all commands to override the active bot for a single invocation.
For bot token setup (Slack App creation, required scopes, app manifest) and CI/CD environment variables, see [references/authentication.md](references/authentication.md).
Memory
The agent maintains a `~/.config/agent-messenger/MEMORY.md` file as persistent memory across sessions. This is agent-managed — the CLI does not read or write this file. Use the `Read` and `Write` tools to manage your memory file.
Reading Memory
At the **start of every task**, read `~/.config/agent-messenger/MEMORY.md` using the `Read` tool to load any previously discovered workspace IDs, channel IDs, user IDs, and preferences.
- If the file doesn't exist yet, that's fine — proceed without it and create it when you first have useful information to store.
- If the file can't be read (permissions, missing directory), proceed without memory — don't error out.
Writing Memory
After discovering useful information, update `~/.config/agent-messenger/MEMORY.md` using the `Write` tool. Write triggers include:
- After discovering workspace IDs (from `auth status`)
- After discovering useful channel IDs and names (from `channel list`, etc.)
- After discovering user IDs and names (from `user list`, etc.)
- After the user gives you an alias or preference ("call this the alerts bot", "my main workspace is X")
- After setting up bot identifiers (from `auth list`)
When writing, include the **complete file content** — the `Write` tool overwrites the entire file.
What to Store
- Workspace IDs with names
- Channel IDs with names and purpose
- User IDs with display names
- Bot identifiers and their purposes
- User-given aliases ("alerts bot", "deploys channel")
- Any user preference expressed during interaction
What NOT to Store
Never store bot tokens, credentials, or any sensitive data. Never store full message content (just IDs and channel context). Never store file upload contents.
Handling Stale Data
If a memorized ID returns an error (channel not found, user not found), remove it from `MEMORY.md`. Don't blindly trust memorized data — verify when something seems off. Prefer re-listing over using a memorized ID that might be stale.
Format / Example
# Agent Messenger Memory ## Slack Workspaces (Bot) - `T0ABC1234` — Acme Corp ## Bots (Acme Corp) - `deploy` — Deploy Bot (active) - `alert` — Alert Bot ## Channels (Acme Corp) - `C012ABC` — #general (company-wide announcements) - `C034DEF` — #engineering (team discussion) - `C056GHI` — #deploys (CI/CD notifications) ## Users (Acme Corp) - `U0ABC123` — Alice (engineering lead) - `U0DEF456` — Bob (backend) ## Aliases - "deploys" → `C056GHI` (#deploys in Acme Corp) ## Notes - Deploy Bot is used for CI/CD notifications - Alert Bot is used for er
Your agent messages as you — not as a bot One CLI for Slack, Discord, Teams, Webex, Telegram, WhatsApp, LINE, WeChat, iMessage, Instagram, KakaoTalk, and Channel Talk.
Repo: agent-messenger/agent-messenger
Other skills on agent-messenger.
- /agent-channeltalk
Interact with Channel Talk using extracted desktop app or browser credentials - read chats, send messages, search messages, manage groups
Open skill - /agent-channeltalkbot
Interact with Channel Talk workspaces using API credentials - send messages, read chats, manage groups and bots
Open skill - /agent-discord
Interact with Discord servers - send messages, read channels, manage reactions
Open skill - /agent-discordbot
Interact with Discord servers using bot tokens - send messages, read channels, manage reactions
Open skill - /agent-imessage
Interact with iMessage on a Mac via the imsg tool - send messages, read chats, watch for new messages
Open skill - /agent-instagram
Interact with Instagram DMs - send messages, read conversations, manage accounts
Open skill

