anonymize-before-ai

anonymize-before-ai is a skill for Claude Code from dambuchs/redact-pdf-mcp. It costs 89 tokens per session (811 once invoked), scanned A, original, MIT.

A workflow for replacing names and other personal details in confidential files with tags before an AI analyses them. It supports documents such as contracts, medical reports, bank statements, and case files.

In plain words
What is it for?
Use it to anonymize a PDF, JPEG, or PNG before summarising, translating, analysing, or drafting from it, then restore the names locally when needed.
Why use it?
It reduces the chance that real identities, account details, or other private information enter the AI conversation.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the redact-pdf-ai plugin — 2 skills, 1 MCP server shipped together

Good fit Use it to anonymize a PDF, JPEG, or PNG before summarising, translating, analysing, or drafting from it, then restore the names locally when needed.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dambuchs/redact-pdf-mcp/anonymize-before-ai
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.

Any agent
npx skills add dambuchs/redact-pdf-mcp --skill anonymize-before-ai
Clone the repo
git clone --depth 1 https://github.com/dambuchs/redact-pdf-mcp

Made for: Claude Code.

Or install redact-pdf-ai, the plugin that ships this one along with the rest of its 2 skills, 1 MCP server.

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 anonymize-before-ai

README.md
[![agentmods](https://agentmods.dev/badge/skills/dambuchs/redact-pdf-mcp/anonymize-before-ai/github.svg)](https://agentmods.dev/skills/dambuchs/redact-pdf-mcp/anonymize-before-ai)
Your own site
<a href="https://agentmods.dev/skills/dambuchs/redact-pdf-mcp/anonymize-before-ai"><img src="https://agentmods.dev/badge/skills/dambuchs/redact-pdf-mcp/anonymize-before-ai/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 anonymize-before-ai

Your own site · 80×15
<a href="https://agentmods.dev/skills/dambuchs/redact-pdf-mcp/anonymize-before-ai"><img src="https://agentmods.dev/badge/skills/dambuchs/redact-pdf-mcp/anonymize-before-ai.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 811 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.00089 $0.00811
Opus 5.5 $0.00036 $0.00324
Sonnet 5.5 $0.00018 $0.00162
Haiku 4.5 $0.00009 $0.00081

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

Security

Grade A, and why

anonymize-before-ai 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 today.

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.

plugin/skills/anonymize-before-ai/SKILL.md · 51 lines

How it starts

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

Anonymize, work, then put the names back

The point of this workflow is that the real names never enter the conversation. One careless read of the original file undoes it, so follow these steps in order.

1. Do not open the original

Do not Read, cat, preview, OCR or summarize the user's file before step 2. Pass its path to the tool and nothing else. If the user pasted the document's text into the chat instead of giving a file, tell them the names are already in the conversation, and suggest they save it as a PDF and give you the path next time.

2. Pseudonymize it

Call redact_pdf_and_wait with:

  • file_path: the user's PDF, JPEG or PNG. Pass images as they are; don't convert them to PDF.
  • mode: "pseudonymize".

Every person, organization, address, email, phone number, date, IBAN and card number becomes a consistent tag such as [Person 1] or [Org 2], in the document's own language. The same person keeps the same tag on every page. National IDs and custom terms are blacked out instead.

The result gives you:

  • document_text: the pseudonymized document as text. Long documents return document_text_path instead; reading that file is fine, because it only contains tags.
  • output_path: the pseudonymized PDF.
  • correspondence_path: the tag → original table. Never open, read or quote it. It is the one file that re-identifies the document.

If there is no API key, call try_demo with the same file_path. It does the first page for free. Then tell the user a free account gets its first document (up to 5 pages) done in full. If the user then gives you a key in the conversation, call set_api_key with it once and carry on; don't repeat the key back.

3. Do the work on the tags

Do what the user asked using document_text only. Keep every tag exactly as written, brackets included, so it can be swapped back. Don't guess who a tag refers to, and don't invent names.

Write your result to a .md, .txt or .docx file in the user's folder.

Read the full file on GitHub · 51 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. today First seen · 51 lines · 89 tokens per session scan A da9f3218505d

Subscribe to this mod's changes

anonymize-before-ai is a skill published in the GitHub repository dambuchs/redact-pdf-mcp (1 stars, last pushed today), licensed MIT. It adds 89 tokens to every session and 811 once invoked, about $0.0004 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-10-19.

Related

Other skills, from other repositories

pdf-processing

Extract text from PDFs, fill forms, and merge documents.

PrefectHQ/fastmcp · 11 tokens

kernelcad-drawings

Export 2D engineering-drawing sheets (SVG, or a printable PDF on a standard sheet) from any model or assembly — third-angle front/top/left + isometric views with hidden-line removal, overall dimensions, and a title block. Use when the deliverable is a human-readable fabrication or review drawing.

w1ne/kernelCAD-web · 69 tokens

agoragentic-anydoc-document-evidence

Convert a local Word, PowerPoint, spreadsheet, OpenDocument, RTF, EPUB, CSV, or text-based PDF into bounded Markdown and an Agoragentic evidence handoff. Use when an agent needs document contents plus runtime-verified provenance, explicit evidence coverage, known-loss warnings, and a pending-or-incomplete parse…

rhein1/agoragentic-integrations · 82 tokens

contract-analyzer

Extract contract parties, clauses, dates, and model-assessed risks using processdocument. Use when the user supplies contract text, Markdown, or a PDF/image for analysis.

Swih/mistral-mcp · 38 tokens

pdf-invoice-extractor

Extract typed invoice data from supplied text, Markdown, or a PDF/image through processdocument. Use for invoice totals, line items, due dates, and extraction anomalies.

Swih/mistral-mcp · 39 tokens

book-mirror

Take any book (EPUB/PDF), produce a personalized chapter-by-chapter analysis with two-column tables. Left column preserves the chapter content; right column maps every idea to the reader's actual life using brain context. Output is a single brain page at media/books/ -personalized plus an optional PDF via brain-pdf.

timurgaleev/memex · 71 tokens