pdf-digest

pdf-digest is an agent for Claude Code from gonzalezpazmonica/savia. It costs 88 tokens per session (1,022 once invoked), scanned A, original, MIT.

A PDF processing workflow that extracts text, images, tables, and diagrams, then creates a Markdown summary. It uses project files to resolve unclear terms and update project context.

In plain words
What is it for?
It is for digesting technical documents, proposals, protocols, manuals, specifications, and reports.
Why use it?
It removes the need to read long PDFs manually and reduces confusion caused by missing context or unclear text.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; mentions CLAUDE.md; mentions OpenCode.

Part of the pm-workspace plugin — 124 commands, 75 agents shipped together

Good fit It is for digesting technical documents, proposals, protocols, manuals, specifications, and reports.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/gonzalezpazmonica/savia/pdf-digest
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/gonzalezpazmonica/savia

Made for: Claude Code.

Or install pm-workspace, the plugin that ships this one along with the rest of its 124 commands, 75 agents.

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 pdf-digest

README.md
[![agentmods](https://agentmods.dev/badge/agents/gonzalezpazmonica/savia/pdf-digest/github.svg)](https://agentmods.dev/agents/gonzalezpazmonica/savia/pdf-digest)
Your own site
<a href="https://agentmods.dev/agents/gonzalezpazmonica/savia/pdf-digest"><img src="https://agentmods.dev/badge/agents/gonzalezpazmonica/savia/pdf-digest/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 pdf-digest

Your own site · 80×15
<a href="https://agentmods.dev/agents/gonzalezpazmonica/savia/pdf-digest"><img src="https://agentmods.dev/badge/agents/gonzalezpazmonica/savia/pdf-digest.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 88 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,022 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.00088 $0.01022
Opus 5 $0.00044 $0.00511
Sonnet 5 $0.00018 $0.00204
Haiku 4.5 $0.00009 $0.00102

Measured 3d ago against content hash a9eb6e089acd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

pdf-digest 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 3d 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

Copies of this mod

1 near-identical copy found in the catalogue:

.claude/agents/pdf-digest.md · 101 lines

How it starts

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

pdf-digest — Digestion Contextual de PDFs en 4 Fases

Combina extraccion de texto (PyMuPDF) con lectura multimodal de imagenes embebidas (Claude Vision). Produce digest .md y actualiza documentos de contexto del proyecto.

Dependencia: pip install pymupdf (instalar automaticamente si falta)

Fase 1 — Extraccion bruta (sin contexto)

  1. Extraer texto de TODAS las paginas via PyMuPDF (fitz.openpage.get_text())
  2. Extraer imagenes embebidas (page.get_images()fitz.Pixmap → guardar PNG)
  3. Para imagenes >100x100px: leer con Read (Claude Vision) y transcribir contenido
  4. Consolidar texto + imagenes en borrador bruto
  5. Identificar tipo: protocolo, manual, propuesta, informe, spec, presentacion
  6. Marcar con [?] textos dudosos, caracteres mal codificados, siglas desconocidas
  7. Detectar estructura: secciones, subsecciones, tablas, listas, diagramas

Fase 2 — Carga de contexto y resolucion

Leer ficheros del proyecto para construir diccionario de resolucion:

  • CLAUDE.md → stack, equipos, entornos
  • README.md → indice documentos existentes
  • RULES.md, GLOSSARY.md, TEAM.md, STATUS.md (si existen)

Resolver cada [?]:

  • Match unico → [resuelto: X → Y (fuente: fichero.md)]
  • Ambiguo → elegir el mas probable con justificacion
  • Sin match → mantener [?] con hipotesis

Fase 3 — Analisis y sintesis

  1. Extraer informacion estructurada segun tipo (roles, pasos, metricas, decisiones)
  2. Cruzar contra documentos existentes: contradicciones, datos nuevos, confirmaciones
  3. Evaluar vigencia: fecha PDF vs documentos del proyecto (mas reciente = verdad)
  4. Listar gaps: que deberia cubrir el PDF y no cubre

Fase 4 — Actualizacion de contexto (OBLIGATORIA)

  1. Buscar indice del proyecto: README.md o CLAUDE.md
  2. Identificar documentos relevantes para la informacion extraida
  3. Leer cada candidato; si desactualizado o ausente → actualizar con Edit
  4. Respetar limite 150 lineas. Solo datos no confidenciales
  5. Registrar en bloque ACTUALIZACIONES del digest
  6. Registrar en _digest-log.md del proyecto

Read the full file on GitHub · 101 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. 3d ago First seen · 101 lines · 88 tokens per session scan A a9eb6e089acd

Subscribe to this mod's changes

pdf-digest is an agent published in the GitHub repository gonzalezpazmonica/savia (50 stars, last pushed today), licensed MIT. It adds 88 tokens to every session and 1,022 once invoked, about $0.0004 per session on Opus 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-09-06.

Related

Other agents, from other repositories