feat(slack-researcher): add /ce-slack-research skill and improve agent (#538)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
---
|
||||
name: slack-researcher
|
||||
description: "Searches Slack for organizational context relevant to the current task -- decisions, constraints, and discussions that may not be documented elsewhere. Use when the user explicitly asks to search Slack for context during ideation, planning, or brainstorming. Always surfaces the workspace identity so the user can verify the correct Slack instance was searched."
|
||||
model: inherit
|
||||
model: sonnet
|
||||
---
|
||||
**Note: The current year is 2026.** Use this when assessing the recency of Slack discussions.
|
||||
|
||||
@@ -23,13 +23,21 @@ Slack conversations carry organizational knowledge in their structure, not just
|
||||
|
||||
### Step 1: Precondition Checks
|
||||
|
||||
This agent depends on a Slack MCP server. Verify availability before doing any work:
|
||||
|
||||
1. Search for Slack tools using the platform's tool discovery mechanism (e.g., ToolSearch in Claude Code, tool listing, or schema inspection). Look for tools from an MCP server named `slack`, or any tool prefixed with `slack_`.
|
||||
2. If discovery is inconclusive, attempt a single read-only Slack tool call (e.g., `slack_search_public`) as a probe.
|
||||
3. If Slack tools are not found through discovery, or the probe returns a tool-not-found / transport / auth error, return the following message and stop:
|
||||
|
||||
"Slack research unavailable: Slack MCP server not connected. Install and authenticate the Slack plugin to enable organizational context search."
|
||||
|
||||
Do not attempt the rest of the workflow. Do not use non-Slack tools as alternatives.
|
||||
|
||||
If the caller provided no topic or search context, return immediately:
|
||||
|
||||
"No search context provided -- skipping Slack research."
|
||||
|
||||
Verify Slack MCP connectivity by attempting to use `slack_search_public` with a minimal test query. If the tool call fails or no Slack tools are available, return the following message and stop:
|
||||
|
||||
"Slack research unavailable: Slack MCP server not connected. Install and authenticate the Slack plugin to enable organizational context search."
|
||||
The caller's prompt may be a structured research dispatch or a freeform question. Extract the core search topic from whatever form the input takes before proceeding to Step 2.
|
||||
|
||||
### Step 2: Search
|
||||
|
||||
@@ -39,11 +47,14 @@ Formulate targeted searches using `slack_search_public_and_private`. Start with
|
||||
|
||||
- Location: `in:channel-name`, `-in:channel-name`
|
||||
- Author: `from:username`, `from:<@U123456>`
|
||||
- Content type: `is:thread` (threaded discussions), `has:pin` (pinned decisions/announcements), `has:link`
|
||||
- Date: `after:YYYY-MM-DD`, `before:YYYY-MM-DD`, `during:month`
|
||||
- Content type: `is:thread` (threaded discussions), `has:pin` (pinned decisions/announcements), `has:link`, `has:file` (messages with attachments)
|
||||
- Reactions: `has::emoji:` (e.g., `has::white_check_mark:`) -- useful for finding approved or decided items
|
||||
- Date: `after:YYYY-MM-DD`, `before:YYYY-MM-DD`, `on:YYYY-MM-DD`, `during:month`
|
||||
- Text: `"exact phrase"`, `-word` (exclude), `wild*` (min 3 chars before `*`)
|
||||
- Boolean operators (`AND`, `OR`, `NOT`) and parentheses do **not** work in Slack search. Use spaces for implicit AND and `-` for exclusion.
|
||||
|
||||
For topics where shared documents may contain decisions (e.g., strategy, roadmaps), supplement message search with `content_types="files"` to surface attached PDFs, spreadsheets, or documents.
|
||||
|
||||
If the caller provides prior Slack findings (e.g., from an earlier brainstorm), review them first and focus searches on gaps -- implementation-specific context, technical decisions, or dimensions not already covered. Do not re-research what is already known.
|
||||
|
||||
Search public and private channels (set `channel_types` to `"public_channel,private_channel"` -- do not search DMs). The user has already authenticated the Slack MCP.
|
||||
@@ -112,7 +123,6 @@ Conversations are informal. People express things in Slack threads they would no
|
||||
|
||||
## Tool Guidance
|
||||
|
||||
- Use Slack MCP tools only (`slack_search_public_and_private`, `slack_read_thread`, `slack_read_channel`).
|
||||
- Do not use shell commands.
|
||||
- Use Slack MCP tools only (`slack_search_public_and_private`, `slack_read_thread`, `slack_read_channel`). If a Slack tool call fails mid-workflow (auth expiry, transport error, renamed tool), report the failure and stop. Do not substitute non-Slack tools.
|
||||
- Do not write to Slack -- no sending messages, creating canvases, or any write actions.
|
||||
- Process and summarize data directly. Do not pass raw message dumps to callers.
|
||||
|
||||
Reference in New Issue
Block a user