Zotero Collection Manager
Apps & Automationzotero-collection-managerZotero Collection Manager is an Agent Skill for apps & automation published in the cheneternity/Zotero-Analytical-Workflow-Skills repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
批量处理 Zotero 指定分类下的论文,支持断点续传。读取数据库文献列表,比对本地处理日志后,仅对未完成的条目逐一调用精读流程,实时更新进度。
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/cheneternity/Zotero-Analytical-Workflow-Skills/blob/HEAD/skills/zotero-collection-manager/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/zotero-collection-manager, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Zotero Collection Manager
1. 任务初始化与断点读取
- 定位分类与目录:获取目标 Zotero 分类名称,并设定目标路径为
D:\ResearchVault\note\<分类名称>\。 - 读取进度日志(Breakpoint):在目标路径下查找
_ProcessLog_进度记录.md或.json进度缓存文件。- 若存在,解析其中已被标记为
✅ 成功或⚠️ 跳过的论文Item Key或标题。 - 若不存在,自动在目标路径下创建该进度文件。
- 若存在,解析其中已被标记为
2. 数据获取与任务过滤
- 查询数据库:获取该分类下所有论文的清单(包含
Item Key和标题)。 - 计算差集(过滤):
- 将总清单与进度日志进行比对。
- 剔除已完成(成功/跳过)的条目,生成本轮的待处理队列。
- 如果待处理队列为空,提示用户“该分类下所有论文已处理完毕”。
3. 循环调度引擎(实时存档机制)
针对待处理队列中的每一篇论文,严格串行执行,并且每处理完一篇必须立即更新日志:
- 清理上下文:强制清空内存变量,重置大模型分析状态。
- 抓取数据 (Fetcher):传递任务给
zotero-data-fetcher。- 异常捕获:若抓取失败(如无附件、无缓存),将状态记录为
❌ 失败(原因),写入日志,跳过当前篇。
- 异常捕获:若抓取失败(如无附件、无缓存),将状态记录为
- 生成笔记 (Writer):传递语料给
zotero-analytical-writer写入 Obsidian。 - 实时打卡(关键点):当前论文写入 Obsidian 成功后,立即打开
_ProcessLog_进度记录.md,追加一行记录:- 格式要求:
- [x] [时间戳] | 状态 | Item Key | 论文标题 - 例如:
- [x] 2024-05-20 14:00 | ✅ 成功 | ABCD123 | From heat to high-tech...
- 格式要求:
- 刷新根 Dataview 索引页(新增论文时强制执行):若当前论文对应的
.md文件是首次创建,而不是覆盖旧文件,则在写入成功后立刻刷新D:\ResearchVault根目录下的文献索引.md、研究主题索引.md、研究方法索引.md和字段补全检查.md。
4. 输出执行报告
全部循环结束后,向用户输出本轮的执行简报:
- 本轮总计发现未处理文献 [X] 篇。
- ✅ 新增成功:[数量] 篇
- ❌ 新增失败/待确认:[数量] 篇
- 附言:进度已实时同步至 Obsidian 文件夹内的日志文件中,下次执行将自动跳过以上成功条目。