Query your local Zotero library. Supports keyword, fulltext, author, collection, tag, DOI, and recent-additions search. Trigger: /zotero, "my papers", "Zotero", "find paper", "references", "citations". After installation, verify DEFAULT_DB path in scripts/zotero-search.py points to your zotero.sqlite.
Query a local Zotero library (zotero.sqlite), read-only, zero external dependencies.
Setup: The default database path is
~/Zotero/zotero.sqlite(standard on macOS/Linux). Windows users: changeDEFAULT_DBinscripts/zotero-search.pyto your Zotero data directory, typicallyC:\Users\<username>\Zotero\zotero.sqlite. You can also override per-call with--db PATH.
python3 .claude/skills/zotero/scripts/zotero-search.py <mode> <query> [options]
| Mode | Command | Description |
|---|
| Keyword search | search "query" | Search title, abstract, journal, authors, notes |
| Fulltext search | fulltext "word1 word2" | Search PDF body text (inverted index, exact word match, AND semantics), ranked by metadata relevance |
| Author search | author "name" | By author name (partial match) |
| Browse collection | collection list / collection "name" | List or browse collections |
| Recent additions | recent [--days N] | Items added in last N days (default: 30) |
| Tag search | tag list / tag "name" | List or search by tag |
| DOI lookup | doi "10.xxxx/..." | Exact DOI match |
| Get by key | get KEY1 KEY2 ... | Batch fetch by itemKey, preserves input order |
| Flag | Default | Description |
|---|---|---|
--limit N | 20 | Max results |
--type TYPE | all | Filter by type: journalArticle / book / conferencePaper / preprint |
--compact | false | Compact output (title, authors, year, journal, URI only) — good for scanning |
--db PATH | ~/Zotero/zotero.sqlite | Override database path |
Map user requests to search modes:
searchauthorcollectionrecenttagdoifulltextsearchRun the command, get JSON results.
Strategy:
search mode auto-ranks by relevance (phrase match > whole word > substring), output includes relevance score--compact first to scan results, then get KEY1 KEY2 ... to fetch full details for selected itemssearch is noisy, supplement with fulltext (exact word match, less noise)search returns nothing -> auto-try fulltext (keywords may appear in PDF body, not title/abstract).
zoteroURI (clickable link to open in Zotero)When the user is writing a paper/document:
(Author, Year)No complex SQL needed. For "papers by [author] about [topic]":
search "topic keywords"fulltext is exact word match (no phrases, no fuzzy, no stemming), multi-word = AND