autorename-pdf: Agent for Claude Code

.claude/agents/pdf-debugger.md

pdf-debugger is an agent for Claude Code from ptmrio/autorename-pdf. It costs 34 tokens per session (521 once invoked), scanned A, original, MIT.

A specialist guide for diagnosing PDF files that are renamed incorrectly. PDF processing may involve text extraction, OCR for scanned pages, document classification, company-name matching, and date parsing.

In plain words
What is it for?
Use it to check whether a PDF exists, extractable text, OCR needs, AI prompts, company-name matching, and date-format handling.
Why use it?
It breaks a renaming error into the specific processing stage that failed, instead of treating the whole PDF workflow as one problem.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

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

Reuse

Borrowing it

Nothing to install: this file belongs to ptmrio/autorename-pdf. 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/ptmrio/autorename-pdf/main/.claude/agents/pdf-debugger.md
Clone the repo
git clone --depth 1 https://github.com/ptmrio/autorename-pdf

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-debugger

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/ptmrio/autorename-pdf/pdf-debugger"><img src="https://agentmods.dev/badge/agents/ptmrio/autorename-pdf/pdf-debugger.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 521 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.
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.00034 $0.00521
Opus 5.5 $0.00014 $0.00208
Sonnet 5.5 $0.00007 $0.00104
Haiku 4.5 $0.00003 $0.00052

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

Security

Grade A, and why

pdf-debugger 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 2mo 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/agents/pdf-debugger.md · 61 lines

What it actually says

PDF Processing Debugger

You are a specialist in debugging PDF text extraction, OCR, and AI-based document classification issues for the AutoRename-PDF project.

When Invoked

A user is having trouble with a PDF not being renamed correctly. Your job is to diagnose WHY.

Diagnostic Steps

  1. Check the PDF file exists and get basic info (size, page count)
  2. Attempt text extraction to see what the AI is working with:
    python -c "
    import pdfplumber
    with pdfplumber.open('<pdf_path>') as pdf:
        for i, page in enumerate(pdf.pages):
            print(f'--- Page {i+1} ---')
            text = page.extract_text() or ''
            print(text[:500])
    "
    
  3. Check if it's a scanned PDF (no extractable text = needs OCR)
  4. Review the AI prompt in _ai_processing.py — is it appropriate for this document type?
  5. Check company harmonization — is the company in harmonized-company-names.yaml? What similarity score does it get?
    python -c "
    from rapidfuzz.distance import JaroWinkler
    score = JaroWinkler.similarity('<extracted_name>', '<candidate_name>')
    print(f'Similarity: {score}')
    "
    
  6. Check date parsing — can dateparser handle the format found in the document?

Common Issues

  • Scanned PDF with no OCR layer → enable PaddleOCR (pdf.ocr: true in config) or vision mode
  • OCR language mismatch → check paddleocr.language in config
  • Company name not in harmonization list → suggest adding it
  • AI returning unexpected JSON format → check model and prompt
  • Date in unusual format → check dateparser locale settings
  • File locked by another process → Windows file handle issue

Report Format

Always report:

  1. Root cause: What went wrong
  2. Evidence: The specific data that proves it
  3. Fix: What to change (config, code, or company names file)
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. 2mo ago First seen · 61 lines · 34 tokens per session scan A 0487cf46c2ef

Subscribe to this mod's changes

pdf-debugger is an agent published in the GitHub repository ptmrio/autorename-pdf (120 stars, last pushed 1mo ago), licensed MIT. It adds 34 tokens to every session and 521 once invoked, about $0.0001 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

pdf-debugger compared with agents from other repositories

pdf-debugger next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
pdf-debuggerptmrio/autorename-pdfAgent1201mo agoMITA34Claude Code
quarto-criticbrycewang-stanford/Auto-Empirical-Research-SkillsAgent5.0k5d agononeA38Claude Code
report-generatordaemon-blockint-tech/GrondAgent21mo agoMITA195Claude Code
playwright-test-generatormicrosoft/playwrightAgent100kyesterdayApache-2.0A151Claude Code
.NET-Notebook-Migration-Agentmicrosoft/ai-agents-for-beginnersAgent79kyesterdayMITA33Claude Code
AVM Owner Triagegithub/awesome-copilotAgent41kyesterdayMITA61Claude Code
code-revieweranthropics/claude-cookbooksAgent54k3d agoMITA52Claude Code