Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

How I Built a Slack Bot That Answers Codebase Questions With Claude

说明与用途

使用Claude和代码搜索工具的Slack机器人,能在几秒钟内回答结构化代码问题,节省工程师时间并通过路径验证提升信任度。

问题

Engineers spent excessive time manually searching code for answers to structural questions like "Where does X live?" or "How does Y work?", costing about 20 minutes per question and reducing productivity.

结果

The bot answers most questions in 20–45 seconds, with a median latency of 20 seconds. API costs are negligible compared to the time saved, and the system improves trust by validating file paths before replying.

工作流

  • 1. User mentions bot in Slack with a question.
  • 2. Bot receives mention and forwards to Claude agent loop.
  • 3. Claude decides to use "search_code" tool to find regex matches in repo.
  • 4. Bot runs ripgrep via subprocess, returns limited matches.
  • 5. Claude reads matched files using "read_file" tool, follows imports and references.
  • 6. After a few tool calls, Claude produces a final answer with file paths and line numbers.
  • 7. Bot validates all referenced paths against actual repo tree to prevent hallucinations.
  • 8. Bot posts answer in Slack thread.

证据

Early on, the bot answered a question with a confident reference to utils/validation.py — a file that did not exist.

来源

Median answer latency is around 20 seconds end-to-end, the slowest multi-hop investigations land near 45.

来源

A month of real usage cost less than a single takeout lunch in API fees.

来源

  • 记录日期: 2026-09-21T08:00:38.503Z