Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/psiqaq/zotero-agent/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.svg" alt="Measured on agentmods" 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 | $0.01654 | $0.01654 |
| Sonnet 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 5d 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.
- 5d 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 (7 stars, last pushed 1mo ago), licensed MIT. It adds 3,307 tokens to every session, about $0.0165 per session on Opus 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.
Other instructions, from other repositories
AI-Powered-Literature-Review-Skills AGENTS.md
Instructions for stephenlzc/AI-Powered-Literature-Review-Skills, covering agents.md - literature reviewer skill, 项目概述, 核心特性, 技术栈 and 项目结构.
iktinah AGENTS.md
AGENTS.md instructions for dralkh/iktinah, covering agents.md, project overview, commands, mcp server (separate package) and tech stack.
orm CLAUDE.md
Claude Code instructions for prisma/orm, a project described as: Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB.
wasp CLAUDE.md
Claude Code instructions for wasp-lang/wasp, a project described as: The batteries-included full-stack framework for the AI era. Develop JS/TS web apps (React, Node.js, and Prisma) using declarative code that abstracts away complex full-stack features like auth, background jobs, RPC, email sending, end-to-end type…
vespertide AGENTS.md
AGENTS.md instructions for dev-five-git/vespertide, covering vespertide knowledge base, structure, where to look, data flow and conventions.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).