I have a Slack bot that runs on a VM. Whenever the bot is mentioned in Slack, it invokes Claude Code to answer the question. The VM has all 95+ microservice repos cloned locally. The challenge is that a query could relate to any repository (or even require information from multiple repositories). Currently, the agent ends up scanning large portions of one or more repos, which results in high token usage and increased cost. I’m wondering what arch others use to solve this problem efficiently. Would it make sense to maintain a lightweight “repository map” (e.g., Markdown files, manifests, dependency graphs, service summaries, API indexes, ownership maps, etc.) so the LLM can first identify the relevant repositories before reading code? Or is there a better approach? I’m primarily looking for approaches that significantly reduce token consumption while maintaining answer quality. What has worked well for you? submitted by /u/Mindless-Runner
Originally posted by u/Mindless-Runner on r/ClaudeCode
