Read Slack channel messages, thread conversations, and messages from links using bot token authentication. Use when users need to (1) Read recent messages from a channel, (2) Read all messages in a thread, (3) Read messages starting from a specific message link.
View on GitHubFebruary 4, 2026
Select agents to install to:
npx add-skill https://github.com/treenod-IDQ/treenod-market/blob/main/plugins/util/skills/slack/SKILL.md -a claude-code --skill slackInstallation paths:
.claude/skills/slack/# Slack API Skill Read Slack messages using Python scripts and the uv package manager. ## Prerequisites **Required:** - uv package manager installed - Environment variable set: - `SLACK_BOT_TOKEN` - Bot User OAuth Token (starts with `xoxb-`) **Bot Setup:** - Bot must be invited to channels before it can read messages: `/invite @BotName` **Execution pattern:** ```bash uv run --no-project --with requests python scripts/slack_api.py [command] [args] ``` ## Available Operations ### Read Messages (Auto-Detect) ```bash uv run --no-project --with requests python scripts/slack_api.py read <input> --limit 100 ``` Automatically detects input type: - Channel ID (e.g., `G4CDARPJ7`) → reads channel messages - Channel:Thread (e.g., `G4CDARPJ7:1770094319.078559`) → reads thread - Message link (e.g., `https://...slack.com/archives/...`) → reads from that message **Arguments:** - `input` - Channel ID, channel:thread_ts, or message link - `--limit` - Number of messages (default: 100) - `--format` - Output format: `json` (default) or `text` - `-o` - Output file path **Examples:** ```bash # Read channel uv run --no-project --with requests python scripts/slack_api.py read G4CDARPJ7 --limit 50 # Read thread (channel:thread_ts format) uv run --no-project --with requests python scripts/slack_api.py read G4CDARPJ7:1770094319.078559 # Read from message link uv run --no-project --with requests python scripts/slack_api.py read "https://treenod.slack.com/archives/G4CDARPJ7/p1770094319078559" ``` **Workflow example:** ```bash # 1. Read channel, find thread_ts in output uv run --no-project --with requests python scripts/slack_api.py read G4CDARPJ7 --limit 10 # Output shows: "thread_ts": "1770094319.078559", "reply_count": 14 # 2. Read that thread using channel:thread_ts format uv run --no-project --with requests python scripts/slack_api.py read G4CDARPJ7:1770094319.078559 ``` ### Read Channel Messages ```bash uv run --no-project --with requests python scripts/slack_api.py chann