agentleFS
u9401066u9401066/zotero-keeper/AGENTS.md

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…

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
  1. Distinctive:

    Use Traditional Chinese unless the user asks otherwise.

    line 13
  2. Distinctive:

    Ask before importing anything into Zotero.

    line 15
  3. Very specific:

    Keep PubMed search/discovery/export work in PubMed Search MCP.

    line 16
  4. Distinctive:

    Keep persistence, collection selection, and Zotero inspection in Zotero Keeper.

    line 17
  5. Very specific:

    Start broad literature discovery with unified_search.

    line 21
  6. Very specific:

    Use validate_pico_plan(description=question, p=..., i=..., c=..., o=...) and generate_search_queries for clinical or comparison questions.

    line 22
  7. Very specific:

    Use related/citing/reference/fulltext tools for follow-up instead of rerunning the same search.

    line 24
  8. Very specific:

    Use build_research_chronicle and read_research_chronicle for persistent research-history artifacts.

    line 25
  9. Very specific:

    Before saving to Zotero, call list_collections unless the destination is already confirmed.

    line 26
  10. Very specific:

    Check duplicates with check_articles_owned.

    line 27
  11. Very specific:

    Use import_articles as the default PubMed-to-Zotero handoff.

    line 28
  12. Very specific:

    Ensure local authorization.

    line 32
  13. Very specific:

    Treat .codex/skills, .claude/skills, .cline/skills, and .clinerules as bundled assistant harness assets.

    line 37
  14. Very specific:

    Run npm run sync-assets before packaging the VSIX.

    line 38
  15. Very specific:

    Keep vscode-extension/resources/repo-assets/ synchronized with its source files.

    line 39
  16. Distinctive:

    Do not import into the Zotero root collection without explicit confirmation.

    line 44
  17. Distinctive:

    Do not assume the target collection.

    line 46
  18. Distinctive:

    Do not repeat searches when session state already contains the relevant PMIDs.

    line 47
  19. Distinctive:

    Keep NCBI email/API-key and institutional access settings intact.

    line 49
  20. Very specific:

    Never expose or forward Zotero port 23119, request a Local API key, or retry a 412 version conflict automatically.

    line 50
  21. Very specific:

    Every confirmed Local API mutation requires the expected_server_id shown in its approved preview.

    line 52
  22. Very specific:

    Use the response-bound object version for exact updates and single-object deletes.

    line 55
  23. Very specific:

    Before attach_file_to_item or replace_attachment_file, call authorize_local_writes(require_remembered=true) and have the user choose

    line 60
  24. Very specific:

    Use update_item_tags, update_item_creators, update_note, batch_update_item_fields for scoped edits.

    line 76
  25. Distinctive:

    Every edit requires the approved Server-ID and exact object version.

    line 77

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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

  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 the same search.
  5. Use build_research_chronicle and read_research_chronicle for persistent research-history artifacts.
  6. Before saving to Zotero, call list_collections unless the destination is already confirmed.
  7. Check duplicates with check_articles_owned.
  8. Use import_articles as the default PubMed-to-Zotero handoff.
  9. For Zotero 10+ mutations, first obtain a response-bound server_id from a read or authorization, include it as expected_server_id in the confirm=false preview, and ask the user to approve that complete proposal. Ensure local authorization; if it reports the same identity, repeat the proposal unchanged with confirm=true.

Repository Work

  • Treat .codex/skills, .claude/skills, .cline/skills, and .clinerules as bundled assistant harness assets.
  • Run npm run sync-assets before 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=true only 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 412 version conflict automatically.
  • Every confirmed Local API mutation requires the expected_server_id shown 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, and set_attachment_fulltexts. For replace_attachment_file, bind the reviewed attachment version and previous MD5 to the same response identity.
  • Before attach_file_to_item or replace_attachment_file, call authorize_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_schema for fields/creator roles, and get_item_annotations for attachment annotations.
  • For citations of items already in Zotero, use read-only export_items (BibTeX/RIS/CSL JSON/…) or get_bibliography (CSL style such as apa/vancouver) with exact item keys; check missing_count / missing_keys.
  • Use update_item_tags, update_item_creators, update_note, batch_update_item_fields for scoped edits; use set_item_trashed for 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_search preserves 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.