autorename-pdf: Instructions file for Codex

AGENTS.md

autorename-pdf AGENTS.md is an instructions file for Codex, OpenCode from ptmrio/autorename-pdf. It costs 898 tokens per session, scanned A, original, MIT.

Project instructions for AutoRename-PDF, a tool that uses AI and OCR to rename PDF files. OCR means reading printed or scanned text from an image or document.

In plain words
What is it for?
Use them when developing or maintaining the PDF renamer, including its command-line tool, GUI, configuration, tests, and builds.
Why use it?
They give coding agents the project's sources of truth, setup rules, commands, and testing requirements.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

This is ptmrio/autorename-pdf's own configuration. It tells Codex and OpenCode 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/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/ptmrio/autorename-pdf

Made for: Codex, OpenCode.

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 autorename-pdf AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/ptmrio/autorename-pdf/agents-md"><img src="https://agentmods.dev/badge/instructions/ptmrio/autorename-pdf/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 898 This file is loaded in full into every session.
When invoked 898 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.00898 $0.00898
Opus 5.5 $0.00359 $0.00359
Sonnet 5.5 $0.00180 $0.00180
Haiku 4.5 $0.00090 $0.00090

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

Security

Grade A, and why

autorename-pdf AGENTS.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 1mo 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.

AGENTS.md · 67 lines

How it starts

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

AutoRename-PDF

PDF auto-renamer using AI + OCR. Output: YYYYMMDD COMPANY AP 12,13.pdf (business) or academic date/author/venue/title.

Be concise. Smallest correct diff. Always use the project venv — never install Python deps globally.

Sources of truth

Do not copy these into this file.

Need Where
Provider / OCR / vision knobs config.yaml.example
Recipe configs (academic, ER/AR, Ollama, vision, invoice-id) examples/
Human install and usage README.md
Company-name aliases harmonized-company-names.yaml.example

Commands

Activate venv first (venv\Scripts\activate on Windows).

Task Command
Install pip install -r requirements.txt and requirements-dev.txt
CLI python autorename-pdf.py rename <path>
Dry-run python autorename-pdf.py rename <path> --dry-run
Undo python autorename-pdf.py undo
Config python autorename-pdf.py config show / config validate
Lint python -m ruff check .
Test pytest tests/ -v --cov
Live test pytest tests/ --run-live --provider ollama -v
EXE + GUI zip python build.py
GUI typecheck pnpm -C gui typecheck
GUI unit tests pnpm -C gui test:run
GUI dev pnpm -C gui tauri dev

JSON mode: --output json. Exit codes: 0 ok, 1 error, 2 usage, 3 config, 4 no files, 5 partial, 10 provider, 11 auth.

Architecture

Functional Python (no classes). _*.py modules are internal.

Module Role
autorename-pdf.py CLI + orchestration
_ai_processing.py Native structured parse for OpenAI (responses.parse) and Anthropic (messages.parse); instructor for Gemini, xAI, Ollama
_pdf_utils.py pdfplumber, pypdfium2, PaddleOCR bridge
_paddleocr_bridge.py Isolated PaddleOCR venv subprocess
_document_processing.py Harmonize (Jaro-Winkler), rename, undo
_config_loader.py YAML v2; ${VAR} from .env beside config
_utils.py Filename validation, constants

Read the full file on GitHub · 67 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 Changed · +1 lines · +39 tokens per session b53352c008ba
  2. 2mo ago First seen · 66 lines · 859 tokens per session scan A c4c25eb24b29

Subscribe to this mod's changes

autorename-pdf AGENTS.md is an instructions file published in the GitHub repository ptmrio/autorename-pdf (120 stars, last pushed 1mo ago), licensed MIT. It adds 898 tokens to every session, about $0.0036 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-09-07.

Related

autorename-pdf AGENTS.md compared with instructions from other repositories

autorename-pdf AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
autorename-pdf AGENTS.mdptmrio/autorename-pdfInstructions file1201mo agoMITA898Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot