slack-reader/SKILL.md
Read Slack messages by permalink URL. Fetches message content, thread replies, channel context, and resolves user mentions. Read-only access to Slack workspace data.
npx skillsauth add supercorks/agent-skills slack-readerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Read Slack messages and context by permalink URL. This skill provides read-only access to Slack workspace data.
Fetches Slack message content given a message permalink, including:
@slack/web-api package: npm install @slack/web-apiexport SLACK_BOT_TOKEN=xoxb-your-bot-token
For accessing multiple Slack workspaces, use SLACK_WORKSPACES with a JSON object mapping aliases to tokens:
export SLACK_WORKSPACES='{"personal": "xoxb-personal-token", "company": "xoxb-company-token"}'
Workspace aliases are used for:
--workspace flag to explicitly select a workspaceYour Slack app must have these OAuth scopes:
| Scope | Purpose |
|-------|---------|
| channels:history | Read messages from public channels |
| channels:read | View basic channel info |
| groups:history | Read messages from private channels |
| groups:read | View basic private channel info |
| im:history | Read direct messages |
| im:read | View basic DM info |
| mpim:history | Read group direct messages |
| mpim:read | View basic group DM info |
| users:read | View user profiles |
{
"display_information": {
"name": "Slack Reader",
"description": "Read-only access for agent skills",
"background_color": "#0040ff"
},
"features": {
"bot_user": {
"display_name": "Slack Reader",
"always_online": false
}
},
"oauth_config": {
"scopes": {
"user": [
"canvases:read",
"channels:history",
"channels:read",
"groups:history",
"groups:read",
"im:history",
"im:read",
"mpim:history",
"mpim:read",
"users:read"
],
"bot": [
"canvases:read",
"channels:history",
"channels:read",
"groups:history",
"groups:read",
"im:history",
"im:read",
"mpim:history",
"mpim:read",
"users:read"
]
}
},
"settings": {
"org_deploy_enabled": false,
"socket_mode_enabled": false,
"token_rotation_enabled": false
}
}
xoxp-)User tokens (
xoxp-) can access all channels you have access to. Bot tokens (xoxb-) require the bot to be invited to each channel.
xoxp- for user, xoxb- for bot)Read a Slack message by permalink URL.
node scripts/read-message.js --url <permalink> [options]
Options:
| Option | Description |
|--------|-------------|
| --url <url> | Slack message permalink (required) |
| --workspace <name> | Workspace alias when using multiple workspaces |
| --context-size <n> | Number of messages before/after for context (default: 5) |
| --help | Show help message |
Workspace Resolution:
When multiple workspaces are configured, the script resolves which token to use:
--workspace is specified, uses that workspace's tokenSLACK_WORKSPACE_AMBIGUOUS error listing available workspacesExample with workspace flag:
node scripts/read-message.js \
--url "https://myworkspace.slack.com/archives/C0123456789/p1706554800123456" \
--workspace company
Output:
JSON object containing:
metadata: URL, fetch timestamp, workspacechannel: Channel info (name, topic, purpose)targetMessage: The requested message with resolved mentionsthread: Thread replies if the message is a thread parentcontext: Messages before and after the targetMessage permalinks follow this format:
https://workspace.slack.com/archives/CHANNEL_ID/pTIMESTAMP
Where:
workspace - Your Slack workspace subdomainCHANNEL_ID - Channel ID (e.g., C01234567)TIMESTAMP - Message timestamp without decimal (e.g., p1706554800123456)You can get a message permalink by clicking the message menu (⋮) and selecting "Copy link".
node scripts/read-message.js \
--url "https://myworkspace.slack.com/archives/C0123456789/p1706554800123456"
node scripts/read-message.js \
--url "https://myworkspace.slack.com/archives/C0123456789/p1706554800123456" \
--context-size 10
node scripts/read-message.js --url "https://..." | jq '.targetMessage'
| Code | Description | Remediation |
|------|-------------|-------------|
| SLACK_SDK_MISSING | @slack/web-api package is not installed | Run: npm install @slack/web-api |
| SLACK_AUTH_MISSING | No tokens configured | Set SLACK_BOT_TOKEN or SLACK_WORKSPACES |
| SLACK_AUTH_INVALID | Token is invalid or expired | Verify token and app installation |
| SLACK_WORKSPACES_INVALID | SLACK_WORKSPACES is not valid JSON | Check JSON format |
| SLACK_WORKSPACE_NOT_FOUND | Specified workspace alias not found | Use --workspace with valid alias |
| SLACK_WORKSPACE_AMBIGUOUS | Multiple workspaces configured but none specified | Use --workspace flag to select |
| SLACK_URL_INVALID | Invalid message URL format | Use a valid permalink |
| SLACK_CHANNEL_NOT_FOUND | Channel not found or bot lacks access | Invite bot to channel |
| SLACK_MESSAGE_NOT_FOUND | Message not found | Verify URL and message exists |
| SLACK_PERMISSION_DENIED | Missing required scopes | Add required OAuth scopes |
| SLACK_RATE_LIMITED | API rate limit exceeded | Wait and retry |
| SLACK_API_ERROR | General API error | Check error details |
Slack API client wrapper with methods for:
createClient(WebClient, token) - Create authenticated clientgetMessage(client, channelId, ts) - Fetch a single messagegetThreadReplies(client, channelId, threadTs) - Fetch thread repliesgetChannelContext(client, channelId, ts, size) - Fetch surrounding messagesgetChannelInfo(client, channelId) - Fetch channel metadataresolveUsers(client, userIds) - Fetch user profilesParse Slack permalinks to extract workspace, channel ID, and message timestamp.
Format API responses into consistent output structure.
Structured error handling with codes and remediation guidance.
Multi-workspace token management:
parseWorkspaces(envValue) - Parse SLACK_WORKSPACES JSONgetConfiguredWorkspaces() - Get all configured workspacesresolveWorkspace(workspaces, specifiedName, urlDomain) - Resolve which workspace to usegetAvailableWorkspaces() - Get comma-separated list of workspace aliasestools
Read local coding-agent thread/session history for Codex, Codex CLI, Copilot CLI, Copilot Chat local VS Code threads, and Claude Code. Use when asked to find, inventory, summarize, search, or inspect local agent conversations, session subjects, transcript files, or agent thread storage.
tools
Operate Google Workspace (Drive, Gmail, Calendar, Sheets, Docs, Slides, Chat, Admin, Forms, Tasks…) via the @googleworkspace/cli (`gws`) Rust CLI distributed on npm. Use for any read/write task across Workspace APIs — list/search/upload Drive files (incl. shared drives), send/read mail, manage calendar events, sheets cell ops, etc.
development
Find useful Agent Skills in curated public skill repositories for a user query. Searches official and community skill repos, ranks matching SKILL.md files, and recommends candidates with source trust notes.
tools
Use Browserbase and the browse CLI for browser automation, Fetch/Search API work, authenticated remote browsing, UI QA, debugging, tracing, and Browserbase platform or Functions workflows with multi-account support.