
Search Hierarchy
This enforces a token efficient search strategy by routing queries to the right tool. It pushes you toward AST-grep for structural patterns like function definitions (around 50 tokens), LEANN for semantic questions about how systems work (around 100 tokens), and reserves grep for exact identifier searches. The hook system actually blocks inefficient tool choices and suggests alternatives, which is aggressive but probably necessary since the default behavior wastes thousands of tokens reading files you don't need. The decision tree is sensible: find files first with cheap searches, then read only what matters. Works best if you're dealing with token budgets on large codebases where a few wrong reads blow your context window.
- skills.sh installs
- 478
- GitHub stars
- 3.9K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add parcadei/continuous-claude-v3 --skill search-hierarchy --agent claude-codeInstalls into .claude/skills of the current project.
Files
Search Tool Hierarchy
Use the most token-efficient search tool for each query type.
Decision Tree
Query Type?
├── STRUCTURAL (code patterns)
│ → AST-grep (~50 tokens output)
│ Examples: "def foo", "class Bar", "import X", "@decorator"
│
├── SEMANTIC (conceptual questions)
│ → LEANN (~100 tokens if path-only)
│ Examples: "how does auth work", "find error handling patterns"
│
├── LITERAL (exact identifiers)
│ → Grep (variable output)
│ Examples: "TemporalMemory", "check_evocation", regex patterns
│
└── FULL CONTEXT (need complete understanding)
→ Read (1500+ tokens)
Last resort after finding the right file
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
Sponsors
Details
- Repository
- github.com/parcadei/continuous-claude-v3
- First seen
- Jun 3, 2026
More from parcadei/continuous-claude-v3
All 108- Tdd Migrate478
- Tdd Migration Pipeline478
- Validate Agent478
- Agentica Infrastructure477
- Agentica Server476
- Nia Docs476
- Tldr Stats476
- Mot475
- Agentica Sdk474
- Agentica Spawn473
- System Overview473
- Tdd472
- Index At Creation471
- Router First Architecture468
- Implement Plan408
- Implement Task398
- Implement Plan Micro397
- Discovery Interview4.2K
- Premortem902
- Math881
- Github Search740
- Dead Code736
- Refactor623
- Recall Reasoning603