Features
- Direct messages: Chat with Claudio in DMs
- Channel mentions:
@Claudioin any channel - Slash commands:
/claudio,/claudio-new,/claudio-status - Thread responses: Replies appear in threads to keep channels clean
- Socket Mode: No public URL required
- User authorization: Control who can use the bot
- Session persistence: Maintains conversation context
Slack App setup
Create a new Slack app
- Go to api.slack.com/apps
- Click Create New App → From scratch
- Name:
Claudio(or your preference) - Choose your workspace
Configure OAuth & Permissions
Navigate to OAuth & Permissions and add these Bot Token Scopes:
| Scope | Purpose |
|---|---|
app_mentions:read | Read when bot is mentioned |
channels:history | Read public channel messages |
channels:read | View public channels |
chat:write | Send messages |
commands | Enable slash commands |
groups:history | Read private channel messages |
groups:read | View private channels |
im:history | Read direct messages |
im:read | View DMs |
im:write | Send DMs |
users:read | View user information |
Enable Socket Mode
- Go to Socket Mode in the sidebar
- Toggle Enable Socket Mode to ON
- When prompted to create an App-Level Token:
- Token Name:
socket-mode - Scope:
connections:write - Click Generate
- Token Name:
- Copy the token starting with
xapp-(this is yourSLACK_APP_TOKEN)
Configure Event Subscriptions
- Go to Event Subscriptions
- Toggle Enable Events to ON
- Under Subscribe to bot events, add:
app_mention- When users mention the botmessage.im- When users send DMs
Create Slash Commands (optional)
Go to Slash Commands and create these commands:
| Command | Description | Usage Hint |
|---|---|---|
/claudio | Send a message to Claudio | [your message] |
/claudio-new | Start a new conversation | |
/claudio-status | Show bot status |
For Socket Mode, you don’t need to provide a Request URL. Leave it blank.
Local configuration
Get your Slack user ID
In Slack:
- Click your profile picture
- Select Profile
- Click More (three dots)
- Select Copy member ID
U1234567890.Configuration
Security settings
.env
Claude CLI settings
.env
Usage
Direct messages
Open a DM with the Claudio bot and send a message:channels/slack/bot.py:683-711
Mentions in channels
First, invite the bot to the channel:channels/slack/bot.py:658-680
Slash commands
Use slash commands from anywhere in Slack:| Command | Example |
|---|---|
/claudio | /claudio show me today's standup notes |
/claudio-new | /claudio-new (starts fresh conversation) |
/claudio-status | /claudio-status (shows bot health) |
channels/slack/bot.py:716-784
Session management
The bot maintains separate conversation sessions per user. Each message continues the previous context:/claudio-new to start a fresh conversation.
Source: channels/slack/bot.py:502-503
Security features
User authorization
Control access by settingSLACK_ALLOWED_USER_IDS:
channels/slack/bot.py:74-78
Rate limiting
Prevents spam by limiting requests per user:- Default: 10 requests per 60 seconds
- Configurable via
RATE_LIMIT_REQUESTSandRATE_LIMIT_WINDOW - Users exceeding limits see: “⏱️ Rate limit excedido”
channels/slack/bot.py:170-190
Command timeout
Long-running commands are automatically terminated afterCOMMAND_TIMEOUT seconds (default: 1800).
Source: channels/slack/bot.py:66
Stopping the bot
Troubleshooting
”Socket Mode is not enabled”
Ensure Socket Mode is enabled in your Slack App settings under Socket Mode.”not_allowed_token_type”
You’re using the wrong token. Verify:SLACK_BOT_TOKENstarts withxoxb-SLACK_APP_TOKENstarts withxapp-
”missing_scope”
- Go to OAuth & Permissions in your Slack App
- Add the missing scope under Bot Token Scopes
- Reinstall the app to your workspace
Bot doesn’t respond to mentions
- Verify
app_mentionevent is subscribed in Event Subscriptions - Invite the bot to the channel:
/invite @Claudio - Check bot logs for errors
Bot doesn’t respond to DMs
- Verify
message.imevent is subscribed in Event Subscriptions - Reinstall the app if you just added this event
- Check bot logs for authorization errors
Bot not appearing in workspace
- Go to Install App in Slack App settings
- Click Reinstall to Workspace
- Search for the bot by name in Slack
Architecture
subprocess.run() with pipe input for better MCP compatibility.
Source: channels/slack/bot.py:543-653
Differences from Telegram
| Feature | Telegram | Slack |
|---|---|---|
| Connection | Long polling | Socket Mode (WebSocket) |
| Library | python-telegram-bot | slack-bolt |
| Threading | asyncio | Python threading |
| Execution | -p flag | Pipe input |
| Replies | Same chat | Threaded responses |
| Commands | /start, /help | /claudio, /claudio-status |