PDF-Tools: Instructions file for Claude Code

CLAUDE.md

PDF-Tools CLAUDE.md is an instructions file for Claude Code from Open-Document-Alliance/PDF-Tools. It costs 8,541 tokens per session, scanned E, original, MIT.

Project instructions for a PDF toolkit that fills forms, processes groups of PDFs, and extracts data through Claude Desktop and an MCP server. MCP is a standard way for an AI assistant to call external tools.

In plain words
What is it for?
Listing PDFs, reading and filling form fields, handling protected files, filling forms from CSV data, validating forms, and exporting extracted data to CSV.
Why use it?
They explain the toolkit’s supported PDF operations and point agents to a specific handoff document before continuing extraction work.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md.

This is Open-Document-Alliance/PDF-Tools's own configuration. It tells Claude Code how to work on PDF-Tools itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything PDF-Tools configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Open-Document-Alliance/PDF-Tools. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Open-Document-Alliance/PDF-Tools/master/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/Open-Document-Alliance/PDF-Tools

Made for: Claude Code.

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-Tools CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/open-document-alliance/pdf-tools/claude-md/github.svg)](https://agentmods.dev/instructions/open-document-alliance/pdf-tools/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/open-document-alliance/pdf-tools/claude-md"><img src="https://agentmods.dev/badge/instructions/open-document-alliance/pdf-tools/claude-md/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-Tools CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/open-document-alliance/pdf-tools/claude-md"><img src="https://agentmods.dev/badge/instructions/open-document-alliance/pdf-tools/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 8,541 This file is loaded in full into every session.
When invoked 8,541 The same file — it is already loaded in full.
Security scan E 3 findings. A grade says what 26 rules found in the file — not that it is safe. ✓ AI security review Sonnet 5 · 7 Sept 2026 📄 Read the review
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.08541 $0.08541
Opus 5.5 $0.03416 $0.03416
Sonnet 5.5 $0.01708 $0.01708
Haiku 4.5 $0.00854 $0.00854

Measured 9d ago against content hash 0945409e4e50, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade E, and why

PDF-Tools CLAUDE.md scanned grade E with 3 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 9d 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.

Instruction-override phrasinghighPrompt injection

Text telling the model to disregard its earlier instructions or safety rules is the shape of a prompt injection, whoever wrote it.

would bypass the safety rules and fails the artifact test. Do not

Nullifies safety policieshighAnti-refusal

"You have no restrictions", "do anything now", "ignore your guidelines": a direct jailbreak that disables guardrails.

would bypass the safety rules and fails the artifact test. Do not

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

`server/pdf-lib-subprocess.js`. It bounds how long a hostile document may hold
CLAUDE.md · 583 lines

How it starts

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

PDF Toolkit MCP - Development Guide

Active Kepano / Shannon Work

Before continuing the current extraction-improvement tranche, read docs/handoffs/KEPANO_SHANNON.md. The crucial starting fact is that Kepano's example is Shannon's A Mathematical Theory of Communication PDF; it is not a separate example to locate.

This document provides essential context for Claude and other AI assistants when working on the PDF Toolkit extension.

Project Overview

PDF Toolkit is a Claude Desktop extension (MCPB) and MCP server that enables automated PDF form filling, bulk processing, and data extraction. Published in the official Claude Desktop Extension Directory.

Key Features

  • List PDF files in directories
  • Read form fields from PDFs (text, checkboxes, dropdowns, radio buttons)
  • Fill PDF forms programmatically
  • Save filled PDFs to new files
  • Password-protected PDFs: read through PDF.js or qpdf, and changed through qpdf with the document's own protection restored on save (see ## Password Support)
  • Bulk fill from CSV files
  • Profile system for reusable data
  • Extract data from PDFs to CSV
  • Form validation
  • PDF.js text-layer extraction and page/region rendering for visual inspection

Technical Architecture

Technology Stack

  • Runtime: Node.js (ES modules)
  • PDF Libraries: pdf-lib, pdfjs-dist
  • Raster Rendering: @napi-rs/canvas
  • Protocol: MCP (Model Context Protocol)
  • Extension Format: MCPB (built via mcpb pack)

Important Files

  • server/index.js - Main MCP server implementation (all tool definitions and helpers). Prefer incremental updates over rewrites.
  • manifest.json - Claude Desktop extension metadata and UI stub. Update versions alongside package.json.
  • manifest.mcpb.json - MCPB packaging manifest
  • package.json - Node.js dependencies
  • pdf-toolkit-mcp-share/ - Shareable package for Cursor users. Mirror changes from server/index.js when APIs evolve.
  • example-fw9.pdf - Sample form for smoke tests. Keep anonymized assets only.
  • docs/MAINTAINERS.md - Maintainer onboarding and operations
  • docs/RELEASE.md - Release checklist
  • server/qpdf-decrypt.js - The only path by which PDF Tools decrypts. Owns the password rules, the /P permission enforcement, the encrypted-input size cap, the one-at-a-time queue, and the 30-second deadline. It does not run qpdf itself. It also owns re-protection: restoring a source's own encryption onto the bytes a mutation produced, and proving the protection is unchanged before anything is written. See ## Password Support.
  • server/qpdf-decrypt-worker.js - The worker thread that does. The only module that loads the qpdf runtime, and never on the server's own thread. Decides nothing: it runs the qpdf passes the wrapper asks for and reports opaque reason codes.
  • vendor/qpdf-wasm/ - Reproducible QPDF WebAssembly build recipe. The promoted artifact under vendor/qpdf-wasm/runtime/ is shipped in both the MCPB and the share ZIP at that same path, and is loaded by exactly one module, server/qpdf-decrypt-worker.js, which is started from exactly one place, server/qpdf-decrypt.js — a second importer, or a second starter, would bypass the safety rules and fails the artifact test. Do not hand-edit runtime/ or runtime.provenance.json; regenerate them with node scripts/vendor-qpdf-wasm-runtime.mjs <extracted-build-directory>. npm run qpdf-wasm:verify is a ~45-minute Docker release gate and must stay out of npm test; the fast binding lives in test/qpdf-wasm-runtime-artifact.test.js.

Read the full file on GitHub · 583 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. 9d ago Changed · +12 lines · +175 tokens per session 0945409e4e50
  2. 21d ago Changed · +2 lines · +75 tokens per session 02f3d58822b1
  3. 1mo ago Changed · +29 lines · +407 tokens per session 1f0162ce1aa8
  4. 1mo ago Changed · +2 lines · +86 tokens per session bc5bcc5c9b6a
  5. 1mo ago Changed · +5 lines · +109 tokens per session 9eecfc359062
  6. 1mo ago First seen · 533 lines · 7,689 tokens per session scan E 43c06417acb7

Subscribe to this mod's changes

PDF-Tools CLAUDE.md is an instructions file published in the GitHub repository Open-Document-Alliance/PDF-Tools (158 stars, last pushed 2d ago), licensed MIT. It adds 8,541 tokens to every session, about $0.0342 per session on Opus 5.5. A static security scan graded it E with 3 findings (instruction-override phrasing, nullifies safety policies, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,649 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,549 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens