Get the FREE Ultimate OpenClaw Setup Guide →

slack-search

Scanned
npx machina-cli add skill anthropics/knowledge-work-plugins/slack-search --openclaw
Files (1)
SKILL.md
3.9 KB

Slack Search

This skill provides guidance for effectively searching Slack to find messages, files, and information.

When to Use

Apply this skill whenever you need to find information in Slack — including when a user asks you to locate messages, conversations, files, or people, or when you need to gather context before answering a question about what's happening in Slack.

Search Tools Overview

ToolUse When
slack_search_publicSearching public channels only. Does not require user consent.
slack_search_public_and_privateSearching all channels including private, DMs, and group DMs. Requires user consent.
slack_search_channelsFinding channels by name or description.
slack_search_usersFinding people by name, email, or role.

Search Strategy

Start Broad, Then Narrow

  1. Begin with a simple keyword or natural language question.
  2. If too many results, add filters (in:, from:, date ranges).
  3. If too few results, remove filters and try synonyms or related terms.

Choose the Right Search Mode

  • Natural language questions (e.g., "What is the deadline for project X?") — Best for fuzzy, conceptual searches where you don't know exact keywords.
  • Keyword search (e.g., project X deadline) — Best for finding specific, exact content.

Use Multiple Searches

Don't rely on a single search. Break complex questions into smaller searches:

  • Search for the topic first
  • Then search for specific people's contributions
  • Then search in specific channels

Search Modifiers Reference

Location Filters

  • in:channel-name — Search within a specific channel
  • in:<#C123456> — Search in channel by ID
  • -in:channel-name — Exclude a channel
  • in:<@U123456> — Search in DMs with a user

User Filters

  • from:<@U123456> — Messages from a specific user (by ID)
  • from:username — Messages from a user (by Slack username)
  • to:me — Messages sent directly to you

Content Filters

  • is:thread — Only threaded messages
  • has:pin — Pinned messages
  • has:link — Messages containing links
  • has:file — Messages with file attachments
  • has::emoji: — Messages with a specific reaction

Date Filters

  • before:YYYY-MM-DD — Messages before a date
  • after:YYYY-MM-DD — Messages after a date
  • on:YYYY-MM-DD — Messages on a specific date
  • during:month — Messages during a specific month (e.g., during:january)

Text Matching

  • "exact phrase" — Match an exact phrase
  • -word — Exclude messages containing a word
  • wild* — Wildcard matching (minimum 3 characters before *)

File Search

To search for files, use the content_types="files" parameter with type filters:

  • type:images — Image files
  • type:documents — Document files
  • type:pdfs — PDF files
  • type:spreadsheets — Spreadsheet files
  • type:canvases — Slack Canvases

Example: content_types="files" type:pdfs budget after:2025-01-01

Following Up on Results

After finding relevant messages:

  • Use slack_read_thread to get the full thread context for any threaded message.
  • Use slack_read_channel with oldest/latest timestamps to read surrounding messages for context.
  • Use slack_read_user_profile to identify who a user is when their ID appears in results.

Common Pitfalls

  • Boolean operators don't work. AND, OR, NOT are not supported. Use spaces (implicit AND) and - for exclusion.
  • Parentheses don't work. Don't try to group search terms with ().
  • Search is not real-time. Very recent messages (last few seconds) may not appear in search results. Use slack_read_channel for the most recent messages.
  • Private channel access. Use slack_search_public_and_private when you need to include private channels, but note this requires user consent.

Source

git clone https://github.com/anthropics/knowledge-work-plugins/blob/main/partner-built/slack/skills/slack-search/SKILL.mdView on GitHub

Overview

Guidance for efficiently searching Slack to find messages, files, channels, and people. Covers when to search, tool usage, and refinements to surface relevant context.

How This Skill Works

Utilize dedicated search tools such as slack_search_public, slack_search_public_and_private, slack_search_channels, and slack_search_users to query across different scopes. Refine results with content and date filters, and retrieve surrounding context with slack_read_thread, slack_read_channel, and slack_read_user_profile when needed.

When to Use It

  • When a user asks you to locate messages or conversations in Slack.
  • When you need to find files or information attached in Slack.
  • When you need to identify channels by name or description.
  • When you need to find people by name, email, or role.
  • When you want context before answering a question about what's happening in Slack.

Quick Start

  1. Step 1: Define what you’re looking for (messages, files, or people) and the scope (public vs private).
  2. Step 2: Run a broad search with a simple keyword or natural-language query, then add filters as needed.
  3. Step 3: Refine results with in:/from:/before/after and use slack_read_thread or slack_read_channel for context.

Best Practices

  • Start broad with a simple keyword, then narrow using in:, from:, and date range filters.
  • Choose the right search mode: natural language for fuzzy queries vs. keyword search for exact terms.
  • Break complex questions into multiple searches: topic first, then people, then channels.
  • Target files efficiently with a content-types filter and type filters (e.g., type:pdfs, type:images) and date constraints.
  • Verify results by following up with slack_read_thread, slack_read_channel, or slack_read_user_profile, and respect channel privacy.

Example Use Cases

  • Ask in natural language: What is the deadline for project X?
  • Find a PDF budget file after 2025-01-01 using the files filter and type:pdfs budget after:2025-01-01.
  • Locate channel by name or description using slack_search_channels with a keyword like 'project-X'.
  • Identify contributors to a topic by searching in a channel, then use from: to see who contributed.
  • Get surrounding context for a message by reading the channel around it with slack_read_channel.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers