This skill should be used when the user asks to read Slack messages, search Slack conversations, look up Slack users, check DMs, or interact with the Slack workspace in any way.
Instal·la
npx skillscat add chnlich/charlie-bot/slack Instal·la des del registre de SkillsCat.
Slack
Read messages, search conversations, and look up users in the configured Slack workspace using the Slack Web API.
Configuration
- Token location:
~/.charliebot/credentials.yamlunderslack.user_token - Token type: User OAuth Token (
xoxp-) - Available scopes:
channels:history,channels:read,groups:history,groups:read,im:history,im:read,mpim:history,search:read,users:read
API Reference
All requests require the header: -H "Authorization: Bearer TOKEN"
Read the token from ~/.charliebot/credentials.yaml (section slack, key user_token) before making any API calls:
python3 -c "import yaml,os;c=yaml.safe_load(open(os.path.expanduser('~/.charliebot/credentials.yaml')));print(c['slack']['user_token'])"Authentication
GET https://slack.com/api/auth.testUsers
GET https://slack.com/api/users.list?limit=200To find a user, match against real_name, name, and profile.display_name fields (case-insensitive).
Channels
GET https://slack.com/api/conversations.list?types=public_channel,private_channel&limit=200Direct Messages
List all DM conversations:
GET https://slack.com/api/conversations.list?types=im&limit=200Each DM channel has a user field — match it against the target user's ID to find the right channel.
Read Messages
GET https://slack.com/api/conversations.history?channel=CHANNEL_ID&limit=50Use oldest and latest (Unix timestamps) to filter by date range. Use cursor for pagination.
Read Threads
GET https://slack.com/api/conversations.replies?channel=CHANNEL_ID&ts=THREAD_TSSearch Messages
GET https://slack.com/api/search.messages?query=QUERYSupports Slack search modifiers: from:username, in:#channel, before:2026-01-01, after:2026-01-01, has:link, etc.
Important Workarounds
- Do NOT use
conversations.open— it requiresim:writescope which is not available. Instead, list DM conversations withconversations.list?types=imand find the channel by user ID. - Do NOT use
conversations.joinor any write endpoints — only read scopes are available.
Workflow
- Read the token from
~/.charliebot/credentials.yaml(slack.user_token) - If looking up a user, call
users.listfirst to resolve the user ID - If reading DMs, call
conversations.list?types=imto find the DM channel ID by matching the user ID - Call
conversations.historyto fetch messages - Use
python3to parse JSON responses for readability — format output with timestamps, sender names, and message text