alterlab-pyzotero
Installation
SKILL.md
Pyzotero
Pyzotero is a Python wrapper for the Zotero API v3 (current release 1.15.x as of 2026-09). Use it to programmatically manage Zotero libraries: read items and collections, create and update references, upload attachments, manage tags, and export citations. It also ships an optional CLI and MCP server for a local Zotero library.
No key is needed for the user's own library. Pick the access path before writing code:
| Path | Needs | Reads | Writes |
|---|---|---|---|
| Local API (default when Zotero is open) | Zotero 7+ desktop running, Settings > Advanced > "Allow other applications on this computer to communicate with Zotero" | everything: items, collections, tags, full text, saved searches | Zotero 10+ after the user clicks Allow in Zotero (authorize_local) — a local key, not a zotero.org key |
| Exported file (Zotero closed, another machine, a colleague's export) | a .bib (Better BibTeX auto-export, or File > Export Library), CSL JSON or RIS file |
scripts/zotero_export.py: search, tags, stats, duplicates, missing fields, subset export |
an importable RIS / CSL JSON / BibTeX file the user adds with File > Import… (new-item --doi fills metadata from Crossref, keyless) |
| Web API (optional) | ZOTERO_API_KEY + ZOTERO_LIBRARY_ID from zotero.org/settings/keys |
the synced web library, incl. group libraries | direct create / update / delete, file uploads |
Ask for (or check) which one applies only when it matters; when the user has given an export file, use it; when they have neither file nor key, write the local-API code and say which Zotero setting it needs. Never ask the user to paste a key into the chat.