From grimoire
Performs semantic search on Qdrant vector DB of indexed knowledge bases for librarian agent. Returns ranked results with scores and source metadata for citations.
npx claudepluginhub joranhonig/grimoireThis skill uses the workspace's default tool permissions.
Perform semantic search across indexed library content via a local Qdrant
Indexes registered code libraries from libraries.yaml by chunking files, embedding with FastEmbed, and storing in local Qdrant vector DB for semantic search.
Searches indexed library sources using vector, FTS, or hybrid modes with options for stores, limits, thresholds, and detail levels to find code implementations.
Guides qi CLI for local knowledge search: init/index documents to SQLite, BM25/hybrid/vector search, RAG Q&A with citations using Ollama/OpenAI.
Share bugs, ideas, or general feedback.
Perform semantic search across indexed library content via a local Qdrant vector database.
This skill is the librarian agent's primary method for consulting local knowledge bases. Use it before falling back to grep-based file search.
Semantic search finds relevant content even when exact keywords don't match — a query for "flash loan price manipulation" will surface content about oracle attacks and sandwich attacks that grep would miss.
The search script is at skills/librarian-library-search/scripts/search.py
inside the plugin directory.
uv run /path/to/grimoire/skills/librarian-library-search/scripts/search.py \
"your natural language query here"
| Flag | Default | Description |
|---|---|---|
--limit | 5 | Maximum number of results |
--library | (all) | Filter to a specific library name |
# Broad search across all libraries
uv run .../search.py "reentrancy vulnerability in pull-payment pattern"
# Scoped to a single library
uv run .../search.py "access control bypass" --library smart-contract-vulnerabilities
# More results
uv run .../search.py "ERC-4626 share inflation" --limit 10
The script prints a JSON array to stdout. Each element has:
{
"score": 0.82,
"content": "[library-name] path/to/file\n\n...chunk text...",
"metadata": {
"library": "smart-contract-vulnerabilities",
"file": "vulnerabilities/reentrancy.md",
"chunk_idx": 2,
"source_url": "git@github.com:kadenzipfel/smart-contract-vulnerabilities.git"
}
}
librarian-index and fall back to grep for now.librarian-index
to build or rebuild the index.sentence-transformers/all-MiniLM-L6-v2). Do not change --embedding_model
unless you also re-indexed with that model.