Search Tools

parcadei/Continuous-Claude-v3/.claude/skills/search-tools

by parcadeid07ff4b06b62f43771bc0c927d0211b734d6149eNo license3.9K starsListed Oct 9, 2026Updated Oct 9, 2026Repository updated 8 months ago

Search Tool Hierarchy

Instructions onlySoftware Development
AI-generated overview

Guides an agent in choosing among semantic, structural, text and literal code search tools.

What it does
This skill provides a decision tree and comparison table for selecting a code search approach: LEANN for semantic or conceptual queries, AST-grep for structural patterns, Morph for fast text search, and the built-in Grep tool for literal patterns. It lists example queries for each tool and shows LEANN command lines for searching, listing indexes and rebuilding an index. It produces guidance rather than files or code.
When to use it
Use it when an agent needs to search a codebase and must decide which search method fits the query. It is suited to conceptual questions about how code works, structural queries about functions or usages, and plain text or regex lookups.
Requirements
Instructions only, with no bundled scripts. LEANN requires a built index; AST-grep requires an MCP server; Morph requires an API key, with Grep as the fallback; the built-in Grep tool needs nothing.

Search Tool Hierarchy

When searching code, use this decision tree:

Decision Tree

Need CONCEPTUAL/SEMANTIC search?  (how does X work, find patterns, understand architecture)  → Use LEANN (/leann-search) - embedding-based semantic search  → PreToolUse hook auto-redirects semantic Grep queries
Need to understand code STRUCTURE?  (find function calls, class usages, refactor patterns)  → Use AST-grep (/ast-grep-find)
Need to find TEXT in code?  → Use Morph (/morph-search) - 20x faster  → If no Morph API key: fall back to Grep tool
Simple one-off search?  → Use built-in Grep tool directly

Tool Comparison

ToolBest ForRequires
LEANNSemantic search: "how does caching work", "error handling patterns", conceptual queriesIndex built
AST-grepStructural patterns: "find all calls to foo()", refactoring, find usages by typeMCP server
MorphFast text search: "find files mentioning error", grep across codebaseAPI key
GrepLiteral patterns, class/function names, regexNothing (built-in)

Examples

LEANN (semantic/conceptual):

  • "how does authentication work"
  • "find error handling patterns"
  • "where is rate limiting implemented"

AST-grep (structural):

  • "Find all functions that return a Promise"
  • "Find all React components using useState"
  • "Refactor all imports of X to Y"

Morph (text search):

  • "Find all files mentioning 'authentication'"
  • "Search for TODO comments"

Grep (literal):

  • class ProviderAdapter
  • def __init__
  • Regex patterns

LEANN Commands

bash
# Search with semantic queryleann search opc-dev "how does blackboard communication work" --top-k 5
# List available indexesleann list
# Rebuild index (when code changes)leann build opc-dev --docs dir1 dir2 --no-recompute --no-compact --force

Source and attribution

Source:parcadei/Continuous-Claude-v3in.claude/skills/search-toolsat commitd07ff4b

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal