How we built ten custom agents to tame our giant codebase
This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).
Metabase's 500K-line Clojure backend is divided into distinct subsystems, each with its own idioms and complexity. To avoid burning Claude Code's context window on repeated domain exploration, the author built ten specialized subagents — each a markdown file with YAML frontmatter, domain knowledge, codebase locations, investigation patterns, caveats, and testing strategies. Agents cover areas like the MBQL query processor, permissions, notifications, search, and more. Key tips include using Claude itself to draft agent descriptions, writing precise routing descriptions (not vague job titles), and focusing on durable investigation patterns over directory paths. Agents can be invoked naturally in conversation or @-mentioned explicitly, and multiple agents can run in parallel for cross-domain reviews.
Table of contents
What are subagents and why did I make ten of them?What’s inside an agent file?The ten agentsMy Favorite: mbql-expertHow I actually use the agentsTips for making your own subagentsSort: