slack-automation
Slack channel management, message fetching, searching, and AI categorization. Use this skill when searching Slack channels, reading messages, creating channels, or categorizing message content. Triggers on Slack-related operations, channel search, message history, or internal communications analysis.
What this skill does
# Slack Automation
## Overview
Interact with Slack workspaces for channel management, message reading, and content analysis. All operations are read-only unless creating channels.
## Quick Decision Tree
```
What do you need?
│
├── Search for channels by name
│ └── references/search.md
│ └── Script: scripts/slack_search.py search
│
├── Read messages from a channel
│ └── references/fetch-news.md
│ └── Script: scripts/fetch_slack_news.py
│
├── Create a new channel
│ └── references/create-channel.md
│ └── Script: scripts/create_slack_channel.py
│
└── Categorize/analyze messages
└── references/categorize.md
└── Script: scripts/categorize_slack_messages.py
```
## Environment Setup
```bash
# Required in .env
SLACK_BOT_TOKEN=xoxb-your-bot-token
```
## Required Bot Scopes
| Scope | Purpose |
|-------|---------|
| `channels:read` | List public channels |
| `channels:history` | Read public channel messages |
| `groups:read` | List private channels |
| `groups:history` | Read private channel messages |
| `channels:manage` | Create channels |
## Common Usage
### Search Channels
```bash
python scripts/slack_search.py search "internal" --limit 10
```
### Read Channel Messages
```bash
python scripts/slack_search.py read "internal-client" --days 7
```
### Create Channel
```bash
python scripts/create_slack_channel.py "project-alpha" --private
```
## Channel Naming Pattern
For client channels: `internal-{client-name}`
- e.g., `internal-microsoft`, `internal-acme-corp`
## Cost
Free - Slack API has no per-request cost. Rate limited to ~50 requests/minute.
## Security Notes
### Credential Handling
- Store `SLACK_BOT_TOKEN` in `.env` file (never commit to git)
- Bot tokens start with `xoxb-` - never expose in logs or output
- Rotate tokens via Slack App settings if compromised
- Use environment variables, not hardcoded values
### Data Privacy
- Messages may contain sensitive internal communications
- Avoid storing message content in persistent logs
- Use message links/IDs for references instead of copying content
- Consider data retention policies for exported messages
- User profiles include PII (names, emails, profile photos)
### Access Scopes
- Request minimum required scopes for your use case:
- `channels:read` - List public channels (read-only)
- `channels:history` - Read public channel messages (read-only)
- `groups:read` - List private channels bot is in (read-only)
- `groups:history` - Read private channel messages (read-only)
- `channels:manage` - Create channels (write access)
- Bot can only access channels it has been invited to
- Review scopes at: Slack App Settings > OAuth & Permissions
### Compliance Considerations
- **Audit Logging**: Slack Enterprise Grid provides audit logs for compliance
- **Message Retention**: Follow your organization's data retention policies
- **GDPR**: Message content may contain EU user PII
- **eDiscovery**: Exported messages may be subject to legal holds
- **Internal Communications**: Treat Slack data as confidential
- **Channel Privacy**: Private channel access requires explicit invitation
## Troubleshooting
### Common Issues
#### Issue: Channel not found
**Symptoms:** "channel_not_found" error when reading or posting
**Cause:** Invalid channel ID, bot not in channel, or private channel
**Solution:**
- Verify channel ID is correct (use `slack_search.py search`)
- Invite the bot to the channel (`/invite @botname`)
- Check if channel is private - bot needs explicit invitation
- Ensure channel hasn't been archived or deleted
#### Issue: Missing permissions / scope errors
**Symptoms:** "missing_scope" or "not_allowed_token_type" error
**Cause:** Bot token missing required OAuth scopes
**Solution:**
- Go to Slack App Settings > OAuth & Permissions
- Add required scopes: `channels:read`, `channels:history`, etc.
- Reinstall the app to workspace after adding scopes
- Verify using the correct bot token (starts with `xoxb-`)
#### Issue: Token expired or invalid
**Symptoms:** "invalid_auth" or "token_revoked" error
**Cause:** OAuth token expired, revoked, or incorrectly configured
**Solution:**
- Reauthorize the bot in Slack App settings
- Regenerate the bot token if revoked
- Check `.env` for correct `SLACK_BOT_TOKEN` value
- Verify no whitespace or special characters in token
#### Issue: Rate limited
**Symptoms:** "ratelimited" error or 429 status code
**Cause:** Too many API requests in short period
**Solution:**
- Add delays between requests (1-2 seconds)
- Reduce batch size for bulk operations
- Implement exponential backoff on retries
- Slack allows ~50 requests/minute for most endpoints
#### Issue: Private channel access denied
**Symptoms:** Can't read private channel despite having scopes
**Cause:** Bot not added to the private channel
**Solution:**
- Have a channel member invite the bot: `/invite @botname`
- Ensure `groups:read` and `groups:history` scopes are added
- Verify bot has been reinstalled after adding scopes
## Resources
- **references/search.md** - Channel search and message reading
- **references/fetch-news.md** - Fetch news from channels
- **references/create-channel.md** - Create new channels
- **references/categorize.md** - AI message categorization
## Integration Patterns
### Slack to Newsletter
**Skills:** slack-automation → content-generation
**Use case:** Summarize internal news for weekly newsletter
**Flow:**
1. Fetch messages from news/announcements channels
2. Categorize and filter relevant content
3. Generate formatted newsletter section via content-generation
### Slack and Meeting Context
**Skills:** slack-automation → transcript-search
**Use case:** Find related meetings when researching Slack discussions
**Flow:**
1. Search Slack for client name or topic
2. Extract date ranges and participant names
3. Search transcript-search for related meeting recordings
### Slack Reports to Drive
**Skills:** slack-automation → google-workspace
**Use case:** Archive categorized Slack summaries to Google Drive
**Flow:**
1. Fetch and categorize messages from internal channels
2. Generate formatted report document
3. Upload to Google Drive via google-workspace
Related in Productivity
gitea-workflow
IncludedOrchestrate agile development workflows for Gitea repositories using the tea CLI. Use when working with Gitea-hosted repos and asking to 'run the workflow', 'continue working', 'what's next', 'complete the task cycle', 'start my day', 'end the sprint', 'implement the next task', or wanting guided step-by-step development assistance. Keywords: workflow, orchestrate, agile, task cycle, sprint, daily, implement, review, PR, standup, retrospective, gitea, tea.
microsoft-graph-gateway
IncludedRoute Microsoft Graph work in this workspace. Use when users want to read or write Outlook mail, calendar events, contacts, OneDrive or SharePoint files, Teams, Planner, To Do, users, groups, directory data, or arbitrary Microsoft Graph endpoints from VS Code. Prefer WorkIQ for common read scenarios. Use Microsoft Graph for write actions and gap-read scenarios that need exact Graph properties, filters, permissions, or endpoints.
copilotkit
IncludedUse when building with CopilotKit — setup, development, integrations, debugging, upgrading, or contributing. Routes to the appropriate specialized skill based on the task.
wordly-wisdom
IncludedProvides calibrated decision analysis using Charlie Munger-style multiple mental models, inversion, incentive mapping, circle-of-competence checks, misjudgment audits, second-order effects, and forecast updates. Use when the user asks for an oracle take, a hard call, a decision memo, a premortem, an outside view, a red-team, a sanity-check, what am I missing, think this through, or wants a strategy, hire, investment, plan, product, partnership, or major life choice analysed. Avoid for simple factual lookups or time-sensitive legal, medical, or market questions without fresh evidence.
swain-session
IncludedSession management and project status dashboard. Owns the full session lifecycle (start/work/close/resume), focus lane, bookmarks, worktree detection, and tab naming. Also serves as the project status dashboard — shows active epics, progress, actionable next steps, blocked items, tasks, GitHub issues, and recommendations. Worktree creation is deferred to swain-do task dispatch (SPEC-195). Triggers on: 'session', 'status', 'what's next', 'dashboard', 'overview', 'where are we', 'what should I work on', 'show me priorities', 'bookmark', 'focus on', 'session info'.
gandi
IncludedComprehensive Gandi domain registrar integration for domain and DNS management. Register and manage domains, create/update/delete DNS records (A, AAAA, CNAME, MX, TXT, SRV, and more), configure email forwarding and aliases, check SSL certificate status, create DNS snapshots for safe rollback, bulk update zone files, and monitor domain expiration. Supports multi-domain management, zone file import/export, and automated DNS backups. Includes both read-only and destructive operations with safety controls.