zotero-keeper
AGENTS.md7 starsChanged 7 months agoApache-2.0View on GitHub
These are the workspace instructions for Codex when using Zotero Keeper and PubMed Search MCP through the VS Code extension. Help the user search biomedical literature, inspect papers, and import selected articles into Zotero without losing provenance or overwriting user choices. 1. Start broad literature discovery with unified_search. 2. Use validate_pico_plan(description=question, p=..., i=..., c=..., o=...) and generate_search_queries for clinical or comparison questions. 3. Reuse session state with read_session(request={"action":"pmids"}), read_session(request={"action":"article","pmid":"..."}), and read_session(request={"action":"summary"}). 4. Use related/citing/reference/fulltext tools for follow-up instead of rerunning…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 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.
In this repository15 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- changelog-updaterSkill
- code-refactorSkill
- code-reviewerSkill
- ddd-architectSkill
- git-doc-updaterSkill
- git-precommitSkill
- memory-checkpointSkill
- memory-updaterSkill
- project-initSkill
- readme-i18nSkill
- readme-updaterSkill
- roadmap-updaterSkill
- test-generatorSkill
- uv-enforcerSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
25 rules. About 0 are common, 8 are distinctive, and 17 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
17
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Use Traditional Chinese unless the user asks otherwise.
- Distinctive: line 15
Ask before importing anything into Zotero.
- Very specific: line 16
Keep PubMed search/discovery/export work in PubMed Search MCP.
- Distinctive: line 17
Keep persistence, collection selection, and Zotero inspection in Zotero Keeper.
- Very specific: line 21
Start broad literature discovery with unified_search.
- Very specific: line 22
Use validate_pico_plan(description=question, p=..., i=..., c=..., o=...) and generate_search_queries for clinical or comparison questions.
- Very specific: line 24
Use related/citing/reference/fulltext tools for follow-up instead of rerunning the same search.
- Very specific: line 25
Use build_research_chronicle and read_research_chronicle for persistent research-history artifacts.
- Very specific: line 26
Before saving to Zotero, call list_collections unless the destination is already confirmed.
- Very specific: line 27
Check duplicates with check_articles_owned.
- Very specific: line 28
Use import_articles as the default PubMed-to-Zotero handoff.
- Very specific: line 32
Ensure local authorization.
- Very specific: line 37
Treat .codex/skills, .claude/skills, .cline/skills, and .clinerules as bundled assistant harness assets.
- Very specific: line 38
Run npm run sync-assets before packaging the VSIX.
- Very specific: line 39
Keep vscode-extension/resources/repo-assets/ synchronized with its source files.
- Distinctive: line 44
Do not import into the Zotero root collection without explicit confirmation.
- Distinctive: line 46
Do not assume the target collection.
- Distinctive: line 47
Do not repeat searches when session state already contains the relevant PMIDs.
- Distinctive: line 49
Keep NCBI email/API-key and institutional access settings intact.
- Very specific: line 50
Never expose or forward Zotero port 23119, request a Local API key, or retry a 412 version conflict automatically.
- Very specific: line 52
Every confirmed Local API mutation requires the expected_server_id shown in its approved preview.
- Very specific: line 55
Use the response-bound object version for exact updates and single-object deletes.
- Very specific: line 60
Before attach_file_to_item or replace_attachment_file, call authorize_local_writes(require_remembered=true) and have the user choose
- Very specific: line 76
Use update_item_tags, update_item_creators, update_note, batch_update_item_fields for scoped edits.
- Distinctive: line 77
Every edit requires the approved Server-ID and exact object version.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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
Zotero + PubMed MCP Codex Harness
These are the workspace instructions for Codex when using Zotero Keeper and PubMed Search MCP through the VS Code extension.
Goal
Help the user search biomedical literature, inspect papers, and import selected articles into Zotero without losing provenance or overwriting user choices.
Working Style
- Use Traditional Chinese unless the user asks otherwise.
- Explain search/import steps briefly.
- Ask before importing anything into Zotero.
- Keep PubMed search/discovery/export work in PubMed Search MCP.
- Keep persistence, collection selection, and Zotero inspection in Zotero Keeper.
Core Workflow
- Start broad literature discovery with
unified_search. - Use
validate_pico_plan(description=question, p=..., i=..., c=..., o=...)andgenerate_search_queriesfor clinical or comparison questions. - Reuse session state with
read_session(request={"action":"pmids"}),read_session(request={"action":"article","pmid":"..."}), andread_session(request={"action":"summary"}). - Use related/citing/reference/fulltext tools for follow-up instead of rerunning the same search.
- Use
build_research_chronicleandread_research_chroniclefor persistent research-history artifacts. - Before saving to Zotero, call
list_collectionsunless the destination is already confirmed. - Check duplicates with
check_articles_owned. - Use
import_articlesas the default PubMed-to-Zotero handoff. - For Zotero 10+ mutations, first obtain a response-bound
server_idfrom a read or authorization, include it asexpected_server_idin theconfirm=falsepreview, and ask the user to approve that complete proposal. Ensure local authorization; if it reports the same identity, repeat the proposal unchanged withconfirm=true.
Repository Work
- Treat
.codex/skills,.claude/skills,.cline/skills, and.clinerulesas bundled assistant harness assets. - Run
npm run sync-assetsbefore packaging the VSIX. - Keep
vscode-extension/resources/repo-assets/**synchronized with its source files. - Preserve custom user
AGENTS.md, Copilot instructions, and Cline settings during extension install/update flows.
Guardrails
- Do not import into the Zotero root collection without explicit confirmation.
- Set
allow_library_root=trueonly after that explicit confirmation. - Do not assume the target collection.
- Do not repeat searches when session state already contains the relevant PMIDs.
- Distinguish peer-reviewed articles, preprints, and metadata-only records.
- Keep NCBI email/API-key and institutional access settings intact.
- Never expose or forward Zotero port 23119, request a Local API key, or retry
a
412version conflict automatically. - Every confirmed Local API mutation requires the
expected_server_idshown in its approved preview. If later authorization reports a different identity, reread, preview, and request approval again; never add identity after preview. - Use the response-bound object version for exact updates and single-object
deletes. Use the response-bound library cursor—not an attachment object
version—for
delete_tags,set_attachment_fulltext, andset_attachment_fulltexts. Forreplace_attachment_file, bind the reviewed attachment version and previous MD5 to the same response identity. - Before
attach_file_to_itemorreplace_attachment_file, callauthorize_local_writes(require_remembered=true)and have the user choose Always Allow for the three-phase upload.
Related Files
.codex/skills/zotero-keeper-harness/SKILL.md.codex/skills/pubmed-search-mcp-harness/SKILL.md.github/zotero-research-workflow.md.github/agents/research.agent.md.claude/skills/pubmed-*
Current Editing and Harness Contract
- Keeper 2.4 exposes 50 tools. Read
get_item_schemafor fields/creator roles, andget_item_annotationsfor attachment annotations. - For citations of items already in Zotero, use read-only
export_items(BibTeX/RIS/CSL JSON/…) orget_bibliography(CSL style such as apa/vancouver) with exact item keys; checkmissing_count/missing_keys. - Use
update_item_tags,update_item_creators,update_note,batch_update_item_fieldsfor scoped edits; useset_item_trashedfor reversible trash/restore. Permanent deletes remain explicit and irreversible. - Every edit requires the approved Server-ID and exact object version; batches inspect every per-item result. Full-text updates use the library cursor instead.
run_saved_searchpreserves child results by default and supports start/limit. Nested groups use groupStart/groupEnd with operator=true; resultLevel selects item/attachment/note/annotation.- Workspace assets are installed manually by default. Preserve custom files and entire custom/edited skill directories, recorded user deletions, backups, and newer versions. Never overwrite source-repository harness files on extension activation.
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.

