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 - or
in:<@U123456>: Search in DMs with a userin:@username
- : 在特定频道内搜索
in:channel-name - : 通过频道ID搜索
in:<#C123456> - : 排除某个频道
-in:channel-name - 或
in:<@U123456>: 在与指定用户的私信中搜索in:@username
User Filters
用户筛选器
- : Messages from a specific user (by ID)
from:<@U123456> - : Messages from a user (by Slack username)
from:username - : Messages sent to a specific user
to:<@U123456> - : Messages sent directly to you
to:me - : Canvases created by a specific person
creator:@username
- : 来自特定用户的消息(通过ID)
from:<@U123456> - : 来自指定用户的消息(通过Slack用户名)
from:username - : 发送给特定用户的消息
to:<@U123456> - : 直接发送给你的消息
to:me - : 由特定人员创建的Canvas
creator:@username
Content Filters
内容筛选器
- : Only threaded messages
is:thread - : Only your saved messages
is:saved - : Pinned messages
has:pin - : Messages containing links
has:link - : Messages with file attachments
has:file - : Messages with a specific reaction
has::emoji: - : Messages you reacted to with a specific reaction
hasmy::emoji:
- : 仅显示线程消息
is:thread - : 仅显示你保存的消息
is:saved - : 已置顶的消息
has:pin - : 包含链接的消息
has:link - : 带有文件附件的消息
has:file - : 带有特定表情反应的消息
has::emoji: - : 你用特定表情反应过的消息
hasmy::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, set the parameter and use a filter in the query:
content_types="files"type:- ,
type:images,type:documents,type:pdfs,type:spreadsheetstype:presentations - ,
type:canvases,type:lists,type:emails,type:audiotype:videos
Example:
content_types="files" type:pdfs budget after:2025-01-01All the standard modifiers above (, , dates, etc.) work with file searches too.
in:from:要搜索文件,需设置参数,并在查询中使用筛选器:
content_types="files"type:- ,
type:images,type:documents,type:pdfs,type:spreadsheetstype:presentations - ,
type:canvases,type:lists,type:emails,type:audiotype:videos
示例:
content_types="files" type:pdfs budget after:2025-01-01上述所有标准修饰符(、、日期等)同样适用于文件搜索。
in:from:Useful Parameters
实用参数
Beyond the query string, the search tools accept parameters that materially improve results:
- :
sort(relevance, default) orscore(newest first); pair withtimestamp(sort_dir/asc).desc - :
content_types(default) ormessages.files - : restrict to channels you're a member of.
only_my_channels - : results per page (capped at 20); paginate with the returned
limit.cursor
除查询字符串外,搜索工具还接受可显著优化结果的参数:
- :
sort(相关性,默认)或score(最新优先);可搭配timestamp(sort_dir/asc)使用。desc - :
content_types(默认)或messages。files - : 仅限制在你加入的频道内搜索。
only_my_channels - : 每页结果数量(上限为20);使用返回的
limit进行分页。cursor
Following 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 - Use to read the contents of a file surfaced by a file search.
slack_read_file - Use to see who is in a channel you found.
slack_list_channel_members
找到相关消息后:
- 使用获取线程消息的完整上下文。
slack_read_thread - 使用并搭配
slack_read_channel/oldest时间戳读取周边消息以获取上下文。latest - 当结果中出现用户ID时,使用识别用户身份。
slack_read_user_profile - 使用读取文件搜索结果中显示的文件内容。
slack_read_file - 使用查看你找到的频道内成员。
slack_list_channel_members
Common Pitfalls
常见误区
- Boolean operators don't work. ,
AND,ORare not supported. Use spaces (implicit AND) andNOTfor exclusion. (Repeating the same modifier, e.g. two-, ORs those values together.)from: - 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来实现排除功能。(重复相同修饰符,例如两个-,会将这些值视为OR关系。)from: - 不支持括号。不要尝试用对搜索词进行分组。
() - 搜索并非实时。最新的消息(过去几秒内)可能不会出现在搜索结果中。如需获取最新消息,请使用。
slack_read_channel - 私有频道访问。当需要包含私有频道时,请使用,但请注意这需要用户授权。
slack_search_public_and_private
Notes
注意事项
- Scope: this skill owns searching workspace content: messages, files, channels, and people inside Slack. To search and read the official Slack platform documentation at docs.slack.dev (conceptual and how-to questions about Slack features), use the skill instead.
slack:slack-docs
- 范围:本技能负责搜索Slack内的工作区内容:消息、文件、频道和人员。如需搜索并阅读docs.slack.dev上的官方Slack平台文档(关于Slack功能的概念性和操作类问题),请使用技能。
slack:slack-docs