Zotero logo

Zotero

Community
congcongwang0122
zotero

Use Zotero Desktop to enable/probe the local API, search a local Zotero library, list items/collections/tags, export BibTeX, insert citation keys into LaTeX or Markdown drafts, read indexed full text and PDF content when requested, and import BibTeX/RIS records into Zotero through the connector server. Use when the user mentions Zotero, citations, references.bib, BibTeX export, local Zotero API, localhost:23119, or adding citations from a Zotero library.

Overview

Publishercongcongwang0122
Repositoryzotero-skill
Skill namezotero
Stars
200
Forks
4
Bundled files
5
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 5 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by congcongwang0122 on GitHub. Read the source before you install it.

Installation

Install the Zotero AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/congcongwang0122/zotero-skill/tree/main
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/congcongwang0122/zotero-skill.git \
  .claude/skills/zotero
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Zotero in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Zotero on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Zotero is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Zotero

Use this skill to operate a user's local Zotero Desktop library.

Connection Setup

Before any operation, ensure Zotero is running and the local API is enabled:

  1. Open Zotero Desktop application
  2. Enable Local API: Edit > Preferences > Advanced > check "Allow other applications on this computer to communicate with Zotero" (可用于 http://localhost:23119/api/)
  3. Verify connection:

PowerShell (Windows)

powershell
Invoke-WebRequest -Uri "http://127.0.0.1:23119/api/users/0/collections" -Headers @{ "Zotero-API-Version" = "3" } -UseBasicParsing

curl (cross-platform)

bash
curl -s -H "Zotero-API-Version: 3" "http://127.0.0.1:23119/api/users/0/collections"

If the connection fails with "connection closed":

  • The local API preference is not yet enabled
  • Close and reopen Zotero after checking the preference
  • Or manually add to prefs.js: user_pref("extensions.zotero.httpServer.localAPI.enabled", true);

Direct HTTP API Usage

When the Python helper script is unavailable or fails, use direct HTTP calls to the Zotero local API (port 23119).

List collections (folders)

bash
curl -s -H "Zotero-API-Version: 3" "http://127.0.0.1:23119/api/users/0/collections"

Response includes key, name, and meta.numItems for each collection.

List items in a collection

bash
# Top-level items only
curl -s -H "Zotero-API-Version: 3" "http://127.0.0.1:23119/api/users/0/collections/{collectionKey}/items/top?limit=25"

# All items (including attachments)
curl -s -H "Zotero-API-Version: 3" "http://127.0.0.1:23119/api/users/0/collections/{collectionKey}/items?limit=25"

Search across library

bash
curl -s -H "Zotero-API-Version: 3" "http://127.0.0.1:23119/api/users/0/items?q=transformer&limit=10"

Export BibTeX

bash
curl -s -H "Zotero-API-Version: 3" "http://127.0.0.1:23119/api/users/0/items?format=bibtex&limit=100"

Get item children (attachments)

bash
curl -s -H "Zotero-API-Version: 3" "http://127.0.0.1:23119/api/users/0/items/{itemKey}/children"

Get attachment file URL

bash
curl -s -H "Zotero-API-Version: 3" "http://127.0.0.1:23119/api/users/0/items/{attachmentKey}/file/view/url"

Reading PDFs from Zotero

Zotero stores PDFs in its local storage. To read PDF content:

1. Find the PDF local path

Zotero stores attachments under %USERPROFILE%\Zotero\storage\{attachmentKey}\.

Get the attachment key from the item's children:

bash
curl -s -H "Zotero-API-Version: 3" "http://127.0.0.1:23119/api/users/0/items/{itemKey}/children"

The response includes links.attachment.href and data.filename.

2. Locate the PDF file

The PDF is typically at:

%USERPROFILE%\Zotero\storage\{attachmentKey}\{filename}.pdf

Example:

powershell
Get-ChildItem "$env:USERPROFILE\Zotero\storage\HQV9AFD4"

3. Read PDF content with pdfplumber

Install pdfplumber (requires Python):

bash
py -m pip install pdfplumber

Extract text:

python
import pdfplumber
pdf_path = r"C:\Users\{user}\Zotero\storage\{attachmentKey}\{filename}.pdf"
with pdfplumber.open(pdf_path) as pdf:
    for i, page in enumerate(pdf.pages[:5]):  # first 5 pages
        text = page.extract_text()
        print(f"--- Page {i+1} ---")
        print(text[:2000] if text else "(no text)")

4. Alternative: Use Codex bundled Python

If system Python lacks pip, use Codex's bundled Python:

powershell
$python = "C:\Users\{user}\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\python.exe"
& $python -m pip install pdfplumber
& $python -c "import pdfplumber; ..."

Python Helper Script

When available, the stdlib-only helper script provides convenience:

bash
py <skill-root>/scripts/zotero.py <command>

Note for macOS/Linux users: Use python3 instead of py if the py launcher is not available.

Fast starts

Check readiness:

bash
py scripts/zotero.py status --json

Enable local API and restart Zotero:

bash
py scripts/zotero.py enable --restart

Search and export:

bash
py scripts/zotero.py search "transformer" --json
py scripts/zotero.py export-bibtex --out references.bib

Workflow

  1. Verify Zotero is running and local API is enabled.
  2. Choose connection method:
    • Prefer direct HTTP API calls when the Python helper is unavailable
    • Use the helper script when available for convenience
  3. Read-only operations (safe by default):
    • List collections/items via HTTP API
    • Search library
    • Export BibTeX
    • Read PDFs from local storage
  4. Attachment/PDF access: Only retrieve when explicitly requested
  5. Write operations: Confirm with user before import/save actions

Common HTTP API Patterns

Summarize a collection

bash
# 1. Get collection key
curl -s -H "Zotero-API-Version: 3" "http://127.0.0.1:23119/api/users/0/collections"

# 2. Get items in collection (extract title, abstract, creators)
curl -s -H "Zotero-API-Version: 3" "http://127.0.0.1:23119/api/users/0/collections/{key}/items/top?limit=50"

# 3. For each item, get children to find PDF attachment key
curl -s -H "Zotero-API-Version: 3" "http://127.0.0.1:23119/api/users/0/items/{itemKey}/children"

# 4. Read PDF from %USERPROFILE%\Zotero\storage\{attachmentKey}\

Export collection to BibTeX

bash
curl -s -H "Zotero-API-Version: 3" "http://127.0.0.1:23119/api/users/0/collections/{key}/items?format=bibtex" > collection.bib

Output standards

  • For inventory/search, return title, creators, year, Zotero item key, and BibTeX key when available.
  • For PDF reading, summarize key findings: research question, method, results, and conclusions.
  • For .bib export, return the absolute output path and entry count.
  • For blockers, name the exact gate: Zotero app missing, local API disabled, port closed, no matching item, or PDF not found.

Route details

Read references/local-api-routes.md for complete endpoint documentation.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Zotero AI skill do?

Use Zotero Desktop to enable/probe the local API, search a local Zotero library, list items/collections/tags, export BibTeX, insert citation keys into LaTeX or Markdown drafts, read indexed full text and PDF content when requested, and import BibTeX/RIS records into Zotero through the connector server. Use when the user mentions Zotero, citations, references.bib, BibTeX export, local Zotero API, localhost:23119, or adding citations from a Zotero library.

Why use Zotero on TypingMind?

Because you install it once and use it with any model. Zotero is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Zotero in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/congcongwang0122/zotero-skill/tree/main. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Zotero?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Zotero?

As many as you like. As long as a model supports skills, you can use Zotero with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Zotero AI skill free?

It is published on GitHub by congcongwang0122. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇