Иерархия инструментов поиска по коду

engineering

search-tools is a Claude Code skill that implements a search tool hierarchy with a decision tree for routing queries between LEANN, AST-grep, Morph, and Grep based on search type. Conceptual and semantic queries — such as "how does authentication work" or "find error handling patterns" — are directed to LEANN's embedding-based search, with a PreToolUse hook automatically redirecting semantic Grep calls. Structural analysis tasks like finding all React components using useState or refactoring imports go to AST-grep via an MCP server. Text search across the codebase uses Morph, which is 20x faster than Grep and requires an API key; literal patterns and regex fall back to the built-in Grep tool with no extra dependencies. The skill is non-user-invocable and is designed for teams navigating large codebases efficiently.