Agent skill · research science · aradotso
openai-privacy-filter
OpenAI Privacy Filter — bidirectional token-classification model for PII detection and masking in text
Why this skill is useful
Adds a CLI tool and Python API for PII detection and redaction, enabling new capabilities for text processing.
What it needs
Requires pip installed locally. About 4k tokens when loaded. Last updated 2026-07-09. 70 stars on the source repository.
What this skill does
OpenAI Privacy Filter Skill by ara.so — Daily 2026 Skills collection. OpenAI Privacy Filter is a bidirectional token-classification model (1.5B params, 50M active) for detecting and masking PII spans in text. It runs in a single forward pass with constrained Viterbi decoding, supports a 128k-token context window, and is licensed Apache 2.0. Installation After install, the opf CLI is available. On first use it downloads the model checkpoint to ~/.opf/privacyfilter unless OPFCHECKPOINT is set. Detected PII Categories Label Description --- --- accountnumber Bank/card/account numbers privateaddress Physical addresses privateemail Email addresses privateperson Personal names privatephone Phone numbers privateurl Personal URLs privatedate Dates of birth / personal dates secret Credentials, tokens, API keys CLI Usage One-shot redaction Evaluation Finetuning Python API Batch processing Precision/Recall tuning via operating points Data Format Input for eval and training (JSONL) Each line is a JSON object: JSON output schema See OUTPUTSCHEMAS.md in the repo for full payload spec. Finetuning Workflow See FINETUNING.md and examples/scripts/finetuning/ for runnable demo harnesses. Environment Variables Variable Purpose --- --- OPFCHECKPOINT Path to model checkpoint directory (overrides default ~/.opf/privacyfilter) Project Structure Common Patterns Pipeline: sanitize files before uploading to an LLM Audit: log all detected PII spans without redacting Filter specific label types only Troubleshooting Model not found / auto-download fails Set OPFCHECKPOINT to a local checkpoint directory, or ensure internet access for the first run. Checkpoint is downloaded from https://huggingface.co/openai/privacy-filter. CUDA out of memory Use --device cpu or reduce batch size with --batch-size 1. Low recall on domain-specific identifiers Finetune on representative labeled examples using opf train. Try operatingpoint="highrecall" for broader masking. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aradotso/openai-privacy-filter