One-click install
npx skills add https://github.com/scooter-lacroix/Maestro --skill search-hierarchy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: search-hierarchy
Source: https://github.com/scooter-lacroix/Maestro/tree/main/maestro/skills/search-hierarchy
Command: npx skills add https://github.com/scooter-lacroix/Maestro --skill search-hierarchy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps users select the most efficient search tool (AST-grep, LEANN, Grep, or Read) based on the type of query, optimizing for token usage and accuracy.

Core Features & Use Cases

  • Query Type Classification: Automatically determines if a query is structural, semantic, literal, or requires full context.
  • Tool Recommendation: Suggests the best tool for each query type to minimize token consumption and maximize relevant results.
  • Hook Enforcement: Integrates with a hook to guide users towards appropriate tools and prevent inefficient searches.
  • Use Case: When asking "how does the authentication flow work in this project," the Skill guides you to use LEANN instead of Grep, saving tokens and providing a more relevant answer.

Quick Start

Use the search-hierarchy skill to find all async functions in the codebase.

Frequently Asked Questions about search-hierarchy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I choose the right code search tool to reduce token usage?

Choosing the right code search tool requires classifying your query type. Use AST-grep for structural queries, LEANN for semantic queries, Grep for literal queries, and Read for full context to optimize token efficiency.

When should I use AST-grep instead of Grep for code analysis?

Use AST-grep instead of Grep when executing structural queries to find specific syntax patterns like async functions. Grep is recommended only for literal string searches, while AST-grep parses the abstract syntax tree for better accuracy.

What is the best way to search how a feature flow works in a codebase?

The best way to search how a feature flow works is using LEANN for semantic queries. This approach provides more relevant results and saves tokens compared to using Grep for understanding complex authentication flows or feature implementations.

Can I enforce a specific search tool selection for different query types?

Yes, you can enforce search tool selection using an integration hook. The hook guides users toward appropriate tools based on query type classification, preventing inefficient searches and optimizing token consumption automatically.

Why does using Grep for semantic code search waste tokens?

Using Grep for semantic code search wastes tokens because it performs literal string matching instead of understanding query intent. Tools like LEANN are designed for semantic queries, delivering relevant results with lower token consumption.