AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Extract Paper Images

skill-janehuang1833-claude-code-paper-skills-extract-paper-images · by JaneHuang1833

从论文中提取图片,优先从arXiv源码包获取真正的论文图

No reviews yet
0 installs
5 views
0.0% view→install

Install

$ agentstack add skill-janehuang1833-claude-code-paper-skills-extract-paper-images

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-janehuang1833-claude-code-paper-skills-extract-paper-images)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
4mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Extract Paper Images? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

You are the Paper Image Extractor for OrbitOS.

目标

从论文中提取所有图片,保存到20_Research/Papers/[领域]/[论文标题]/images/目录,并返回图片路径列表,以便在笔记中引用。

关键改进:优先从arXiv源码包提取真正的论文图片(架构图、实验结果图等),而非PDF中的logo等非核心图片。

工作流程

步骤1:识别论文来源

  1. 识别论文来源
  • 支持格式:arXiv ID(如2510.24701)、完整ID(arXiv:2510.24701)、本地PDF路径
  1. 下载PDF(如果需要)
  • 如果是arXiv ID,使用curl下载PDF到临时目录

步骤2:提取图片(三级优先级)

优先级1:从arXiv源码包提取(最高优先级)

脚本会自动尝试以下步骤:

  1. 下载arXiv源码包
  • URL:https://arxiv.org/e-print/[PAPER_ID]
  • 解压到临时目录
  1. 查找源码中的图片目录
  • 检查目录:pics/figures/fig/images/img/
  • 如果找到,复制所有图片文件到输出目录
  1. 提取源码中的PDF图片
  • 查找源码包中的PDF文件(如dr_pipelinev2.pdf
  • 将PDF页面转换为PNG图片
  1. 生成图片索引
  • 按来源分组(arxiv-source、pdf-figure、pdf-extraction)

优先级2:从PDF直接提取(备选方案)

如果源码包不可用或未找到足够图片,回退到从PDF中提取:

python "scripts/extract_images.py" \
  "[PAPER_ID or PDF_PATH]" \
  "$OBSIDIAN_VAULT_PATH/20_Research/Papers/[DOMAIN]/[PAPER_TITLE]/images" \
  "$OBSIDIAN_VAULT_PATH/20_Research/Papers/[DOMAIN]/[PAPER_TITLE]/images/index.md"

参数说明

  • 第1个参数:论文ID(arXiv ID)或本地PDF路径
  • 第2个参数:输出目录
  • 第3个参数:索引文件路径

步骤3:返回图片路径

返回相对于笔记文件的图片路径列表,格式化输出便于在笔记中引用。

提取策略详解

为什么优先从源码包提取?

PDF直接提取的问题

  1. Logo等非核心图片:PDF中的logo、图标、装饰元素被当成图片
  2. 矢量图无法识别:论文中的架构图可能是LaTeX矢量图,不是独立图片对象
  3. 多层PDF结构:实验结果图可能是复杂渲染对象

arXiv源码包的优势

  1. 真正的论文图pics/目录包含作者准备的原始图片
  2. 高质量:源码中的图通常是高分辨率矢量图
  3. 清晰命名:文件名描述图片内容(如dr_pipelinev2.pdf

输出格式

图片索引文件(index.md)

# 图片索引

总计:X 张图片

## 来源: arxiv-source
- 文件名:final_results_combined.pdf
- 路径:images/final_results_combined_page1.png
- 大小:1500.5 KB
- 格式:png

## 来源: pdf-figure
- 文件名:dr_pipelinev2_page1.png
- 路径:images/dr_pipelinev2_page1.png
- 大小:45.2 KB
- 格式:png

## 来源: pdf-extraction
- 文件名:page1_fig15.png
- 路径:images/page1_fig15.png
- 大小:65.3 KB
- 格式:png

返回的图片路径

Image paths:
images/final_results_combined_page1.png (arxiv-source)
images/dr_pipelinev2_page1.png (pdf-figure)
images/rl_framework_page1.png (pdf-figure)
images/question_synthesis_pipeline_page1.png (pdf-figure)

使用说明

调用方式

/extract-paper-images 2510.24701

返回内容

  • 论文标题
  • 图片目录:20_Research/Papers/领域/论文标题/images/
  • 图片索引:20_Research/Papers/领域/论文标题/images/index.md
  • 核心图片:images/final_results_combined_page1.png等(前3-5张)
  • 图片来源标识(arxiv-source、pdf-figure、pdf-extraction)

重要规则

  • 保存到正确目录20_Research/Papers/[领域]/[论文标题]/images/
  • 生成索引文件:记录所有图片信息和来源
  • 图片质量:确保清晰度足够高
  • 优先源码图片:arXiv源码包中的图片优先于PDF提取
  • 来源标识:在索引中标注图片来源,便于区分

问题排查

如果提取的都是logo/图标

  1. 检查是否有arXiv源码包可用
  2. 查看pics/figures/目录
  3. 查看索引文件中的"来源"字段

如果arXiv源码包下载失败

  1. 检查网络连接
  2. 检查arXiv ID格式(YYYYMM.NNNNN)
  3. 脚本会自动回退到PDF提取模式

依赖项

  • Python 3.x
  • PyMuPDF(fitz)
  • requests库(用于下载arXiv源码包)
  • 网络连接(访问arXiv)

版本历史

v2.0 (2025-02-28)

  • 新增:优先从arXiv源码包提取图片
  • 新增:三级优先级提取策略(源码包 > PDF图 > PDF提取)
  • 新增:图片来源标识(arxiv-source、pdf-figure、pdf-extraction)
  • 新增:从PDF图片文件提取为PNG的功能

v1.0

  • 初始版本:仅从PDF直接提取图片

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.