agentleFS
sandraschisandraschi/calibremcp/skills/semantic_search/SKILL.md

semantic_search

Skill50 starsChanged 23 days agoMITView on GitHub

Description: Find books by meaning using LanceDB over title, authors, tags, comments, and series. Supports hybrid keyword + vector search across your entire Calibre library.

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Index check: If no index exists, call calibre_metadata_index_build() first (runs async, takes 1-5 min per 1000 books).

    line 24
  2. Very specific:

    Metadata search: Use calibre_metadata_search() for broad semantic queries.

    line 25
  3. Very specific:

    Phrase match: Use quotes in search_fulltext — "machine learning"

    line 32

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Semantic Search (Metadata RAG)

Description: Find books by meaning using LanceDB over title, authors, tags, comments, and series. Supports hybrid keyword + vector search across your entire Calibre library.

Trigger Phrases

  • "Find books about [topic]"
  • "Search my library for [query]"
  • "What do I have on [subject]?"
  • "Show me books similar to [title]"
  • "Find [author] books about [theme]"

Tools

  • calibre_metadata_index_build() — Build or rebuild the LanceDB metadata index. Run once per library or after large batch imports.
  • calibre_metadata_search(query="...", top_k=10) — Natural-language semantic search over book metadata. Returns ranked results with relevance scores.
  • rag_index_build() — Build full-text content index from ebook text (requires epub/mobi extraction).
  • rag_retrieve(query="...", top_k=5) — Semantic search over full book contents, not just metadata.
  • search_fulltext(query="...") — Legacy full-text search with exact phrase matching and boolean operators.
  • query_books(search="...", tags=[...], authors=[...]) — Structured metadata filtering with AND/OR logic.

Workflow

  1. Index check: If no index exists, call calibre_metadata_index_build() first (runs async, takes 1-5 min per 1000 books).
  2. Metadata search: Use calibre_metadata_search() for broad semantic queries. Combine with top_k to control result breadth.
  3. Filter refinement: Narrow results by chaining with query_books() using author, tag, or series filters.
  4. Deep content search: For research-style queries, call rag_retrieve() to search inside book text. Caveat: works best on epub format.
  5. Result presentation: Return title, author, relevance score, and match highlights. Include calibre book_id for follow-up actions (open, metadata edit, export).

Search Operators

  • Phrase match: Use quotes in search_fulltext — "machine learning"
  • Boolean: search_fulltext(query="python AND (data science OR ML)")
  • Tag filter: query_books(tags=["python", "tutorial"], limit=20)
  • Date range: query_books(added_since="2024-01-01")

Examples

  • "Find programming books about Python and data science." → calibre_metadata_search(query="programming Python data science")
  • "Search inside my books for mentions of gradient descent." → rag_retrieve(query="gradient descent", top_k=5)
  • "What sci-fi books do I have about AI consciousness?" → calibre_metadata_search(query="sci-fi AI consciousness") then filter with query_books(tags=["science fiction"])

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.