leann-search — Claude Code skill: what it does, how to install
leann-search runs semantic code queries against a LEANN vector index when exact keyword matches fall short.
MIT ★ 3,951 updated 2026-01-26
npx skills add parcadei/Continuous-Claude-v3 --skill leann-search -a claude-codeWhat leann-search does
The skill adds meaning-based repository search to Claude Code. It interacts with the leann CLI via Bash or triggers the leann_search MCP tool, querying an index built with sentence-transformers and all-MiniLM-L6-v2. Search hits are scored by semantic similarity from 0 to 1.
It handles conceptual tasks such as locating authentication flows or streaming implementations across varied terminology. Exact identifiers and regex patterns stay reserved for grep and glob.
Searches fail if the project index has not been generated beforehand with leann build. Whenever code evolves heavily, rebuilding the vector index is necessary.
What it helps with
- locate subsystem logic without knowing exact function or variable names
- trace architectural concepts like error handling or streaming across files
- retrieve semantically related implementations using natural language
- check registered project indices with
leann list
Example prompts for the agent
- Search the rigg index using leann for how providers handle streaming
- Run a semantic search for rate limiting logic in the project
- List available leann vector indexes
How to install leann-search
1Skills CLI (Vercel)
npx skills add parcadei/Continuous-Claude-v3 --skill leann-search -a claude-code2Manually: put the files in place
~/.claude/skills/leann-search/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/leann-search/
1Skills CLI (Vercel)
npx skills add parcadei/Continuous-Claude-v3 --skill leann-search -a codex2Manually: put the files in place
.agents/skills/leann-search/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add parcadei/Continuous-Claude-v3 --skill leann-search -a cursor2Manually: put the files in place
.cursor/skills/leann-search/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install parcadei/Continuous-Claude-v3 .claude/skills/archive/leann-search2Manually: put the files in place
.github/skills/leann-search/SKILL.md1Skills CLI (Vercel)
npx skills add parcadei/Continuous-Claude-v3 --skill leann-search -a gemini-cli2Platform CLI
gemini skills install https://github.com/parcadei/Continuous-Claude-v3 --path .claude/skills/archive/leann-searchManually: put the files in place
.devin/skills/leann-search/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about leann-search
How to install leann-search in Claude Code?
Run npx skills add parcadei/Continuous-Claude-v3 --skill leann-search -a claude-code. Alternatively, copy the file to ~/.claude/skills/leann-search/SKILL.md.
What does leann-search do?
It performs vector-based codebase lookups through LEANN to identify relevant code by conceptual meaning rather than exact text strings.
When should Grep be used instead of LEANN?
Use Grep for exact class names, specific identifiers, and regex patterns. LEANN handles broader natural language questions such as how caching works.
Source text
SKILL.md · MIT
--- name: leann-search description: Semantic search across codebase using LEANN vector index allowed-tools: [Bash, Read] --- # LEANN Semantic Search Use LEANN for meaning-based code search instead of grep. ## When to Use - **Conceptual queries**: "how does authentication work", "where are errors handled" - **Understanding patterns**: "streaming implementation", "provider architecture" - **Finding related code**: code that's semantically similar but uses different terms ## When NOT to Use - **Exact matches**: Use Grep for `class Foo`, `def bar`, specific identifiers - **Regex patterns**: Use Grep for `error.*handling`, `import.*from` - **File paths**: Use Glob for `*.test.ts`, `src/**/*.py` ## Commands ```bash # 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: ```bash 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" |
© parcadei · MIT · parcadei/Continuous-Claude-v3