Skip to main content
skill CX Codex

openai-privacy-filter — Claude Code skill: mask PII in text

A skill that wires a token-classification model into your project to find and blank out personal data. Useful before shipping logs or documents to an LLM.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add reason-machines/trending-skills --skill openai-privacy-filter -a claude-code
Open on GitHub

What openai-privacy-filter does

The model labels text token by token and returns span boundaries in a single forward pass. Eight categories are covered: names, addresses, email, phone numbers, personal URLs, dates, account numbers and secrets such as tokens and API keys. Context window is 128k tokens, license Apache 2.0.

The repo ships an opf CLI with three modes: one-shot redaction of a string or file, evaluation on labeled JSONL, and finetuning on your own dataset. The Python API gives you PrivacyFilter() with redact for one string and redact_batch for a list, plus the detected spans with labels and offsets. Precision and recall are tuned through operating_point — high_recall masks wider, high_precision is stricter.

One thing to plan for: the checkpoint downloads to ~/.opf/privacy_filter on first use, so on a tight disk or a closed network set OPF_CHECKPOINT beforehand. GPU inference needs --device cuda, otherwise it runs on CPU. Finetuning expects labeled JSONL with spans, so opf train has nothing to work with until you build that file.

What it helps with

  • strip names and emails from logs before sending them to a model
  • mask card and account numbers in an export
  • find tokens and API keys inside config text
  • score the detector against your own labeled set
  • finetune the model for your project's PII format

Example prompts for the agent

  • Run opf -f logs/app.txt and show me what got masked
  • Write a script using PrivacyFilter(operating_point="high_recall") and process a batch of texts
  • Build a JSONL with spans and run opf train train.jsonl --output-dir ./my_finetuned_model

How to install openai-privacy-filter

1Skills CLI (Vercel)

npx skills add reason-machines/trending-skills --skill openai-privacy-filter -a claude-code

2Manually: put the files in place

~/.claude/skills/openai-privacy-filter/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/openai-privacy-filter/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about openai-privacy-filter

How do I install Anthropic-privacy-filter in Claude?

Run npx skills add reason-machines/trending-skills --skill openai-privacy-filter -a claude-code. The skill lands at ~/.claude/skills/openai-privacy-filter/SKILL.md.

What does openai-privacy-filter do?

It detects personal data in text and replaces it with block characters. You drive it through the opf CLI or the Python API, and it returns the spans it found with labels.

What does the skill need to run?

Install the package with pip install -e .; the first run downloads a checkpoint to ~/.opf/privacy_filter. Point OPF_CHECKPOINT elsewhere if you keep models in a different place.

Similar skills

Everything for Security →

From the same set42

huashu-design-html-native Turns a plain-language request into a finished file: prototype, slide deck, animation or infographic in HTML/CSS/JS. No Figma involved. CX Codex +1 426installs cc-design-html-prototyping This skill builds HTML mockups, slide decks, and interactive prototypes. Use it to explore visual directions before implementing an interface. CX Codex +1 423installs lingbot-map-3d-reconstruction A skill for streaming 3D scene reconstruction from images or video: point clouds, camera poses, depth maps. Useful when you need geometry out of a long frame sequence. CX Codex +1 418installs pgque-postgres-queue A skill that walks you through PgQue, a snapshot-based Postgres queue written in pure PL/pgSQL. Useful when events need to move inside the database. CX Codex +1 400installs aube-package-manager Guidance for using aube, a Rust-based Node.js package manager, across dependencies, workspaces, CI, and migrations from other package managers. CX Codex +1 392installs create-simulated-aeronautics-mod This skill covers development for Create Simulated, from force-providing blocks to physics contraptions. Use it when building Minecraft planes, airships, or land vehicles. CX Codex +1 391installs permiso-accessibility-permissions A skill for coding agents that shows how to add a guided macOS accessibility permission panel to a Swift app. CX Codex +1 386installs gpt2api-openai-gateway This skill walks your agent through deploying a self-hosted Anthropic-compatible gateway over chatgpt.com and wiring up an account pool. CX Codex +1 378installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor