← 返回 Skills 市场
dirtycomputer

arxiv-to-beamer

作者 buaa42wxy · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ⚠ suspicious
42
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install arxiv-to-beamer
功能描述
Given an arxiv identifier or arxiv abs/pdf URL, download the LaTeX source (or, if PDF-only, fall back to MinerU's PDF -> Markdown API), ask an OpenRouter mod...
使用说明 (SKILL.md)

arxiv-to-beamer

Turn an arxiv paper into an Overleaf-ready Beamer project, using an OpenRouter model to draft the slides from the paper's own LaTeX source — or, when arxiv has no TeX source, from a Markdown rendering produced by MinerU.

Prerequisites

  • Env var OPENROUTER_API_KEY must be exported in the shell.
  • Env var MINERU_API_TOKEN should be exported when the paper might be PDF-only (used for the MinerU fallback). Get one from \x3Chttps://mineru.net> → console → API.
  • Python 3.9+ on PATH (only stdlib is used — no pip install needed).

If OPENROUTER_API_KEY is not set, stop and ask the user to export it before running anything. If a paper turns out to be PDF-only and MINERU_API_TOKEN is missing, ask the user to export that too (or pass --no-mineru-fallback to skip the fallback entirely).

Usage

Invoke the bundled script with the arxiv id (e.g. 2603.19835) or any arxiv URL (abs/, pdf/, e-print/). Always prefer the ${CLAUDE_PROJECT_DIR} variable so the path resolves regardless of cwd:

python "${CLAUDE_PROJECT_DIR:-.}/.claude/skills/arxiv-to-beamer/scripts/arxiv_to_beamer.py" \x3Carxiv_id_or_url>

Optional flags:

  • --output \x3Cpath> — output zip path (default \x3Cid>-beamer.zip in cwd).
  • --model \x3Cname> — OpenRouter model id (default anthropic/claude-sonnet-4.5).
  • --language \x3Clang> — slide language hint passed to the model (default 中文).
  • --keep-source — also copy the extracted arxiv source (or MinerU markdown output) next to the zip.
  • --max-chars \x3Cn> — cap source bytes sent to the model (default 200000).
  • --mineru-timeout \x3Csec> — how long to wait for MinerU PDF parsing (default 900s).
  • --no-mineru-fallback — skip the MinerU fallback when arxiv is PDF-only (script then exits with code 2 instead).

What the script does

  1. Parses the arxiv id from the input (supports 2603.19835, 2603.19835v2, the legacy hep-th/9901001 form, and full URLs).
  2. Downloads https://arxiv.org/e-print/\x3Cid>. Detects PDF-only submissions via magic bytes.
  3. If TeX source is present: extracts the archive (gzipped tar, plain tar, or a single gzipped .tex) into a temp dir and gathers every .tex / .bib file.
  4. If PDF-only: falls back to the MinerU API:
    • POST https://mineru.net/api/v4/extract/task with {"url": "https://arxiv.org/pdf/\x3Cid>", ...}.
    • Polls GET .../extract/task/\x3Ctask_id> until state == "done".
    • Downloads the result zip (full_zip_url), extracts it, and concatenates every .md file as the source text.
    • Aborts (exit 2) if MinerU is unreachable, the task fails or times out, or MINERU_API_TOKEN is not set.
  5. Builds a prompt containing the collected source (truncated to --max-chars) and asks the model: "帮我做一个 beamer 来介绍一下这个 研究工作", with formatting instructions so the response is parseable.
  6. Parses files from the response. Recognised forms, in order:
    • ===== FILE: \x3Crelpath> ===== blocks (preferred, multi-file).
    • Fenced code blocks with a filename hint (```latex main.tex).
    • A single fenced LaTeX block → main.tex.
    • Anything else → dumped verbatim into main.tex.
  7. Writes everything into \x3Cid>-beamer.zip. Upload that zip via Overleaf → New Project → Upload Project.

When invoked

  • Run the script in the foreground; do not background it.
  • Surface the script's stdout/stderr to the user.
  • Report the absolute path of the produced .zip.
  • If the script exits with code 2:
    • Check the stderr message: it will say either "TeX source missing and MINERU_API_TOKEN not set" (ask the user to export the token, or rerun with --no-mineru-fallback), "MinerU PDF parsing failed" (network / quota issue — surface the detail), or "no downloadable TeX source" (paper is withdrawn). Do not blindly retry.
  • If OpenRouter returns an HTTP error, surface the message; do not retry silently more than once.
安全使用建议
Review before installing. If you use it, run it in a disposable or sandboxed directory, provide only API keys you are comfortable using for this task, and inspect the generated Overleaf zip before uploading or compiling it.
功能分析
Type: OpenClaw Skill Name: arxiv-to-beamer Version: 0.1.0 The skill is functional and aligns with its stated purpose, but it contains potential path traversal vulnerabilities in `scripts/arxiv_to_beamer.py`. Specifically, it uses `tarfile.extractall()` and `zipfile.extractall()` on archives downloaded from ArXiv and MinerU without validating member paths. While these sources are generally trusted, the lack of input sanitization on extracted files is a security flaw that could be exploited if the remote sources were compromised. No evidence of intentional malice or unauthorized data exfiltration was identified.
能力标签
requires-sensitive-credentials
能力评估
Purpose & Capability
The stated purpose, script behavior, and data flow are coherent: it downloads an arXiv paper, uses OpenRouter to draft slides, optionally uses MinerU for PDF-only papers, and writes an Overleaf zip.
Instruction Scope
The invocation instructions are user-directed and tell the agent to run in the foreground, surface stdout/stderr, and avoid blind retries. However, the model is fed paper source text and its generated file output is used to create the zip, so users should inspect the result.
Install Mechanism
There is no install spec and the script uses only Python stdlib, but the registry metadata does not declare the Python/API-key requirements that SKILL.md documents.
Credentials
The script downloads archives from external services and extracts them with extractall into local temporary directories without visible member/path validation, creating a containment risk if a source archive is malicious or malformed.
Persistence & Privilege
No background execution, persistence, self-propagation, or privileged system changes are described; outputs are limited to a generated zip and optional source copy.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install arxiv-to-beamer
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /arxiv-to-beamer 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
Initial release: arxiv id/URL -> LaTeX source (or MinerU PDF->Markdown fallback) -> OpenRouter beamer -> Overleaf zip.
元数据
Slug arxiv-to-beamer
版本 0.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

arxiv-to-beamer 是什么?

Given an arxiv identifier or arxiv abs/pdf URL, download the LaTeX source (or, if PDF-only, fall back to MinerU's PDF -> Markdown API), ask an OpenRouter mod... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 42 次。

如何安装 arxiv-to-beamer?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install arxiv-to-beamer」即可一键安装,无需额外配置。

arxiv-to-beamer 是免费的吗?

是的,arxiv-to-beamer 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

arxiv-to-beamer 支持哪些平台?

arxiv-to-beamer 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 arxiv-to-beamer?

由 buaa42wxy(@dirtycomputer)开发并维护,当前版本 v0.1.0。

💬 留言讨论