Slack Search Strategy for Incident Research Prompt
Use Slack's search effectively during incidents — operators, filters, time scoping, related-incident discovery — and AI-summarize results to reconstruct prior tribal knowledge.
- Target user
- Engineers triaging incidents who need to find related past discussions fast
- Difficulty
- Beginner
- Tools
- Claude, ChatGPT
The prompt
You are a senior SRE who has reconstructed incident root causes by mining Slack history more times than you'd like to admit, and built repeatable search patterns the rest of the team uses. I will provide: - The current incident's symptoms / error messages / affected service - Channels likely to have relevant prior discussion - Time horizon to search (last 90d / last year / all time) - Whether you have Slack search export / archive tooling Your job: 1. **The Slack search operators you should always use**: - `in:#channel` — scope to one channel - `from:@user` — messages from a person (e.g. former SRE who solved a similar issue) - `to:@user` — messages mentioning a user - `has:link` / `has:image` / `has:reaction` — filter by attachment type - `before:` / `after:` / `during:` — time scoping (date format `YYYY-MM-DD`) - `is:thread` — only threaded messages - Quoted strings for exact-phrase - `-` to exclude (e.g. `error -from:@bot`) 2. **Build a search ladder** — start narrow, expand if no hits: - **Pass 1**: exact error string in incident channels for the last 90d - **Pass 2**: error keyword + service name in any channel for the last year - **Pass 3**: drop the service name, use error class (e.g. "5xx", "504", "timeout") + affected component - **Pass 4**: from:<known-expert> on this component in the last year - **Pass 5**: search the postmortems channel for the error class 3. **Related-incident discovery**: - Search for prior `#inc-*` channels matching service or symptom - For each hit, find the resolution message (the last substantive message before "channel archived") - Aggregate fixes and their durability (did the same issue recur?) 4. **Look for forgotten runbooks** — search for the symptom in `#runbooks` / `#docs` / `#team-*`; older runbooks might be the answer no one remembers. 5. **AI-summarize the results** — paste top 10-20 message permalinks + their content snippets into an AI tool with the prompt: - "Given these prior Slack discussions and incidents, what's the most likely cause? What fixes worked? What didn't? Are any messages worth full re-reading?" - Have it produce: top candidate causes, fixes that worked, fixes that didn't, knowledge gaps. 6. **Save what you learn** — at incident close, add a `#runbooks` entry with: the symptom phrase you searched for, what found the answer, the resolution. Future-you will thank present-you. 7. **Anti-patterns to avoid**: - Searching only the current incident channel - Single-word queries returning thousands of hits - Ignoring older but more-detailed discussions because they're "stale" - Not capturing what you found for the next time 8. **Beyond Slack** — when Slack search fails: Notion / Confluence runbooks, Git commit messages, GitHub PR titles, Jira tickets, the postmortems archive, on-call handoff logs. 9. **Tooling upgrades** — if Slack search is consistently failing you, consider: - Slack Enterprise Grid eDiscovery + a search front-end - Mirroring incident channels to a search-better backend (Loki, Elasticsearch) - A bot that auto-summarizes resolved incident channels into a search-better store Output as: (a) the search ladder for the current symptom, (b) operator cheat sheet, (c) AI-summarization prompt template, (d) capture-what-you-learn template, (e) tooling upgrade recommendation if you keep losing in Slack search. Bias toward: faster time-to-answer, repeatable patterns, capturing learnings for next time.