zotkit
AGENTS.md25 starsChanged 4 months agoMITView on GitHub
You (an AI agent) were likely given this repo because your user wants you to manage their Zotero library with zotkit. Here is exactly how to proceed. (Developing zotkit itself instead? Read CLAUDE.md, not this file.) Requires Python 3.11+. Works on macOS, Windows, Linux — no Zotero desktop app needed. Create the credentials file from .env.example at ./.env, ~/.config/zotkit/env, or $ZOTKIT_ENV: - Ask the user to create an API key (with write access) at <https://www.zotero.org/settings/keys> and tell you the key…
- Reads credentials
- Installs packages
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
We split this AGENTS.md into the rules it gives an agent
6 rules. About 1 is common, 3 are distinctive, and 2 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 17
Create the credentials file from .env.example at ./.env, ~/.config/zotkit/env, or $ZOTKIT_ENV:
- Common: line 20
Ask the user to create an API key (with write access) at <https://www.zotero.org/settings/keys> and tell you the key + the numeric userID …
- Distinctive: line 23
If they sync attachment files via WebDAV, ask them to open the Zotero desktop app →
- Very specific: line 29
After writing the .env, run zotkit doctor — it validates config, API access, and attachment storage, and says what to fix.
- Distinctive: line 37
If the user asks you to clean up or reorganize their library — whether it's a mess or already organized — docs/organizing-with-agents.md is …
- Distinctive: line 92
If a paper/metadata source is paywalled or bot-walled, stop and ask the user — never try to bypass it.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Instructions for AI agents
You (an AI agent) were likely given this repo because your user wants you to manage their Zotero library with zotkit. Here is exactly how to proceed. (Developing zotkit itself instead? Read CLAUDE.md, not this file.)
1. Install
pipx install zotkit # or: uv tool install zotkit / pip install zotkitRequires Python 3.11+. Works on macOS, Windows, Linux — no Zotero desktop app needed.
2. Configure (interactive — involve the user)
Create the credentials file from .env.example at ./.env,
~/.config/zotkit/env, or $ZOTKIT_ENV:
- Ask the user to create an API key (with write access) at https://www.zotero.org/settings/keys and tell you the key + the numeric userID shown on that page.
- If they sync attachment files via WebDAV, ask them to open the Zotero desktop app →
Settings → Sync → File Syncing and read you the WebDAV URL/username/password;
append
/zotero/to the URL. (If they use Zotero Storage, skip theWEBDAV_*lines entirely —attach/fetchautomatically use Zotero Storage instead.) - Never print, cat, echo, or commit the .env or any credential.
After writing the .env, run zotkit doctor — it validates config, API access, and
attachment storage, and says what to fix. Don't proceed until it prints "all good".
Optionally set up tag conventions from conventions.example.toml — do this WITH the user; read docs/organizing-with-agents.md first for the design principles (shallow single-axis collections, namespaced facet tags).
If the user asks you to clean up or reorganize their library — whether it's a mess or already organized — docs/organizing-with-agents.md is the complete playbook: design principles, the backup → read-only proposals → reviewed serial writes loop, and the audit checklist for second passes.
3. Operate
Full task recipes live in skills/zotkit/SKILL.md — if your
harness supports skills, install it (cp -r skills/zotkit ~/.claude/skills/); otherwise
just read it. Quick reference:
zotkit find --title "..." | --tag ns:value | --collection "Name"
zotkit find --any TEXT [--abstract TEXT] # metadata-wide (title+abstract+creators+
# tags+extra); filters AND together. Non-
# visible matches get a `hit: field "..."` line.
# Existence check when there's no arXiv id/DOI:
# --any <lastname> (with ids: create's dry run)
# 1st call downloads the library; later calls
# use a version-checked cache (still complete)
zotkit show KEY [KEY...] [--json] # read-only lookup by key, one line each;
# unknown key -> one stderr line + exit 1
# (--verbose for the full API exception)
zotkit create --arxiv <id|url> ... # fetch arXiv metadata; --apply attaches PDFs too
zotkit create --doi <doi> ... # fetch CrossRef metadata (no PDF; attach manually)
zotkit create --file x.json # batch from JSON
# all three: dry-run; add --apply to execute
# dedup (DOI/title) is the default: the dry run
# prints "already in library as <KEY>" for
# items --apply would skip; --no-dedup forces.
# With ids in hand this dry run IS the
# existence check: no find loop first
zotkit enrich --key K [K...] # complete EXISTING items in place — never
# delete+recreate (item keys must stay stable)
zotkit enrich --missing abstract|doi | --all # batch enrich (rate limiting internal)
# "NOTE abstract still missing: <source> has
# none" = source can't fill it, not "all fine"
zotkit audit [--json] # read-only library health report
zotkit abstract --key K --source SLUG # store an OWNER-PROVIDED abstract with
# provenance; --force only on owner's say-so
zotkit attach --from x.created.json --all
zotkit fetch --key KEY --out downloads # prefer an explicit --out OUTSIDE any git
# repo (default ./downloads; it warns in a repo)
zotkit export --key K [K...] [-o refs.bib] # BibTeX; cite key = Zotero item key
zotkit tag KEY topic:foo | zotkit status KEY read | zotkit move KEY "Collection"
zotkit backup | zotkit lint tag...Safety rules (non-negotiable)
zotkit backupbefore any bulk write. Writes sync to zotero.org and ALL the user's devices.createis dry-run by default — show the user the dry output before--apply.- Reuse the user's existing tags/collections (see
zotkit findoutput) instead of inventing new ones; if conventions.toml exists, violations are rejected in code. - If a paper/metadata source is paywalled or bot-walled, stop and ask the user — never try to bypass it.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

