{"id":"leann-search","name":"leann-search","summary":"LEANNベクターインデックスを用いたコードベース横断セマンティックサーチ","body":"# LEANN Semantic Search\n\nUse LEANN for meaning-based code search instead of grep.\n\n## When to Use\n\n- **Conceptual queries**: \"how does authentication work\", \"where are errors handled\"\n- **Understanding patterns**: \"streaming implementation\", \"provider architecture\"\n- **Finding related code**: code that's semantically similar but uses different terms\n\n## When NOT to Use\n\n- **Exact matches**: Use Grep for `class Foo`, `def bar`, specific identifiers\n- **Regex patterns**: Use Grep for `error.*handling`, `import.*from`\n- **File paths**: Use Glob for `*.test.ts`, `src/**/*.py`\n\n## Commands\n\n```bash\n# Search the current project's index\nleann search <index-name> \"<query>\" --top-k 5\n\n# List available indexes\nleann list\n\n# Example\nleann search rigg \"how do providers handle streaming\" --top-k 5\n```\n\n## MCP Tool (in Claude Code)\n\n```\nleann_search(index_name=\"rigg\", query=\"your semantic query\", top_k=5)\n```\n\n## Rebuilding the Index\n\nWhen codebase changes significantly:\n\n```bash\ncd /path/to/project\nleann build <project-name> --docs src tests scripts \\\n  --file-types '.ts,.py,.md,.json' \\\n  --no-recompute --no-compact \\\n  --embedding-mode sentence-transformers \\\n  --embedding-model all-MiniLM-L6-v2\n```\n\n## How It Works\n\n1. LEANN uses sentence embeddings to understand *meaning*\n2. Searches find conceptually similar code, not just text matches\n3. Results ranked by semantic similarity score (0-1)\n\n## Grep vs LEANN Decision\n\n| Query Type | Tool | Example |\n|------------|------|---------|\n| Natural language | LEANN | \"how does caching work\" |\n| Class/function name | Grep | \"class CacheManager\" |\n| Pattern matching | Grep | `error\\|warning` |\n| Find implementations | LEANN | \"rate limiting logic\" |","author":"@parcadei","ownerProfile":null,"authorContacts":null,"sourceUrl":"https://github.com/parcadei/Continuous-Claude-v3/tree/main/.claude/skills/archive/leann-search","license":"MIT","category":"document","lang":"en","tokens":438,"stars":0,"calls30d":2,"claimed":false,"visibility":"public","origin":"crawler","version":"0.1.0","createdAt":"2026-08-22","updatedAt":"2026-08-22","files":[],"requires":{"mcp":[],"tools":["Bash","Read"]},"safety":{"flags":[],"scannedAt":"2026-08-22","hasScripts":false,"networkEndpoints":[]}}