zotero-cli
Ce qu’il fait
Cette compétence apprend à un agent à travailler avec une bibliothèque de références Zotero à l'aide de la commande zotero-cli. Elle couvre la recherche d'articles, la lecture de leur texte, la modification des détails et l'export des bibliographies.
Quand l’utiliser
- ✓Quand un utilisateur pose des questions sur des articles ou des références enregistrés dans Zotero.
- ✓Quand un utilisateur veut ajouter un article à Zotero à partir d'un DOI, d'une URL ou d'un ISBN.
- ✓Quand un utilisateur a besoin d'une bibliographie exportée depuis sa bibliothèque Zotero.
Lien du skill
https://github.com/54yyyu/zotero-mcp/blob/main/src/zotero_mcp/skills/zotero-cli/SKILL.mdCopiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.
Comment l’utiliser
Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.
Message prêt à coller
Pour Claude Code, Codex ou Cursor : lancez-la dans le dossier du projet et le skill est installé.
Téléchargez le SKILL.md et placez-le dans le dossier de skills de votre agent.
Exemple de demande à votre IA
“Trouve dans ma bibliothèque Zotero les articles sur les mécanismes d'attention et exporte-les sous forme de bibliographie.”
5 nouveaux skills par semaine. 1 minute de lecture.
Comment ça marche
L'agent lance des commandes zotero-cli en mode JSON, trouve les clés d'éléments par recherche, puis agit sur ces clés. Si Zotero est inaccessible, l'agent le signale au lieu de deviner le contenu de la bibliothèque.
Contenu technique (SKILL.md original)
Texte original de l’auteur, en anglais, directement depuis GitHub.
Zotero from the shell
zotero-cli reaches a Zotero library directly. Prefer it over the Zotero MCP
server when you have shell access: the MCP server's tool schemas cost ~14k
tokens of context on every request whether or not you use them, while this
costs only what you actually run.
Check it is set up before the first real call:
zotero-cli config # prints the resolved Zotero settings
If that fails, Zotero is not reachable. Local mode needs the Zotero desktop
app running with its local API enabled; web mode needs ZOTERO_API_KEY and
ZOTERO_LIBRARY_ID. Say so rather than guessing at library contents.
Always pass --json when you will read the output
Default output is markdown for humans. --json gives you one object per
invocation with a stable shape, so you never parse prose:
{"ok": true, "command": "search", "schema": 1, "data": {...}}
{"ok": false, "command": "search", "schema": 1, "error": {"message": "...", "code": "..."}}
Both go to stdout; [INFO]/[WARN] diagnostics go to stderr. Check ok
before using data. Run zotero-cli --json-schema for the full contract.
The core loop
Almost every task is: find keys → act on keys. Item keys are 8 characters and are the currency of every command.
# 1. find - use --detail keys_only to keep the result small while browsing
zotero-cli --json search "attention mechanisms" --limit 10 --detail keys_only
# 2. act - metadata, full text, or a page range
zotero-cli --json get metadata ABCD1234
zotero-cli --json get fulltext ABCD1234
zotero-cli --json read ABCD1234 --start-page 3 --end-page 8
Pipe keys straight into the next call:
zotero-cli --json search "diffusion models" --limit 5 --detail keys_only \
| jq -r '.data.items[].key' \
| while read -r key; do zotero-cli --json get metadata "$key"; done
Choosing a search mode
| Mode | Use it for | Command |
|---|---|---|
items (default) |
a title, author or phrase you know | search "Vaswani attention" |
semantic |
a topic or idea, no exact wording | search --mode semantic "why transformers scale" |
tag |
items you filed under a tag | search --mode tag "to-read,important" |
advanced |
structured field conditions | search --mode advanced --conditions '[...]' |
citekey |
a BibTeX citation key | search --mode citekey smith2020 |
notes |
text inside your notes, not item fields | search --mode notes "research question" |
semantic needs the search index built (zotero-cli db status to check,
zotero-cli db update to build). If it is empty, fall back to items and
say why rather than reporting no results.
Every search covers one library — the active one. When you don't know which
library holds something, or a search comes up empty and the item might live in
a group library, add --all-libraries:
zotero-cli search "Cladder-Micus" --all-libraries
Each result is then labelled **Library:** <name>. It needs the SQLite backend,
the default in local mode, and errors clearly if it is not in use, so try it
once and fall back to per-library searches if it is refused. Tag filters work
with it; --collection does not, because a collection lives inside one library.
Reading efficiently
get fulltext on a book-length PDF returns a great deal of text. When you
need one section, use the outline to find it and read only those pages. To
locate a passage by its words, --find returns the matching pages with short
snippets instead of the pages themselves:
zotero-cli --json outline ABCD1234
zotero-cli --json read ABCD1234 --find "robustness check"
zotero-cli --json read ABCD1234 --start-page 42 --end-page 55
For "what does my library say about X", prefer search --mode semantic
followed by targeted get metadata over reading whole papers.
Paging
Listings cap at --limit. When more exists, the response says so and names
the next offset:
zotero-cli --json get collection-items QS7TQPPA --limit 100 --offset 100
Keep going until data.count is less than --limit.
Writing
Write commands report what they did as text under data.text.
zotero-cli add doi 10.1038/s41586-021-03819-2 -c "Reading List"
zotero-cli edit ABCD1234 --title "Corrected Title" --add-tags reviewed
zotero-cli notes create --item-key ABCD1234 --text "Key finding: ..."
zotero-cli batch --item-keys A1B2C3D4,E5F6G7H8 --add-tags screened
Note text is Markdown, converted to Zotero's no
Questions fréquentes
L'application Zotero doit-elle être ouverte ?
En mode local, oui. La compétence indique que l'application de bureau Zotero doit tourner avec son API locale activée.
De quoi a besoin le mode web ?
Le mode web nécessite une clé d'API et un identifiant de bibliothèque, comme le décrit la compétence.
Pourquoi utiliser la sortie JSON ?
La sortie JSON a une structure stable, donc l'agent n'a pas besoin de lire du texte pour trouver les résultats.
Détails
Description originale de l’auteur
Read and write a Zotero library from the shell with the `zotero-cli` command - search papers by keyword or meaning, read PDF full text and page ranges, get and set metadata, manage collections, tags, notes and annotations, add items by DOI/URL/ISBN, and export bibliographies. Use whenever the user asks about their Zotero library, references, citations, papers they have saved, or their reading notes.
repo: 54yyyu/zotero-mcp
Popularité
- Étoiles GitHub
- 5.7k
- Position au classement
- #14755
- Licence
- MIT
- Mis à jour
- 31/10/2026
Commentaires
- …
Autres skills de ce dépôt
Skills similaires
graincrawl
394kPermet à votre agent de chercher dans vos notes et transcriptions de réunions Granola sauvegardées, de vérifier leur fraîcheur et de les compter sur une période.
notcrawl
394kPermet à votre agent de chercher dans une copie sauvegardée de votre espace Notion, de consulter pages et bases, et d'exporter des pages en Markdown.
knowledge-entities
394kAide votre agent à identifier des personnes, des entreprises et des projets, puis à rédiger pour eux des pages de profil sourcées dans votre coffre Knowledge.