🎯

search-hierarchy

🎯Skill

from parcadei/continuous-claude-v3

VibeIndex|
What it does

search-hierarchy skill from parcadei/continuous-claude-v3

search-hierarchy

Installation

Install skill:
npx skills add https://github.com/parcadei/continuous-claude-v3 --skill search-hierarchy
11
AddedJan 27, 2026

Skill Details

SKILL.md

Search Tool Hierarchy

Overview

# 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

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

```bash

# STRUCTURAL β†’ AST-grep

ast-grep --pattern "async def $FUNC($$$):" --lang python

# SEMANTIC β†’ LEANN

leann search opc-dev "how does authentication work" --top-k 3

# LITERAL β†’ Grep

Grep pattern="check_evocation" path=opc/scripts

# FULL CONTEXT β†’ Read (after finding file)

Read file_path=opc/scripts/z3_erotetic.py

```

Optimal Flow

```

  1. AST-grep: "Find async functions" β†’ 3 file:line matches
  2. Read: Top match only β†’ Full understanding
  3. Skip: 4 irrelevant files β†’ 6000 tokens saved

```

More from this repository10

🎯
agentica-claude-proxy🎯Skill

Enables seamless integration between Agentica agents and Claude Code CLI by managing proxy configurations, tool permissions, and response formatting.

🎯
git-commits🎯Skill

Manages git commits by removing Claude attribution, generating reasoning documentation, and ensuring clean commit workflows.

🎯
debug-hooks🎯Skill

Systematically diagnose and resolve hook registration, execution, and output issues in Claude Code projects by checking cache, settings, files, and manual testing.

🎯
migrate🎯Skill

Systematically researches, analyzes, plans, implements, and reviews migrations across frameworks, languages, and infrastructure with minimal risk.

🎯
background-agent-pings🎯Skill

Enables background agent execution with system-triggered progress notifications, avoiding manual polling and context flooding.

🎯
agentica-infrastructure🎯Skill

Provides comprehensive reference and infrastructure for building sophisticated multi-agent coordination patterns and workflows with precise API specifications and tracking mechanisms.

🎯
system-overview🎯Skill

Generates a comprehensive summary of the current system's configuration, components, and key metrics across skills, agents, hooks, and other core systems.

🎯
cli-reference🎯Skill

Provides comprehensive CLI commands and flags for interacting with Claude Code, enabling headless mode, automation, and session management.

🎯
braintrust-tracing🎯Skill

Traces and correlates Claude Code session events across parent and sub-agent interactions using comprehensive Braintrust instrumentation.

🎯
morph-apply🎯Skill

Rapidly edits files using AI-powered Morph Apply API with high accuracy and speed, without requiring full file context.