pdf-text-replace

pdf-text-replace is a skill for Claude Code, Codex from instavm/open-skills. It costs 42 tokens per session (512 once invoked), scanned A, a copy of pdf-text-replace, Apache-2.0.

A tool for replacing text stored in fillable PDF form fields, such as names, addresses, dates, or reference numbers. It does not describe editing ordinary PDF page text.

In plain words
What is it for?
Use it to search form fields and replace matching text in one PDF or across multiple PDFs. The PDFs must still contain editable form fields.
Why use it?
It makes repeated updates to form values easier and avoids manually re-entering information in each PDF.

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/instavm/open-skills/pdf-text-replace
Any agent
npx skills add instavm/open-skills --skill pdf-text-replace
Clone the repo
git clone --depth 1 https://github.com/instavm/open-skills

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-text-replace

README.md
[![agentmods](https://agentmods.dev/badge/skills/instavm/open-skills/pdf-text-replace.svg)](https://agentmods.dev/skills/instavm/open-skills/pdf-text-replace)
Your own site
<a href="https://agentmods.dev/skills/instavm/open-skills/pdf-text-replace"><img src="https://agentmods.dev/badge/skills/instavm/open-skills/pdf-text-replace.svg" alt="Measured on agentmods" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 512 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod 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.00042 $0.00512
Opus 5 $0.00021 $0.00256
Sonnet 5 $0.00008 $0.00102
Haiku 4.5 $0.00004 $0.00051

Measured 4d ago against content hash 0202efedea12, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pdf-text-replace 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 4d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/replace_text_in_pdf.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.

Origin

This is a copy

100% identical to pdf-text-replace — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/public/pdf-text-replace/SKILL.md · 82 lines

What it actually says

PDF Text Replace Skill

Replace text in fillable PDF forms by updating form field values.

Description

This skill allows you to search and replace text in PDF files that have fillable form fields. It scans all form fields in the PDF, finds fields containing the search text, and replaces it with the replacement text.

Use Cases

  • Update names in filled tax forms
  • Replace addresses in PDF documents
  • Update dates or reference numbers
  • Batch update form field values

Requirements

  • PDF must have fillable form fields (not flattened)
  • Python 3.7+
  • pypdf library

Usage

Basic Usage

python /app/uploads/skills/public/pdf-text-replace/scripts/replace_text_in_pdf.py \
    /app/uploads/input.pdf \
    "OLD TEXT" \
    "NEW TEXT" \
    /app/uploads/output.pdf

Example: Replace Name in Tax Form

python /app/uploads/skills/public/pdf-text-replace/scripts/replace_text_in_pdf.py \
    /app/uploads/f5472.pdf \
    "MANISH KUMAR" \
    "MANNU KUMAR" \
    /app/uploads/f5472_updated.pdf

Script Details

Script: scripts/replace_text_in_pdf.py

Arguments:

  1. input_pdf - Path to input PDF file
  2. search_text - Text to search for in form fields
  3. replace_text - Text to replace with
  4. output_pdf - Path to save the updated PDF

Output:

  • Creates a new PDF with updated field values
  • Preserves all form fields (not flattened)
  • Reports number of fields modified

Limitations

  • Only works with fillable PDF forms (not scanned/image PDFs)
  • Replaces text in form field values, not static text
  • Case-sensitive search by default
  • Cannot modify flattened PDFs

Dependencies

The script requires the pypdf library, which is included in the container requirements.

Error Handling

The script will report errors if:

  • Input PDF doesn't exist
  • PDF doesn't have fillable form fields
  • Search text is not found
  • Output path is not writable
Files

What ships with it

1 file 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. 4d ago First seen · 82 lines · 42 tokens per session scan A 0202efedea12

Subscribe to this mod's changes

pdf-text-replace is a skill published in the GitHub repository instavm/open-skills (451 stars, last pushed 7mo ago), licensed Apache-2.0. It adds 42 tokens to every session and 512 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to pdf-text-replace, differing in 0 lines, and is treated as a copy.