mcpField
S
search-tools

search-tools

github.com/parcadeiDevelopment3.9k491 installsUpdated 39w ago
Repository

About search-tools

search-tools is a skill that guides code-search tool selection by query type. It distinguishes semantic, structural, text, and literal searches, and lists the requirements and examples for each option.

Key features

  1. 01Choose tools by search intent
  2. 02Semantic search with LEANN
  3. 03Structural search with AST-grep
  4. 04Text search with Morph
  5. 05Literal and regex search with Grep

Use cases

  1. 01Find conceptual code patterns
  2. 02Locate function calls or usages
  3. 03Search files for terms or TODOs
  4. 04Look up exact names or regex patterns

MCP support

The guide notes that AST-grep requires an MCP server; it does not otherwise describe MCP server configuration or management.

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/parcadei/continuous-claude-v3 --skill search-tools

After installing, type/search-toolsin Claude Code to confirm it loaded.

Details

From the project README

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

# Search with semantic query
leann search opc-dev "how does blackboard communication work" --top-k 5

# List available indexes
leann list

# Rebuild index (when code changes)
leann build opc-dev --docs dir1 dir2 --no-recompute --no-compact --force

Comments

Markdown supported