pdf

pdf is a skill for Claude Code, Codex from mateaix/mateclaw. It costs 92 tokens per session (2,541 once invoked), scanned A, original, Apache-2.0.

A toolkit for working with PDF files, which are fixed-layout documents commonly used for reports, forms, and scanned pages. It can extract text and tables, edit page structure, create PDFs, and work with forms and images.

In plain words
What is it for?
Use it to read PDFs, extract tables, recognize text in scans, combine or split documents, rotate pages, add watermarks, fill forms, encrypt files, or extract images.
Why use it?
It provides different methods for text-based and scanned PDFs, including OCR for images whose text cannot be selected. It also covers tasks that ordinary text editors do not handle well, such as merging, splitting, rotating, or encrypting pages.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to read PDFs, extract tables, recognize text in scans, combine or split documents, rotate pages, add watermarks, fill forms, encrypt files, or extract images.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mateaix/mateclaw/pdf
About the project

MateClaw is a pluggable agent runtime that coordinates AI agents, tools, conversations, memory, and workflows. It is designed for personal and multi-user AI assistants, including agents used through chat platforms. Catalogue add-ons provide skills for extending its agent workflows.

mateaix/mateclaw · 1,164 stars · on GitHub · claw.mate.vip

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.

Any agent
npx skills add mateaix/mateclaw --skill pdf
Clone the repo
git clone --depth 1 https://github.com/mateaix/mateclaw

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 pdf

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/mateaix/mateclaw/pdf"><img src="https://agentmods.dev/badge/skills/mateaix/mateclaw/pdf.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 92 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,541 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00092 $0.02541
Opus 5.5 $0.00037 $0.01016
Sonnet 5.5 $0.00018 $0.00508
Haiku 4.5 $0.00009 $0.00254

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

Security

Grade A, and why

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

The scan reads SKILL.md. This mod also ships 8 executable files (scripts/check_bounding_boxes.py, scripts/check_fillable_fields.py, scripts/convert_pdf_to_images.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.

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.

mateclaw-server/src/main/resources/skills/pdf/SKILL.md · 364 lines

How it starts

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

Important: All scripts/ paths are relative to this skill directory. Use run_skill_script tool to execute scripts, or run with: cd {this_skill_dir} && python scripts/...

PDF Processing Guide

Prerequisites

  • pypdf: core PDF reading and writing
  • pdfplumber: text and table extraction
  • reportlab: PDF creation
  • pdftotext (poppler-utils): command-line text extraction
  • pdftoppm (poppler-utils): PDF-to-image conversion
  • qpdf: PDF manipulation (merge, split, rotate, decrypt)

Tool Selection Decision Table

Choose the right approach before starting:

Input Condition Recommended Tool
URL PDF accessible via URL web_extract(url) — fastest, no download needed
Local file Text-native PDF (generated by software) pymupdf — ~25 MB install, instant extraction
Local file Scanned/image-only PDF (no selectable text) marker-pdf — OCR with layout preservation (~5 GB, needs GPU or CPU)
Local file Form filling or page manipulation pypdf / pdfplumber + form scripts
Local file NLP editing or semantic search nano-pdf — sentence-level operations

URL-first rule: If the user provides a URL, always try URL extraction first before downloading.

Overview

This guide covers essential PDF processing operations using Python libraries and command-line tools.

URL-First Extraction

If the user provides a URL pointing to a PDF, extract it without downloading:

web_extract(url="https://example.com/report.pdf")

Fall back to download + local processing only if web_extract returns empty or errors.


Fast Extraction: pymupdf (fitz)

Best for: Text-native PDFs (digital, not scanned). Install: pip install pymupdf (~25 MB).

import fitz  # pymupdf

doc = fitz.open("document.pdf")
print(f"Pages: {doc.page_count}")

# Extract all text (fast)
full_text = "\n".join(page.get_text() for page in doc)

# Extract with layout blocks (tables, columns)
for page in doc:
    blocks = page.get_text("blocks")  # (x0,y0,x1,y1,text,block_no,block_type)
    for block in blocks:
        print(block[4])  # text content

# Extract images
for page in doc:
    for img in page.get_images():
        xref = img[0]
        base = doc.extract_image(xref)
        with open(f"img_{xref}.{base['ext']}", "wb") as f:
            f.write(base["image"])

Read the full file on GitHub · 364 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. 1mo ago First seen · 364 lines · 92 tokens per session scan A f32633b77bc1

Subscribe to this mod's changes

pdf is a skill published in the GitHub repository mateaix/mateclaw (1,164 stars, last pushed yesterday), licensed Apache-2.0. It adds 92 tokens to every session and 2,541 once invoked, about $0.0004 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-30.

Related

Other skills, from other repositories

pdf

Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.

jd-opensource/JoySafeter · 50 tokens

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

doc-reader

Read any common document/data file — PDF, Word (.docx), Excel (.xlsx/.xls), PowerPoint (.pptx), images (OCR), CSV/TSV, plain text, JSON/YAML/TOML, HTML/XML, and most source-code files. Use the readdocument tool.

HKUDS/Vibe-Trading · 65 tokens

oma-pdf

Extract PDF text, headings, tables, and images into Markdown using opendataloader-pdf. Use for PDF parsing, not PDF layout creation.

first-fluke/oh-my-agent · 33 tokens

markdown-converter

Convert binary documents (PDF, DOCX, XLSX, PPTX, HTML, EPUB, images) to clean LLM-friendly Markdown using Microsoft's markitdown Python tool. Use when a user attaches a binary file and you need to read its contents.

Team-Commonly/commonly · 57 tokens

pandic-office

Convert Markdown to PDF (or DOCX/EPUB/HTML) using the pandoc CLI. Use when asked to produce a PDF report, brief, summary, or any document where the input is Markdown and the output should be a polished, paginated file.

Team-Commonly/commonly · 59 tokens