zpdf: Instructions file for Claude Code

CLAUDE.md

zpdf CLAUDE.md is an instructions file for Claude Code from Xero-Team/zpdf. It costs 1,790 tokens per session, scanned A, original, MIT.

A repository guide for Claude Code, covering how the zpdf Rust project is built, tested, structured, and extended. It includes commands for working with PDF files.

In plain words
What is it for?
Building, testing, linting, and debugging zpdf, a Rust toolkit for reading and rendering PDF files.
Why use it?
It gives the coding agent the project rules and commands it needs to make changes that fit the existing codebase.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

This is Xero-Team/zpdf's own configuration. It tells Claude Code how to work on zpdf 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 zpdf configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Xero-Team/zpdf. 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/Xero-Team/zpdf/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/Xero-Team/zpdf

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/xero-team/zpdf/claude-md"><img src="https://agentmods.dev/badge/instructions/xero-team/zpdf/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,790 This file is loaded in full into every session.
When invoked 1,790 The same file — it is already loaded in full.
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.01790 $0.01790
Opus 5.5 $0.00716 $0.00716
Sonnet 5.5 $0.00358 $0.00358
Haiku 4.5 $0.00179 $0.00179

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

Security

Grade A, and why

zpdf CLAUDE.md 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 13d 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.

CLAUDE.md · 82 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Build & Test Commands

cargo build                          # build all crates (default: cpu-render)
cargo build --features gpu-render    # include wgpu GPU backend
cargo test                           # run all tests
cargo test -p zpdf-parser            # test a single crate
cargo clippy --workspace             # lint all crates
cargo run -p zpdf-cli -- render <file.pdf> -p 1 -o out.png --dpi 150
cargo run -p zpdf-cli -- info <file.pdf>
cargo run -p zpdf-cli -- dump <file.pdf> <obj-num> <gen-num>
cargo run -p zpdf-cli -- debug-stream <file.pdf> <obj-num> <gen-num>

Features: cpu-render (default, tiny-skia), gpu-render (wgpu). Set on the root zpdf crate.

Architecture

18-crate workspace. Strict one-direction dependency flow — render backends never depend on the parser.

PDF bytes
  → zpdf-parser     (lexer, xref incl. /XRefStm + lazy repair, object/stream decoding, filters, RC4/AES decryption)
  → zpdf-document   (catalog, page tree + attribute inheritance, effective_box/CropBox, font loading)
  → zpdf-content    (content stream tokenizer → operator interpreter; shading.rs evaluates axial/radial gradients, mesh.rs decodes type 4–7 mesh shadings)
  → zpdf-display-list (flat RenderCommand sequence)
  → zpdf-render-cpu | zpdf-render-wgpu  (implements RenderBackend trait from zpdf-render)

Supporting crates feed into zpdf-content: zpdf-font (Type1/TrueType/CID, CMap, encoding), zpdf-image (JPEG/Flate/CCITT/masks/palettes → RGBA), zpdf-color (device/Indexed/Lab conversion + the PDF function evaluator in function.rs — types 0/2/3/4, used by tint transforms and shadings).

zpdf-core provides shared types used everywhere: ObjectId, PdfObject, Matrix, Rect, Error, ParseLimits.

zpdf-writer is the authoring/editing crate (depends on parser + document + content, never on renderers): DocumentBuilder (creation from scratch, TrueType embedding + sparse-glyf subsetting), IncrementalWriter (ISO §7.5.6 updates — annotations with baked /AP, forms, stamps, redaction, page ops, signing; encrypted docs via new_with_password), rewrite_pdf (GC/decrypt/compress/downsample/encrypt-on-save), linearize_pdf (Annex F), append_document (merge incl. outlines/AcroForm/OCGs).

Read the full file on GitHub · 82 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. 13d ago Changed · +2 lines · +20 tokens per session c6a98da67034
  2. 2mo ago First seen · 80 lines · 1,770 tokens per session scan A 1cb260a49933

Subscribe to this mod's changes

zpdf CLAUDE.md is an instructions file published in the GitHub repository Xero-Team/zpdf (16 stars, last pushed 5d ago), licensed MIT. It adds 1,790 tokens to every session, about $0.0072 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

zpdf CLAUDE.md compared with instructions from other repositories

zpdf CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
zpdf CLAUDE.mdXero-Team/zpdfInstructions file165d agoMITA1,790Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode