← ClaudeAtlas

slacklisted

Send messages, search history, and manage channels via Slack's Web API. Use when the user mentions Slack, a channel, a DM, or wants to post to a specific user/group.
AceDataCloud/Skills · ★ 8 · AI & Automation · score 71
Install: claude install-skill AceDataCloud/Skills
There is no first-party Slack CLI fit for daily use, so we drive the [Slack Web API](https://api.slack.com/methods) with `curl + jq`. The user's OAuth bearer token is in `$SLACK_TOKEN`; every call needs it as `Authorization: Bearer $SLACK_TOKEN`. The Slack API ALWAYS returns 200 — check the JSON `ok` field for success. A failed call has `{"ok": false, "error": "<reason>"}`. Surface the `error` value verbatim to the user when it occurs. **Always start with `auth.test`** to confirm the connection works AND to learn what bot user / team you're posting as. Many subsequent calls need the bot's user id (`auth.test` returns `user_id`). ## Recipes ### Verify auth (always run first) ```sh curl -sS -H "Authorization: Bearer $SLACK_TOKEN" \ https://slack.com/api/auth.test # {"ok": true, "team": "...", "team_id": "...", "user": "<bot>", "user_id": "U..."} ``` ### Resolve a channel name to its ID (you'll need this a lot) ```sh curl -sS -H "Authorization: Bearer $SLACK_TOKEN" \ "https://slack.com/api/conversations.list?limit=1000&types=public_channel,private_channel" \ | jq -r --arg name "general" '.channels[] | select(.name == $name) | .id' ``` ### Post a message ```sh curl -sS -X POST https://slack.com/api/chat.postMessage \ -H "Authorization: Bearer $SLACK_TOKEN" \ -H "Content-Type: application/json; charset=utf-8" \ -d "$(jq -nc \ --arg ch "C0123456789" \ --arg text "Deploy complete." \ '{channel:$ch, text:$text}')" ``` ### Reply in a threa