paper-trail-cascade

paper-trail-cascade is a command for Claude Code from roomi-fields/paper-trail. It costs 44 tokens per session (539 once invoked), scanned A, original, MIT.

A command for finding and downloading research-paper PDFs from several sources, either one paper at a time or in batches. It checks the first page to make sure the file belongs to the intended paper.

In plain words
What is it for?
Use it to acquire papers by identifier, process papers in a chosen state, preview a batch with a dry run, and review which downloads succeeded, remain pending, were blocked, or were skipped.
Why use it?
It reduces the manual work of searching multiple sources and helps avoid accepting a PDF for the wrong paper.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the paper-trail plugin — 6 skills, 22 commands, 6 agents, 3 hooks shipped together

Good fit Use it to acquire papers by identifier, process papers in a chosen state, preview a batch with a dry run, and review which downloads succeeded, remain pending, were blocked, or were skipped.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/roomi-fields/paper-trail/paper-trail-cascade
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.

Clone the repo
git clone --depth 1 https://github.com/roomi-fields/paper-trail

Made for: Claude Code.

Or install paper-trail, the plugin that ships this one along with the rest of its 6 skills, 22 commands, 6 agents, 3 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for paper-trail-cascade

README.md
[![agentmods](https://agentmods.dev/badge/commands/roomi-fields/paper-trail/paper-trail-cascade/github.svg)](https://agentmods.dev/commands/roomi-fields/paper-trail/paper-trail-cascade)
Your own site
<a href="https://agentmods.dev/commands/roomi-fields/paper-trail/paper-trail-cascade"><img src="https://agentmods.dev/badge/commands/roomi-fields/paper-trail/paper-trail-cascade/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for paper-trail-cascade

Your own site · 80×15
<a href="https://agentmods.dev/commands/roomi-fields/paper-trail/paper-trail-cascade"><img src="https://agentmods.dev/badge/commands/roomi-fields/paper-trail/paper-trail-cascade.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 539 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00044 $0.00539
Opus 5.5 $0.00018 $0.00216
Sonnet 5.5 $0.00009 $0.00108
Haiku 4.5 $0.00004 $0.00054

Measured 1mo ago against content hash 3f1599c1b5a4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

paper-trail-cascade 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 1mo ago.

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.

commands/paper-trail-cascade.md · 69 lines

What it actually says

/paper-trail:cascade — Run the PDF acquisition cascade

Invoke the pdf-cascade skill to push refs through the FSM via the strict acquisition cascade.

Usage

/paper-trail:cascade <slug>                # one ref by slug
/paper-trail:cascade --state candidate     # batch by state
/paper-trail:cascade --state candidate --limit 20
/paper-trail:cascade --ref <slug> --dry-run

What it does

  1. Parses the argument (slug, --state X, optional --limit N, --dry-run, --cited-in <SOTA_name>)

  2. Invokes the worker B :

    python -m pipeline run <args>
    
  3. Reports session recap : planned / done / pending / blocked / skipped_terminal

  4. Each acquired PDF is validated page 1 anti-homonymy automatically before being accepted

  5. Doctor runs at the end (unless --no-doctor) to flag any new invariant violation

Shadow libraries

By default, the cascade has 10 sources (no Sci-Hub, no Anna's Archive). To enable shadow libs for this session (cf. DISCLAIMER.md) :

export RESEARCH_ENABLE_SHADOW_LIBS=1
/paper-trail:cascade --state candidate --limit 10

The cascade then has 15 sources — 17 with the browser routes available as well (Playwright + a display, see docs/ACQUISITION_HEADFUL.md). A disclaimer prints to stderr at the first cascade load of the session.

Output trace

Every attempt is logged in the registry under acquisition_attempts[] :

acquisition_attempts:
  - n: 1
    source: crossref_oa
    verdict: no_source
    reason: no_doi
  - n: 2
    source: arxiv
    verdict: success
    pdf_path: 13_Biblio_Maths/Sources/Smith_2020.pdf
    pdf_sha256: a3f5...

Use /paper-trail:status to see overall registry state, or /paper-trail:doctor to verify post-cascade consistency.

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. 1mo ago Changed 3f1599c1b5a4
  2. 1mo ago First seen · 69 lines · 44 tokens per session scan A e33eb9e9727a

Subscribe to this mod's changes

paper-trail-cascade is a command published in the GitHub repository roomi-fields/paper-trail (6 stars, last pushed 1mo ago), licensed MIT. It adds 44 tokens to every session and 539 once invoked, about $0.0002 per session on Opus 5.5. 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-31.