home / skills / fcakyon / claude-codex-settings / slack-usage

This skill helps you search Slack messages efficiently and retrieve channel history using best practices and rate limit awareness.

npx playbooks add skill fcakyon/claude-codex-settings --skill slack-usage

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
2.4 KB
---
name: slack-usage
description: This skill should be used when user asks to "search Slack for messages", "find Slack messages about X", "get channel history", "look up conversation in Slack", or "find what someone said in Slack".
---

# Slack Usage Best Practices

## Critical Search Rule

**ALWAYS use `mcp__slack__slack_search_messages` first** for message searches. Only use `mcp__slack__slack_get_channel_history` when explicitly asked for recent channel history.

Search is more efficient and finds messages across all channels. Channel history only shows recent messages in one channel.

## Slack API Best Practices

### Rate Limiting

Slack APIs have rate limits (typically 1 request per second for most methods). When making multiple requests:

- Space out bulk operations
- Handle rate limit errors gracefully
- Cache results when possible

### Channel Types

- **Public channels** - Visible to all workspace members
- **Private channels** - Invite-only, prefix with lock icon
- **DMs** - Direct messages between users
- **Group DMs** - Multi-person direct conversations

### Message Formatting

Format mentions and links properly:

- User mention: `<@USER_ID>`
- Channel link: `<#CHANNEL_ID>`
- URL with text: `<https://example.com|link text>`
- Bold: `*text*`
- Code: backticks for inline, triple backticks for blocks

### Threading Best Practices

- Use threads for discussions to keep channels clean
- Reply in thread when responding to specific messages
- Use "Also send to channel" sparingly (only for important updates)
- Thread replies don't trigger channel notifications by default

### Bot vs User Tokens

- **Bot tokens (xoxb-)**: Actions appear as the bot, limited to channels bot is in
- **User tokens (xoxp-)**: Actions appear as user, access to all user's channels
- Search typically requires user token for full workspace access
- Posting messages works with either token type

### Common Workflows

**Finding past discussions:**

1. Search with relevant keywords
2. Filter by channel, user, or date if needed
3. Get thread replies for full context

**Monitoring channels:**

1. Get channel history for recent activity
2. Note message timestamps for threading
3. React or reply as appropriate

## MCP Limitations

This MCP provides read and write access to Slack. Consider:

- Rate limits apply to all operations
- Some admin operations not available
- File uploads have size limits

Overview

This skill helps you find and retrieve Slack conversations quickly and reliably. It prioritizes message search across the workspace and falls back to channel history only when specifically requested. It’s designed for safe, rate-aware access to messages, threads, and metadata using available Slack tokens.

How this skill works

When asked to find messages, the skill runs a workspace-wide search first to locate relevant messages across channels, users, and dates. If you request recent channel history explicitly, it fetches the latest messages from that channel. It returns message text, timestamps, thread replies, and basic metadata while respecting rate limits and token permissions.

When to use it

  • Search Slack for messages about a topic or keyword across the workspace
  • Find what a specific person said in any channel
  • Retrieve recent messages from a single channel when explicitly requested
  • Get thread replies and full context for a message
  • Locate past discussions filtered by date, channel, or user

Best practices

  • Always run the workspace search function first for broad results; use channel history only for recent local context
  • Use a user-level token for full search coverage; a bot token works for channels the bot is in
  • Rate-limit bulk requests (space requests ~1s apart) and implement retry/backoff on rate-limit errors
  • Cache search results when repeated queries are expected to reduce API calls
  • Format mentions, channels, and links using Slack markup when composing messages or references
  • Reply in threads to preserve channel cleanliness and fetch thread replies when you need full context

Example use cases

  • "Find Slack messages about Q2 budget" across all channels and include thread replies
  • "What did Alice say about the deploy on Jan 12?" — search by user and date
  • Retrieve recent history for #ops when troubleshooting an incident
  • Pull the discussion thread for a message so you can quote full context in a ticket
  • Monitor a channel’s recent activity to summarize updates for stakeholders

FAQ

Which API should I use first to find messages?

Always use the workspace-wide search method first; it finds messages across channels more efficiently. Use channel history only when the user specifically asks for recent messages from one channel.

Do I need a user token to search everything?

Yes — user tokens provide broader search access across the workspace. Bot tokens are limited to channels the bot has been invited into.