Leann search

From parcadei/Continuous-Claude-v3 · View interactive version

Leann search is an AI agent skill from the GitHub repository parcadei/Continuous-Claude-v3. Semantic search across codebase using LEANN vector index

How to use this skill

Skill file

LEANN Semantic Search

Use LEANN for meaning-based code search instead of grep.

When to Use

When NOT to Use

Commands

# Search the current project's index
leann search <index-name> "<query>" --top-k 5

# List available indexes
leann list

# Example
leann search rigg "how do providers handle streaming" --top-k 5

MCP Tool (in Claude Code)

leann_search(index_name="rigg", query="your semantic query", top_k=5)

Rebuilding the Index

When codebase changes significantly:

cd /path/to/project
leann build <project-name> --docs src tests scripts \
  --file-types '.ts,.py,.md,.json' \
  --no-recompute --no-compact \
  --embedding-mode sentence-transformers \
  --embedding-model all-MiniLM-L6-v2

How It Works

  1. LEANN uses sentence embeddings to understand meaning
  2. Searches find conceptually similar code, not just text matches
  3. Results ranked by semantic similarity score (0-1)

Grep vs LEANN Decision

| Query Type | Tool | Example |

|------------|------|---------|

| Natural language | LEANN | "how does caching work" |

| Class/function name | Grep | "class CacheManager" |

| Pattern matching | Grep | error\|warning |

| Find implementations | LEANN | "rate limiting logic" |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.