figures

A command for extracting figures and their captions from an arXiv paper. arXiv is an online archive where researchers share scientific papers before or alongside formal publication.

In plain words
What is it for?
Use it to extract every figure, one selected figure, its image, caption, and location from an arXiv paper.
Why use it?
It avoids manually searching through a paper's web version for each figure and its description.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/actionbook/actionbook/figures
Clone the repo
git clone --depth 1 https://github.com/actionbook/actionbook
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 456 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00456
Opus 5 $0.00000 $0.00228
Sonnet 5 $0.00000 $0.00091
Haiku 4.5 $0.00000 $0.00046

Measured yesterday against content hash e7bee4256e53, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

figures scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

playground/arxiv-viewer/commands/figures.md · 71 lines

What it actually says

/arxiv-viewer:figures

Extract all figures and their captions from an arXiv paper (ar5iv.org).

Usage

/arxiv-viewer:figures <arxiv_id> [--figure <n>]

Parameters

  • arxiv_id (required): arXiv paper ID (e.g., 2301.07041)
  • --figure or -f (optional): Specific figure number to extract

Examples

/arxiv-viewer:figures 2301.07041           # All figures
/arxiv-viewer:figures 2301.07041 --figure 1  # Just Figure 1
/arxiv-viewer:figures 1706.03762           # Transformer paper figures

Workflow

Uses Actionbook + agent-browser to extract figures from ar5iv.org:

  1. search_actions("ar5iv figure") → get action ID
  2. get_action_by_id(action_id) → get figure selectors
  3. agent-browser open https://ar5iv.org/html/{arxiv_id}
  4. agent-browser get text "figure.ltx_figure"
  5. Parse figures and captions

Selectors

Element Selector
All figures figure.ltx_figure
Figure by ID #S3.F1 (Section 3, Figure 1)
Figure image figure.ltx_figure img
Figure caption figcaption.ltx_caption

Output Format

## Figures from: {Paper Title}

arXiv: {id}

### Figure 1
**Caption:** {caption text}
**Location:** Section {n}
**Image:** {image_url or description}

### Figure 2
**Caption:** {caption text}
**Location:** Section {n}
**Image:** {image_url or description}

...

---
*Total: {n} figures*

Notes

  • Figure numbers may not be sequential
  • Some figures may be in appendices
  • Image URLs point to ar5iv.org hosted images
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 71 lines · 0 tokens per session scan A e7bee4256e53

Subscribe to this mod's changes

figures is a command published in the GitHub repository actionbook/actionbook (1,586 stars, last pushed 20d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 456 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.