zotero-citation
Zotero 文献引用工作流助手。通过 Zotero 本地 API 读取文献库,为用户指定的文字段落或论文全文自动匹配参考文献,生成规范格式的 Reference。当用户需要"引用文献"、"分配参考文献"、"从 Zotero 选文献"、"生成 Reference 列表"、"匹配引用位置"、"添加参考文献"、"给这段话配引用"、"帮我找合适的参考文献"时触发。也适用于查询 Zotero 文献库、获取文献元数据、或管理论文 citation 的场景。
npx skills add majiayu000/claude-skill-registry --skill zotero-citation --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Zotero 文献引用工作流 ## 核心功能 从 Zotero 本地文献库中检索文献,为用户提供的**任意文字段落或论文全文**智能匹配参考文献,生成规范格式的 Reference。 ## 使用模式 本 skill 支持两种使用模式,根据用户输入自动判断: ### 模式 A:段落级匹配(用户提供特定段落) 用户直接粘贴一段或多段文字,为其中的论点匹配合适的参考文献。 **工作流**: 1. 分析段落中的每个论点/声明 2. 从 Zotero 候选文献中匹配 3. 输出:标注了引用位置的段落 + Reference 条目 ### 模式 B:全文匹配(用户指定论文文件) 读取整篇论文,逐段分析并分配参考文献。 **工作流**: 1. 读取论文文件(⚠️ 先确认版本) 2. 逐段提取论点并匹配 3. 输出:引用位置表 + 完整 Reference 列表 --- ## 前置条件 1. **Zotero Desktop 必须运行** 2. **本地 API 已启用**:Zotero → 编辑 → 设置 → 高级 → 允许其他应用程序通过 API 访问 验证连接: ```bash curl -s "http://localhost:23119/api/users/0/items?limit=1" ``` ⚠️ URL 必须加引号,否则 zsh 会因 `?` 报 `no matches found` 错误。 ## 支持文件 - Zotero API 端点与查询详情:见 [references/zotero-api-reference.md](references/zotero-api-reference.md) --- ## 工作流程 ### 步骤 1:确认输入与环境 1. 判断使用模式: - 用户直接给出了文字段落 → **模式 A** - 用户指定了论文文件或说"全文" → **模式 B**(需确认文件版本) 2. 验证 Zotero 本地 API 连接 3. 确认目标 Collection(文献分类),询问用户从哪个 Zotero 分类中选取候选文献 ### 步骤 2:获取候选文献 获取 Collection 结构并拉取候选文献列表。 ```bash curl -s "http://localhost:23119/api/users/{USER_ID}/collections" | python3 -c " import json, sys data = json.load(sys.stdin) for c in data: print(f\"{c['key']}: {c['data']['name']} (parent: {c['data'].get('parentCollection', 'none')})\")" ``` ⚠️ **子分类文献需单独查询**
- 核心功能
- 使用模式
- 模式 A:段落级匹配(用户提供特定段落)
- 模式 B:全文匹配(用户指定论文文件)
- 前置条件
- 支持文件
- 工作流程
- 步骤 1:确认输入与环境
- 步骤 2:获取候选文献
- 步骤 3:文献-文本匹配
- 步骤 4:确认输出格式
- 步骤 5:生成输出
- 常见问题
curl -s "http://localhost:23119/api/users/0/items?limit=1"
curl -s "http://localhost:23119/api/users/{USER_ID}/collections" | python3 -c "
import json, sys
data = json.load(sys.stdin)
for c in data:
pdftotext ~/Zotero/storage/{ATTACHMENT_KEY}/文件名.pdf -What does the zotero-citation skill do?
Zotero 文献引用工作流助手。通过 Zotero 本地 API 读取文献库,为用户指定的文字段落或论文全文自动匹配参考文献,生成规范格式的 Reference。当用户需要"引用文献"、"分配参考文献"、"从 Zotero 选文献"、"生成 Reference 列表"、"匹配引用位置"、"添加参考文献"、"给这段话配引用"、"帮我找合适的参考文献"时触发。也适用于查询 Zotero 文献库、获取文献元数据、或管理论文 citation 的场景。
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill zotero-citation --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
