zotero-paper-reader
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseZotero Paper Reader
Zotero Paper Reader
Overview
概述
Read and analyze academic papers directly from the Zotero library. This skill handles the complete workflow from searching Zotero to converting PDFs to readable markdown format.
直接从Zotero库中读取并分析学术论文。该Skill可处理从搜索Zotero到将PDF转换为易读的Markdown格式的完整工作流。
When to Use
使用场景
Use this skill when the user requests to:
- "Read this paper from Zotero"
- "Find and read [paper title]"
- "Access [author name] paper"
- "Get the paper about [topic]"
- "Convert [paper] from Zotero to markdown"
当用户提出以下请求时使用该Skill:
- "读取我Zotero中的这篇论文"
- "查找并读取[论文标题]"
- "获取[作者姓名]的论文"
- "获取关于[主题]的论文"
- "将Zotero中的[论文]转换为Markdown格式"
Workflow
工作流
Step 1: Search Zotero Library
步骤1:搜索Zotero库
Use the Zotero MCP tools to search for the paper:
python
undefined使用Zotero MCP工具搜索论文:
python
undefinedSearch by title, author, or keywords
Search by title, author, or keywords
mcp__zotero__zotero_search_items(query="paper title or author", limit=5)
Present the search results to the user if multiple papers are found. Get the `item_key` from the selected paper.mcp__zotero__zotero_search_items(query="paper title or author", limit=5)
如果找到多篇论文,将搜索结果展示给用户。从用户选中的论文中获取`item_key`。Step 2: Get PDF Attachment
步骤2:获取PDF附件
Retrieve the PDF attachment information:
python
undefined检索PDF附件信息:
python
undefinedGet child items (attachments) for the paper
Get child items (attachments) for the paper
mcp__zotero__zotero_get_item_children(item_key="ITEM_KEY")
Look for the attachment with `type: application/pdf` and note its `Key` (attachment key) and `Filename`.mcp__zotero__zotero_get_item_children(item_key="ITEM_KEY")
查找类型为`type: application/pdf`的附件,并记录其`Key`(附件密钥)和`Filename`(文件名)。Step 3: Get PDF File (Local or Download)
步骤3:获取PDF文件(本地或下载)
Use the bundled script to get the PDF - it automatically tries local storage first, then downloads if needed:
bash
uv run python .claude/skills/zotero-paper-reader/scripts/get_zotero_pdf.py ATTACHMENT_KEYThe script workflow:
- First searches local Zotero storage ()
~/Zotero/storage/ATTACHMENT_KEY/ - If found locally, returns that path
- If not found locally, downloads from Zotero web library using API
- Retrieves original filename from Zotero metadata and downloads to
/tmp/[original_filename]
Security note: The Zotero API key and library configuration are read directly from by the Python script and never exposed to the LLM. Required environment variables: , , .
Notes/.envZOTERO_API_KEYZOTERO_LIBRARY_TYPEZOTERO_LIBRARY_ID使用捆绑脚本获取PDF - 脚本会自动优先尝试本地存储,若不存在则从网络下载:
bash
uv run python .claude/skills/zotero-paper-reader/scripts/get_zotero_pdf.py ATTACHMENT_KEY脚本工作流:
- 首先搜索本地Zotero存储目录()
~/Zotero/storage/ATTACHMENT_KEY/ - 如果在本地找到,返回该文件路径
- 如果本地未找到,通过Zotero网络库API下载
- 从Zotero元数据中获取原始文件名,并下载至
/tmp/[original_filename]
安全说明: Zotero API密钥和库配置由Python脚本直接从读取,绝不会暴露给LLM。所需环境变量:、、。
Notes/.envZOTERO_API_KEYZOTERO_LIBRARY_TYPEZOTERO_LIBRARY_IDStep 4: Convert to Markdown
步骤4:转换为Markdown格式
Use the skill to convert the PDF:
mistral-pdf-to-markdownbash
uv run python .claude/skills/mistral-pdf-to-markdown/scripts/convert_pdf_to_markdown.py \
"PATH_TO_PDF" \
"Notes/PaperInMarkdown/CLEAN_FILENAME.md"Filename convention: Create a clean filename from the paper metadata:
- Format:
Author_Year_Title.md - Example:
Du_et_al_2023_Are_Intermediary_Constraints_Priced.md - Replace spaces with underscores, remove special characters
使用 Skill将PDF转换为Markdown:
mistral-pdf-to-markdownbash
uv run python .claude/skills/mistral-pdf-to-markdown/scripts/convert_pdf_to_markdown.py \
"PATH_TO_PDF" \
"Notes/PaperInMarkdown/CLEAN_FILENAME.md"文件名规范: 根据论文元数据生成简洁的文件名:
- 格式:
Author_Year_Title.md - 示例:
Du_et_al_2023_Are_Intermediary_Constraints_Priced.md - 用下划线替换空格,移除特殊字符
Step 5: Read and Analyze
步骤5:读取与分析
Read the converted markdown file:
python
undefined读取转换后的Markdown文件:
python
undefinedFor large papers, read in sections
For large papers, read in sections
Read(file_path="Notes/PaperInMarkdown/FILENAME.md", offset=1, limit=500)
Since academic papers are often large (>25k tokens), read strategically:
- Start with abstract and introduction (first 300-500 lines)
- Use Grep to search for specific sections if needed
- Read specific sections based on user interest
Provide the user with:
1. Paper metadata (title, authors, publication year)
2. Brief summary of the abstract
3. Main findings or sections of interest
4. Offer to read specific sections or search for particular contentRead(file_path="Notes/PaperInMarkdown/FILENAME.md", offset=1, limit=500)
由于学术论文通常篇幅较长(>25k tokens),需策略性地读取:
- 从摘要和引言部分开始(前300-500行)
- 如有需要,使用Grep搜索特定章节
- 根据用户兴趣读取特定章节
向用户提供以下内容:
1. 论文元数据(标题、作者、发表年份)
2. 摘要的简要总结
3. 主要研究发现或用户感兴趣的章节
4. 主动询问用户是否需要读取特定章节或搜索特定内容Example Usage
示例用法
User request: "Read the paper 'Are Intermediary Constraints Priced' from my Zotero library"
Workflow:
- Search:
mcp__zotero__zotero_search_items(query="Are Intermediary Constraints Priced") - Get attachment:
mcp__zotero__zotero_get_item_children(item_key="KPRQ2DLZ") - Get PDF:
uv run python .claude/skills/zotero-paper-reader/scripts/get_zotero_pdf.py 2HSELEHX- Returns local path if available, or downloads and returns temp path
- Convert:
uv run python .claude/skills/mistral-pdf-to-markdown/scripts/convert_pdf_to_markdown.py [PDF_PATH] Notes/PaperInMarkdown/Du_et_al_2023_Are_Intermediary_Constraints_Priced.md - Read:
Read(file_path="Notes/PaperInMarkdown/Du_et_al_2023_Are_Intermediary_Constraints_Priced.md", limit=500) - Summarize and offer to dive deeper into specific sections
用户请求: "读取我Zotero库中的论文《Are Intermediary Constraints Priced》"
工作流:
- 搜索:
mcp__zotero__zotero_search_items(query="Are Intermediary Constraints Priced") - 获取附件:
mcp__zotero__zotero_get_item_children(item_key="KPRQ2DLZ") - 获取PDF:
uv run python .claude/skills/zotero-paper-reader/scripts/get_zotero_pdf.py 2HSELEHX- 若本地存在则返回本地路径,否则下载并返回临时路径
- 转换:
uv run python .claude/skills/mistral-pdf-to-markdown/scripts/convert_pdf_to_markdown.py [PDF_PATH] Notes/PaperInMarkdown/Du_et_al_2023_Are_Intermediary_Constraints_Priced.md - 读取:
Read(file_path="Notes/PaperInMarkdown/Du_et_al_2023_Are_Intermediary_Constraints_Priced.md", limit=500) - 生成总结并询问用户是否需要深入查看特定章节
Notes
注意事项
- The skill works with both local and web Zotero libraries
- For web libraries, requires ,
ZOTERO_API_KEY, andZOTERO_LIBRARY_TYPEinZOTERO_LIBRARY_IDNotes/.env - For local libraries, Zotero local API must be enabled in Zotero preferences
- Requires Mistral API key in for PDF conversion
Notes/.env - Converted markdown files include extracted images in subfolder
images/ - Large papers (>40k tokens) should be read in sections to avoid context limits
- 该Skill同时支持本地和网络Zotero库
- 对于网络库,需在中配置
Notes/.env、ZOTERO_API_KEY和ZOTERO_LIBRARY_TYPEZOTERO_LIBRARY_ID - 对于本地库,需在Zotero偏好设置中启用Zotero本地API
- PDF转换需要在中配置Mistral API密钥
Notes/.env - 转换后的Markdown文件会在子文件夹中包含提取的图片
images/ - 篇幅较长的论文(>40k tokens)应分章节读取,以避免超出上下文限制
Resources
资源
scripts/
scripts/
- - Unified script that tries local storage first, then downloads from web API if needed
get_zotero_pdf.py
- - 统一脚本,优先尝试本地存储,若不存在则通过网络API下载
get_zotero_pdf.py