doc-reader

doc-reader is a skill for Claude Code, Codex from JansenAnalytics/claudex. It costs 51 tokens per session (2,657 once invoked), scanned B, original, MIT.

PDF/DOCX/XLSX/image document intelligence — text extraction, table parsing, OCR, financial statement analysis, contract clause detection, document classification, and format conversion. Use when reading, analyzing, extracting data from, or converting documents.

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

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 doc-reader

README.md
[![agentmods](https://agentmods.dev/badge/skills/jansenanalytics/claudex/doc-reader.svg)](https://agentmods.dev/skills/jansenanalytics/claudex/doc-reader)
Your own site
<a href="https://agentmods.dev/skills/jansenanalytics/claudex/doc-reader"><img src="https://agentmods.dev/badge/skills/jansenanalytics/claudex/doc-reader.svg" alt="Measured on agentmods" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,657 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin unknown 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.00051 $0.02657
Opus 5 $0.00026 $0.01328
Sonnet 5 $0.00010 $0.00531
Haiku 4.5 $0.00005 $0.00266

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

Security

Grade B, and why

doc-reader scanned grade B with 1 finding 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 today.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/analyze.py, scripts/convert.py, scripts/extract.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo apt-get install tesseract-ocr-<lang>
skills/doc-reader/SKILL.md · 283 lines

How it starts

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

Doc Reader — Document Intelligence

Extract text, tables, and insights from any document format. Handles native text PDFs, scanned documents (OCR), Word files, spreadsheets, images, and HTML.

Quick Reference

SCRIPTS=${CLAUDE_SKILLS_DIR:-$HOME/.claude-agent/.claude/skills}/doc-reader/scripts

# Extract text from any document
python3 $SCRIPTS/extract.py document.pdf

# Extract tables only
python3 $SCRIPTS/extract.py document.pdf --mode tables

# Full analysis (text + tables + metadata)
python3 $SCRIPTS/extract.py document.pdf --mode summary

# OCR scanned document
python3 $SCRIPTS/extract.py scanned.pdf --mode ocr --ocr-lang eng+nor

# Analyze document (classify, extract figures, structure)
python3 $SCRIPTS/analyze.py document.pdf --extract-figures

# Convert between formats
python3 $SCRIPTS/convert.py report.pdf report.md
python3 $SCRIPTS/convert.py data.xlsx data.csv

Scripts

1. extract.py — Universal Text & Table Extraction

The core extraction engine. Supports PDF, DOCX, XLSX, CSV, images, HTML, and plain text.

Extraction Modes
Mode Description
text Full text extraction (default). Auto-falls back to OCR for scanned pages
tables Table extraction only (as markdown, CSV, or JSON)
meta Document metadata (author, dates, page count, file size)
summary Text + tables + metadata combined
ocr Force OCR on all pages (for fully scanned documents)
layout Layout-preserving text extraction via pdftotext (columns, spacing)
images Extract embedded images from PDF
Usage
# Basic text extraction
python3 extract.py report.pdf
python3 extract.py contract.docx
python3 extract.py financials.xlsx

# Specific pages
python3 extract.py annual-report.pdf --pages 1-5,8,12-15

# Table extraction as JSON
python3 extract.py financials.pdf --mode tables --table-format json

# OCR with Norwegian + English
python3 extract.py scan.pdf --mode ocr --ocr-lang eng+nor

# Full summary to file
python3 extract.py report.pdf --mode summary --output /tmp/report-summary.txt

# JSON output (for programmatic use)
python3 extract.py report.pdf --mode summary --json --output /tmp/report.json

# Excel: specific sheet
python3 extract.py data.xlsx --sheet "Revenue" --mode tables

# Layout mode (preserves columns in multi-column PDFs)
python3 extract.py newspaper.pdf --mode layout

# Limit page count
python3 extract.py huge-doc.pdf --max-pages 20

Read the full file on GitHub · 283 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. today First seen · 283 lines · 51 tokens per session scan B 6925749b9cce

Subscribe to this mod's changes

doc-reader is a skill published in the GitHub repository JansenAnalytics/claudex (5 stars, last pushed 2mo ago), licensed MIT. It adds 51 tokens to every session and 2,657 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories