slack-search
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSlack Search
Slack搜索
This skill provides guidance for effectively searching Slack to find messages, files, and information.
本技能提供了高效搜索Slack以查找消息、文件和信息的指南。
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.
当你需要在Slack中查找信息时即可使用本技能——包括用户要求你查找消息、对话、文件或人员,或者你在回答关于Slack内动态的问题前需要收集上下文信息的场景。
Search Tools Overview
搜索工具概览
| Tool | Use When |
|---|---|
| Searching public channels only. Does not require user consent. |
| Searching all channels including private, DMs, and group DMs. Requires user consent. |
| Finding channels by name or description. |
| Finding people by name, email, or role. |
| 工具 | 使用场景 |
|---|---|
| 仅搜索公开频道,无需用户授权。 |
| 搜索所有频道,包括私有频道、一对一私信和群组私信,需要用户授权。 |
| 通过名称或描述查找频道。 |
| 通过姓名、邮箱或角色查找人员。 |
Search Strategy
搜索策略
Start Broad, Then Narrow
先宽泛搜索,再逐步缩小范围
- Begin with a simple keyword or natural language question.
- If too many results, add filters (,
in:, date ranges).from: - If too few results, remove filters and try synonyms or related terms.
- 从简单的关键词或自然语言问题开始。
- 如果结果过多,添加筛选条件(、
in:、日期范围)。from: - 如果结果过少,移除筛选条件,尝试同义词或相关词汇。
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., ) — Best for finding specific, exact content.
project X deadline
- 自然语言问题(例如:"项目X的截止日期是什么时候?")——最适合模糊的概念性搜索,当你不知道确切关键词时使用。
- 关键词搜索(例如:)——最适合查找特定的、精确的内容。
project X deadline
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
位置筛选符
- — Search within a specific channel
in:channel-name - — Search in channel by ID
in:<#C123456> - — Exclude a channel
-in:channel-name - — Search in DMs with a user
in:<@U123456>
- — 在特定频道内搜索
in:channel-name - — 通过频道ID搜索
in:<#C123456> - — 排除某个频道
-in:channel-name - — 在与特定用户的一对一私信中搜索
in:<@U123456>
User Filters
用户筛选符
- — Messages from a specific user (by ID)
from:<@U123456> - — Messages from a user (by Slack username)
from:username - — Messages sent directly to you
to:me
- — 来自特定用户的消息(通过用户ID)
from:<@U123456> - — 来自特定用户的消息(通过Slack用户名)
from:username - — 直接发送给你的消息
to:me
Content Filters
内容筛选符
- — Only threaded messages
is:thread - — Pinned messages
has:pin - — Messages containing links
has:link - — Messages with file attachments
has:file - — Messages with a specific reaction
has::emoji:
- — 仅显示线程消息
is:thread - — 已置顶的消息
has:pin - — 包含链接的消息
has:link - — 带有文件附件的消息
has:file - — 带有特定表情反应的消息
has::emoji:
Date Filters
日期筛选符
- — Messages before a date
before:YYYY-MM-DD - — Messages after a date
after:YYYY-MM-DD - — Messages on a specific date
on:YYYY-MM-DD - — Messages during a specific month (e.g.,
during:month)during:january
- — 指定日期之前的消息
before:YYYY-MM-DD - — 指定日期之后的消息
after:YYYY-MM-DD - — 指定日期当天的消息
on:YYYY-MM-DD - — 特定月份内的消息(例如:
during:month)during:january
Text Matching
文本匹配
- — Match an exact phrase
"exact phrase" - — Exclude messages containing a word
-word - — Wildcard matching (minimum 3 characters before
wild*)*
- — 匹配精确短语
"exact phrase" - — 排除包含该词汇的消息
-word - — 通配符匹配(
wild*前至少需要3个字符)*
File Search
文件搜索
To search for files, use the parameter with type filters:
content_types="files"- — Image files
type:images - — Document files
type:documents - — PDF files
type:pdfs - — Spreadsheet files
type:spreadsheets - — Slack Canvases
type:canvases
Example:
content_types="files" type:pdfs budget after:2025-01-01要搜索文件,需使用参数并搭配类型筛选符:
content_types="files"- — 图片文件
type:images - — 文档文件
type:documents - — PDF文件
type:pdfs - — 电子表格文件
type:spreadsheets - — Slack Canvases
type:canvases
示例:
content_types="files" type:pdfs budget after:2025-01-01Following Up on Results
搜索结果后续处理
After finding relevant messages:
- Use to get the full thread context for any threaded message.
slack_read_thread - Use with
slack_read_channel/oldesttimestamps to read surrounding messages for context.latest - Use to identify who a user is when their ID appears in results.
slack_read_user_profile
找到相关消息后:
- 使用获取任何线程消息的完整上下文。
slack_read_thread - 使用带有/
oldest时间戳的latest读取周边消息以获取上下文。slack_read_channel - 当结果中出现用户ID时,使用识别该用户身份。
slack_read_user_profile
Common Pitfalls
常见误区
- Boolean operators don't work. ,
AND,ORare not supported. Use spaces (implicit AND) andNOTfor 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 for the most recent messages.
slack_read_channel - Private channel access. Use when you need to include private channels, but note this requires user consent.
slack_search_public_and_private
- 布尔运算符无效:不支持、
AND、OR。使用空格(隐式表示AND)和NOT表示排除。- - 括号无效:不要尝试用对搜索词进行分组。
() - 搜索非实时:最近几秒的消息可能不会出现在搜索结果中。如需查看最新消息,请使用。
slack_read_channel - 私有频道访问:当你需要包含私有频道时,请使用,但注意这需要用户授权。
slack_search_public_and_private