add-pdf-reader

add-pdf-reader is a skill for Claude Code, Codex from refactornator/nanoflash. It costs 37 tokens per session (672 once invoked), scanned A, a copy of add-pdf-reader, MIT.

A NanoClaw agent add-on for reading PDF files by extracting their text with the pdftotext command-line tool.

In plain words
What is it for?
It downloads PDFs received through WhatsApp and reads PDFs supplied as attachments, URLs, or local files after adding the required PDF utilities.
Why use it?
It removes the need to handle PDF attachments manually before an agent can read their contents.

Skill for Claude CodeCodex

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 skills/refactornator/nanoflash/add-pdf-reader
Any agent
npx skills add refactornator/nanoflash --skill add-pdf-reader
Clone the repo
git clone --depth 1 https://github.com/refactornator/nanoflash

Made for: Claude Code, Codex.

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 add-pdf-reader

README.md
[![agentmods](https://agentmods.dev/badge/skills/refactornator/nanoflash/add-pdf-reader.svg)](https://agentmods.dev/skills/refactornator/nanoflash/add-pdf-reader)
Your own site
<a href="https://agentmods.dev/skills/refactornator/nanoflash/add-pdf-reader"><img src="https://agentmods.dev/badge/skills/refactornator/nanoflash/add-pdf-reader.svg" alt="Measured on agentmods" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 672 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 86% copy Near-identical to another mod 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.00037 $0.00672
Opus 5 $0.00018 $0.00336
Sonnet 5 $0.00007 $0.00134
Haiku 4.5 $0.00004 $0.00067

Measured 4d ago against content hash 1a73f7ceb8db, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

add-pdf-reader 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 4d 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.

Origin

This is a copy

86% identical to add-pdf-reader — 34 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/skills/add-pdf-reader/SKILL.md · 105 lines

How it starts

The opening of the file, as written. The whole thing — 105 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Add PDF Reader

Adds PDF reading capability to all container agents using poppler-utils (pdftotext/pdfinfo). PDFs sent as WhatsApp attachments are auto-downloaded to the group workspace.

Phase 1: Pre-flight

  1. Check if container/skills/pdf-reader/pdf-reader exists — skip to Phase 3 if already applied
  2. Confirm WhatsApp is installed first (skill/whatsapp merged). This skill modifies WhatsApp channel files.

Phase 2: Apply Code Changes

Ensure WhatsApp fork remote

git remote -v

If whatsapp is missing, add it:

git remote add whatsapp https://github.com/qwibitai/nanoclaw-whatsapp.git

Merge the skill branch

git fetch whatsapp skill/pdf-reader
git merge whatsapp/skill/pdf-reader || {
  git checkout --theirs package-lock.json
  git add package-lock.json
  git merge --continue
}

This merges in:

  • container/skills/pdf-reader/SKILL.md (agent-facing documentation)
  • container/skills/pdf-reader/pdf-reader (CLI script)
  • poppler-utils in container/Dockerfile
  • PDF attachment download in src/channels/whatsapp.ts
  • PDF tests in src/channels/whatsapp.test.ts

If the merge reports conflicts, resolve them by reading the conflicted files and understanding the intent of both sides.

Validate

npm run build
npx vitest run src/channels/whatsapp.test.ts

Rebuild container

./container/build.sh

Restart service

launchctl kickstart -k gui/$(id -u)/com.nanoclaw  # macOS
# Linux: systemctl --user restart nanoclaw

Phase 3: Verify

Test PDF extraction

Send a PDF file in any registered WhatsApp chat. The agent should:

  1. Download the PDF to attachments/
  2. Respond acknowledging the PDF
  3. Be able to extract text when asked

Test URL fetching

Ask the agent to read a PDF from a URL. It should use pdf-reader fetch <url>.

Check logs if needed

tail -f logs/nanoclaw.log | grep -i pdf

Look for:

  • Downloaded PDF attachment — successful download
  • Failed to download PDF attachment — media download issue

Read the full file on GitHub · 105 lines

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. 4d ago First seen · 105 lines · 37 tokens per session scan A 1a73f7ceb8db

Subscribe to this mod's changes

add-pdf-reader is a skill published in the GitHub repository refactornator/nanoflash (5 stars, last pushed 4mo ago), licensed MIT. It adds 37 tokens to every session and 672 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 86% identical to add-pdf-reader, differing in 34 lines, and is treated as a copy.

Related

Other skills, from other repositories

foundry-hosted-agent-validation

Step-by-step process for validating a Python Foundry hosted agent sample (under python/samples/04-hosting/foundry-hosted-agents/) end to end — running it locally (native runtime and azd ai agent run) and after deploying it to an Azure AI Foundry project with azd. Use this when asked to validate a hosted agent sample.

microsoft/agent-framework · 82 tokens

paper-reader

Use when user asks to "read paper", "analyze paper", "summarize paper", "读论文", "分析文献", "帮我看一下这篇paper", "论文笔记", or provides a PDF file that appears to be an academic paper. Specialized for CV/DL papers. Also supports Zotero integration: "读一下这篇论文 ...", "快速看一下这篇论文 ...", "批判性分析这篇论文 ...", "读一下 Zotero 里的 XXX", "批量读一下 Zotero…

huangkiki/dailypaper-skills · 157 tokens

citra

Skill "citra" from SylphxAI/pdf-reader-mcp, covering citra — pdf evidence for agents, install, or, tools and sdk.

SylphxAI/pdf-reader-mcp · 0 tokens

graphic-ebook

Creates professionally designed B2B SaaS e-books in HTML + CSS, exported as print-ready PDF. 3–10 pages, 9 style presets, 11 page layout types. Trigger when user says "create an ebook", "design a lead magnet", "make a PDF guide", "build a gated content piece", "write a B2B ebook", "design a white paper", "create a…

Varnan-Tech/opendirectory · 97 tokens

pdf-fill

Fill PDF form fields from a data dict.

hardness1020/awesome-agent-architecture · 12 tokens

pdf-annotations

Use when reading, adding, updating, or removing PDF annotations (highlight, free-text, stamp) or page objects (path/text/image) with Android's platform PDF APIs, or when saving those edits back to disk — the editing surface added in API 36.1 (PdfRenderer.Page) and SDK extension 18 (PdfRendererPreV.Page on API 31+)…

rcosteira79/android-skills · 141 tokens