search-hierarchy

Search Tool Hierarchy

By parcadei · 472 installs

npx skills add parcadei/continuous-claude-v3 --skill search-hierarchy

Source repository · Upstream listing

Search Tool Hierarchy Use the most token efficient search tool for each query type. Decision Tree Token Efficiency Comparison Tool Output Size Best For AST grep ~50 tokens Function/class definitions, imports, decorators LEANN ~100 tokens Conceptual questions, architecture, patterns Grep ~200 2000 Exact identifiers, regex, file paths Read ~1500+ Full understanding after finding the file Hook Enforcement The grep to leann.sh hook automatically: 1. Detects query type (structural/semantic/literal) 2. Blocks and suggests AST grep for structural queries 3. Blocks and suggests LEANN for semantic queries 4. Allows literal patterns through to Grep DO Start with AST grep for code structure questions Use LEANN for "how does X work" questions Use Grep only for exact identifier matches Read files only after finding them via search DON'T Use Grep for conceptual questions (returns nothing) Read files before knowing which ones are relevant Use Read when AST grep would give file:line Ignore hook suggestions Examples Optimal Flow