Slack API for sending messages, reading channels, and managing conversations. Use this skill to post messages, upload files, and interact with Slack workspaces.
/plugin marketplace add vm0-ai/api0/plugin install api0@api0This skill inherits all available tools. When active, it can use any tool Claude has access to.
Send messages, read channels, and interact with Slack workspaces.
export SLACK_BOT_TOKEN=xoxb-your-bot-token
chat:write - Send messageschannels:read - List public channelschannels:history - Read channel messagesfiles:write - Upload filesusers:read - List usersreactions:write - Add reactionsxoxb-...)Important: When using
$VARin a command that pipes to another command, wrap the command containing$VARinbash -c '...'. Due to a Claude Code bug, environment variables are silently cleared when pipes are used directly.bash -c 'curl -s "https://api.example.com" -H "Authorization: Bearer $API_KEY"' | jq .
bash -c 'curl -s -H "Authorization: Bearer $SLACK_BOT_TOKEN" '"'"'https://slack.com/api/conversations.list?types=public_channel'"'"'' | jq '.channels[] | {id, name}
Docs: https://docs.slack.dev/reference/methods/conversations.list
bash -c 'curl -s -H "Authorization: Bearer $SLACK_BOT_TOKEN" '"'"'https://slack.com/api/conversations.history?channel=C1234567890&limit=10'"'"'' | jq '.messages[] | {ts, user, text}
Docs: https://docs.slack.dev/reference/methods/conversations.history
curl -s -X POST 'https://slack.com/api/chat.postMessage' -H "Authorization: Bearer $SLACK_BOT_TOKEN" -H 'Content-Type: application/json' -d @- << 'EOF'
{"channel":"C1234567890","text":"Hello, World"}
EOF
Docs: https://docs.slack.dev/reference/methods/chat.postmessage
curl -s -X POST 'https://slack.com/api/chat.postMessage' -H "Authorization: Bearer $SLACK_BOT_TOKEN" -H 'Content-Type: application/json' -d @- << 'EOF'
{
"channel": "C1234567890",
"text": "Notification",
"blocks": [
{
"type": "section",
"text": {"type": "mrkdwn", "text": "*Alert:* Something happened"}
},
{
"type": "section",
"fields": [
{"type": "mrkdwn", "text": "*Status:*\nActive"},
{"type": "mrkdwn", "text": "*Priority:*\nHigh"}
]
}
]
}
EOF
Block Kit Builder: https://app.slack.com/block-kit-builder
curl -s -X POST 'https://slack.com/api/chat.postMessage' -H "Authorization: Bearer $SLACK_BOT_TOKEN" -H 'Content-Type: application/json' -d @- << 'EOF'
{"channel":"C1234567890","thread_ts":"1234567890.123456","text":"Thread reply"}
EOF
curl -s -X POST 'https://slack.com/api/chat.update' -H "Authorization: Bearer $SLACK_BOT_TOKEN" -H 'Content-Type: application/json' -d @- << 'EOF'
{"channel":"C1234567890","ts":"1234567890.123456","text":"Updated message"}
EOF
Docs: https://docs.slack.dev/reference/methods/chat.update
curl -s -X POST 'https://slack.com/api/chat.delete' -H "Authorization: Bearer $SLACK_BOT_TOKEN" -H 'Content-Type: application/json' -d @- << 'EOF'
{"channel":"C1234567890","ts":"1234567890.123456"}
EOF
bash -c 'curl -s -H "Authorization: Bearer $SLACK_BOT_TOKEN" '"'"'https://slack.com/api/users.list'"'"'' | jq '.members[] | {id, name, real_name}
Docs: https://docs.slack.dev/reference/methods/users.list
curl -s -H "Authorization: Bearer $SLACK_BOT_TOKEN" 'https://slack.com/api/users.lookupByEmail?email=user@example.com'
Docs: https://docs.slack.dev/reference/methods/users.lookupbyemail
curl -s -X POST 'https://slack.com/api/files.upload' -H "Authorization: Bearer $SLACK_BOT_TOKEN" -F 'channels=C1234567890' -F 'file=@/path/to/file.txt' -F 'title=My File'
Docs: https://docs.slack.dev/reference/methods/files.upload
curl -s -X POST 'https://slack.com/api/reactions.add' -H "Authorization: Bearer $SLACK_BOT_TOKEN" -H 'Content-Type: application/json' -d @- << 'EOF'
{"channel":"C1234567890","timestamp":"1234567890.123456","name":"thumbsup"}
EOF
Docs: https://docs.slack.dev/reference/methods/reactions.add
| Syntax | Result |
|---|---|
*bold* | bold |
_italic_ | italic |
~strike~ | |
`code` | code |
<URL|text> | hyperlink |
<@U123> | @mention user |
<#C123> | #channel link |
See: https://docs.slack.dev/apis/web-api/rate-limits