LABHDUFBA Agentes AcadêmicosLABHDUFBA · UFBA PortuguêsPT
Home / Catalogue / SS-0001

Zotero Reference Management for Research Pipelines

Read, search, export and create Zotero references through the Web API v3, under the principle that the API key defines the boundary of access.

SS-0001 Research infrastructure Tested Available Foundation v1.0.0· MIT
ZoteroHermes AgentPython

What it solves

Turn a Zotero library into a reliable, citable data source for research pipelines: enumerate, filter, export and write references through the Web API v3 — no browser, no scraping, no personal identifiers in the package.

Web API v3Exports BibTeX/CSLRespects the key's scope

Requirements

What you must have before running this skill. Everything required appears here — credentials included.

Zotero API key

RequiredcredentialZOTERO_API_KEY

What it is: A personal key created in your Zotero account. It authorises the skill to read (and, if you allow it, write to) your library.

How to get it: Zotero → Settings → Security → Applications → Create new private key. Grant only the permissions you intend: library read access, write access if the skill will create items, and private library access if that is your case. Copy the key when it is created — it is never shown again.

export ZOTERO_API_KEY="sua_chave_aqui"

Careful: The key is a credential: keep it out of code, repositories, versioned notebooks and screenshots. Use an environment variable.

Library ID

RequiredidentifierZOTERO_LIBRARY_ID

What it is: Your library number (userID). It appears on the same keys page, next to your username.

How to get it: On the keys settings page, the number next to your username is the library ID. For group libraries, use the group ID.

export ZOTERO_LIBRARY_ID="123456"

Careful: It is not secret, but it identifies your account: avoid publishing it alongside research data.

Library type

RequiredsettingZOTERO_LIBRARY_TYPE

What it is: Whether the library is personal (user) or a group library (group).

How to get it: Personal library → user. A shared group library → group (and the ID becomes the group's).

export ZOTERO_LIBRARY_TYPE="user"   # ou "group"

Careful: Not a credential; it determines which endpoint the client queries.

Installation and activation

git clone https://github.com/LABHDUFBA/scholarskills.git
cd scholarskills/zotero-reference-management
python3 -m pip install -r requirements.txt
export ZOTERO_API_KEY="..."
export ZOTERO_LIBRARY_ID="123456"
export ZOTERO_LIBRARY_TYPE="user"
  1. Copy the package directory into your agent's skills folder.
  2. Start a new session so the agent re-reads its skills.
  3. Confirm the skill appears in the environment's list before using it.
  4. Only then ask for the task, within the scope and permissions you granted.

In Hermes Agent: hermes skills list and, in session, /skill <name>.

In Claude Code: the directory name becomes the /name command.

Step-by-step guide with activation check →

How it works

  1. Resolve the library with GET /keys/{key}: the numeric userID and the permission scope.
  2. Count with the Total-Results header and itemType=-attachment, never with the length of a page.
  3. Paginate with start until an empty page — not for a fixed number of iterations.
  4. Export to BibTeX, RIS or CSL JSON; per collection for large libraries, because BibTeX export ignores limit.
  5. Write with POST of a JSON array, and only when the key's scope allows it.
  6. Refuse politely: a 403 is reported as a scope limit, never worked around.

Evidence

What this package records publicly, dimension by dimension. A record is not the same as scientific quality.

  • Structural conformanceRecorded

    validate_skill.py: PASS, 0 avisos; local run on 2026-11-26.

    Validator applied, specification version and result recorded.

  • Functional testsRecorded

    20 automated tests, mocked HTTP layer, environment recorded on 2026-11-24.

    Positive, negative and edge cases; environment, result and date recorded.

  • Methodological assessmentNot recorded

    Not recorded.

    Protocol, benchmark, adequate metrics and limitations.

  • Peer reviewNot recorded

    Not recorded.

    Editorial policy, authorised reports, version and decision.

  • Independent re-executionNot recorded

    Not recorded.

    Non-author executor, environment, version, results and divergences.

  • Scientific replicationNot recorded

    Not recorded.

    Where applicable, assessment on new data or a new study under a defined protocol.

The environment, command and output are in tests/RESULTS.md. tests/RESULTS.md ↗

Limits

The API serves metadata, not PDFs that are not synchronised in Zotero Storage. BibTeX export on the items endpoint ignores pagination. Tag filters take one tag per request. Write access to a group library depends on the key's scope and cannot be widened from the client.

Authors

NameAffiliationORCID
Leonardo Fernandes NascimentoDigital Humanities Laboratory (LABHDUFBA), Federal University of Bahia0000-0003-2929-1115
Eric BrasilInstitute of Humanities and Languages, University of International Integration of Afro-Brazilian Lusophony (UNILAB)0000-0001-5067-8475
Ricardo SodréFederal University of Bahia0000-0003-3107-3686

ORCIDs are included only when each author supplies them; none is invented.

Licence: MIT

How to cite

Nascimento, L. F.; Brasil, E.; Sodré, R. (2026). Zotero Reference Management (ScholarSkills SS-0001, version 1.0.0) [Software]. Digital Humanities Laboratory, Federal University of Bahia. https://github.com/LABHDUFBA/zotero-reference-management. DOI: 10.5281/zenodo.24505402

DOI: 10.5281/zenodo.24505402

The version DOI identifies the run; the concept DOI gathers the versions.

BibTeX
@software{ss0001,
  author = {Leonardo Fernandes Nascimento and Eric Brasil and Ricardo Sodré},
  title = {Zotero Reference Management for Research Pipelines},
  year = {2026},
  version = {1.0.0},
  publisher = {Digital Humanities Laboratory, Federal University of Bahia},
  url = {https://github.com/LABHDUFBA/scholarskills},
  doi = {10.5281/zenodo.24505402}
}

Package links