huang-sh/pix/zotero-cli
Claude Code and agent skill by huang-sh/pix
- community
Checking that the SKILL.md file is still in the repository.
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.
Install
npx vskill@latest install huang-sh/pix/zotero-cliSKILL.md
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:
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. When the zotero-cli command itself is missing, install it as described in install.md in this skill directory and continue with the task.
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:
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.
Pipe keys straight into the next call:
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 |
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:
Each result is then labelled **Library:** <name>. It needs the server running with ZOTERO_SEARCH_BACKEND=sqlite and errors clearly if it is not, 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:
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:
Keep going until data.count is less than --limit.
Writing
Write commands report what they did as text under data.text.
add is idempotent by default: re-running files the existing item into the named collection rather than creating a duplicate. Use --if-exists skip to never touch an existing item.
Before a destructive change (delete, duplicates merge, a batch over many items), confirm with the user and show what will be affected. delete item refuses notes unless --allow-note is passed.
When something looks wrong
- Empty search results: check
zotero-cli configand, for semantic mode,
zotero-cli db status. Do not report "you have no papers on X" until you know the library is actually reachable and indexed.
ok: false: readerror.message. It names the cause.- A partial-results note on a search means the scan was cut short, not that
nothing else matched. Narrow the query and re-run.
- An item marked
"deleted": trueis in the trash. Do not treat it as part
of the live library.
Full command reference
reference.md in this skill directory lists every command and flag. Read it when you need something not covered above. zotero-cli <command> --help also works for any single command.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/zotero-cli/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/huang-sh/pix/zotero-cli)