Borrowing it
Nothing to install: this file belongs to psiQAQ/zotero-agent. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/psiQAQ/zotero-agent/main/AGENTS.mdgit clone --depth 1 https://github.com/psiQAQ/zotero-agentWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/psiqaq/zotero-agent/agents-md)<a href="https://agentmods.dev/instructions/psiqaq/zotero-agent/agents-md"><img src="https://agentmods.dev/badge/instructions/psiqaq/zotero-agent/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/psiqaq/zotero-agent/agents-md"><img src="https://agentmods.dev/badge/instructions/psiqaq/zotero-agent/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.03307 | $0.03307 |
| Opus 5.5 | $0.01323 | $0.01323 |
| Sonnet 5.5 | $0.00661 | $0.00661 |
| Haiku 4.5 | $0.00331 | $0.00331 |
Grade A, and why
zotero-agent AGENTS.md scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- 验证官方读通路:`curl -sD - http://127.0.0.1:23119/api/users/<library-id>/items?limit=1` → 200 How it starts
The opening of the file, as written. The whole thing — 126 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
本仓库 = Zotero Agent(zotero-agent):从 cookjohn/zotero-mcp fork 二次开发后独立的发布仓库,插件目录即仓库根。完整变更史见 CHANGELOG.md(从上游 v1.5.0 起)。本文件是给未来会话的开发 / 发布上下文。
1. 架构
- 本插件 = 一个内嵌 MCP server 的 Zotero 插件:插件在 Zotero 进程内起 HTTP server(手写
nsIServerSocket),端口 23120,只绑127.0.0.1 - 常规用法:插件装在本地 Zotero,AI 客户端(Codex 等)本地直连
http://127.0.0.1:23120/mcp,用Authorization: Bearer <PSK>认证 - 读还可走 Zotero 官方只读 API(
127.0.0.1:23119,仅服务浏览器 Connector 的读请求) - 关键区别:Zotero 进程内
Zotero.Libraries.userLibraryID= 1,与 web 账号那个数字 library ID 不同;写run_javascript时用进程内的1,调官方 API 路径/api/users/<library-id>/时才用 web library ID
2. 仓库结构(插件为根)
src/addon/— 插件 TS 源码 + 资源(manifest / locale / 偏好 UI)test/— 纯函数单测(*.test.cjs,node 直跑)scripts/—deploy-live.mjs(本地 xpi → 目标 Zotero 部署)、prepare-release.js(生成 update.json)、unit-test.mjs.github/workflows/— release CI(在根,GitHub 才会触发)refs/— 17 个调研参考 submodule,声明保留、内容按需:用哪个再git submodule update --init refs/<path>CHANGELOG.md— 变更史(人写、提交);update.json— 更新清单(机器生成、不提交,见 §4)
3. 开发循环(build + 部署)
改代码 → npm run build(zotero-plugin build + tsc --noEmit,产物 .scaffold/build/zotero-agent.xpi)→ node scripts/deploy-live.mjs(xpi base64 经 run_javascript 写入 Zotero 端临时路径 + 自升级,~5s 断连后即新版)。
deploy-live.mjs也能装任意 xpi:node scripts/deploy-live.mjs 路径/xxx.xpi(如使用者下载的 xpi)。它依赖 zotero MCP 通道(PSK),是"已装本插件后换版 / 升级"的工具;首次裸装仍需手动把 xpi 拖进 Zotero
测试
- 本地单测:
npm run test:unit——test/*.test.cjs纯函数单测(node 直跑,无框架,runnerscripts/unit-test.mjs),覆盖 auth / eval / HTTP 字节读取 / MCP 协议 / 元数据合并 / PDF 识别与解析器 / 标题相似度 / hybrid search 等模块 - 部署后全栈回归:
src/modules/selfTest.ts,startup 时挂载为Zotero.ZoteroAgentSelfTest。约 32 场景:协议层(initialize 版本协商、401/403、-32601/-32602、isError语义)+ 工具层(import 幂等、WoS 工具显隐、批量导入 dry-run、preprint 升级、DOI repair、伴生插件桥接、写类工具 dry-run 默认、搜索降级级联、CJK mojibake 回归、pdf resolvers 往返等)。版本更新部署后跑:run_javascript里return await Zotero.ZoteroAgentSelfTest.run('protocol');.list()列可用套件
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 126 lines · 3,307 tokens per session scan A 168f37d8efa9
zotero-agent AGENTS.md is an instructions file published in the GitHub repository psiQAQ/zotero-agent (8 stars, last pushed 3mo ago), licensed MIT. It adds 3,307 tokens to every session, about $0.0132 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
zotero-agent AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| zotero-agent AGENTS.mdpsiQAQ/zotero-agent | Instructions file | 8 | 3mo ago | MIT | A | 3,307 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | today | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 275k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |