BuilderIO/agent-native / templates/analytics/.builder/skills/slack
slack
VerifiedSearch Slack messages and read channel history across your workspaces. Use this skill when the user asks about Slack conversations, channel messages, or internal communications.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 2.9 KB |
SKILL.md
View on GitHub---
name: slack
description: >
Search Slack messages and read channel history across your workspaces.
Use this skill when the user asks about Slack conversations, channel messages, or internal communications.
---
# Slack Integration
## Connection
- **Base URL**: `https://slack.com/api/`
- **Auth**: `Authorization: Bearer $SLACK_BOT_TOKEN` (or `$SLACK_BOT_TOKEN_2` for secondary workspace)
- **Credentials**: `SLACK_BOT_TOKEN` (primary), `SLACK_BOT_TOKEN_2` (secondary workspace)
- **Caching**: 2-minute in-memory cache, max 200 entries; separate user/bot caches
## Server Lib
- **File**: `server/lib/slack.ts`
### Exported Functions
| Function | Description |
| ---------------------------------------------------------- | -------------------------------------------- |
| `getTeamInfo(workspace)` | Get workspace info |
| `listChannels(workspace)` | List channels (paginated, first page cached) |
| `getChannelHistory(workspace, channelId, limit?, cursor?)` | Channel message history |
| `searchMessages(workspace, query, count?)` | Search messages |
| `getUserInfo(workspace, userId)` | Get user info (cached per user) |
| `getBotInfo(workspace, botId)` | Get bot info (cached) |
| `resolveUsers(workspace, userIds, messages?)` | Batch resolve user names |
## Agent Action
Use `slack-messages` for agent-facing Slack reads. Do not call
`/api/slack/*` directly from the agent.
| Mode | Args | Description |
| --------------- | ---------------------------------------------------- | ---------------------- |
| `team` | `workspace` | Get workspace info |
| `channels` | `workspace` | List channels |
| `history` | `workspace`, `channel`, `limit`, `cursor` | Read channel history |
| `multi-history` | `workspace`, `channels`, `names`, `limit`, `cursors` | Read multiple channels |
| `search` | `workspace`, `query` | Search messages |
## Key Patterns & Gotchas
- Two workspaces supported via workspace parameter ("primary" / "secondary")
- `getChannelHistory` auto-joins channels on "not_in_channel" error, then retries — requires `channels:join` scope
- If auto-join fails, throws a detailed message explaining how to invite the bot
- `searchMessages` may require user token; bot token tried first
- `listChannels` paginates via cursor; only first page is cached
- `getUserInfo` resolves bots via `getBotInfo` when needed
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |