privacy-parser-pii-extraction — Claude Code skill
Returns personal data found in a string as labelled spans with character offsets. Useful when a log or document has to be inspected before it leaves your machine.
npx skills add reason-machines/trending-skills --skill privacy-parser-pii-extraction -a claude-codeWhat privacy-parser-pii-extraction does
This skill wraps the privacy-parser library, which flips OpenAI's Privacy Filter around. The filter hides PII behind <REDACTED>; here you get the spans back — label, matched text, and where it sits in the original string. Same opf 1.5B weights, same label set.
Three backends ship with it. PIIParser skips the model entirely and matches known formats with regex in microseconds. ModelPIIParser runs the network alone. HybridPIIParser adds span merging plus a regex backstop for secrets, account numbers and URLs, and that is the one to put in production code. Labels cover names, emails, phones, addresses, private URLs, personal dates, account numbers and secrets.
The first call pulls the opf 1.5B checkpoint, roughly 3 GB, into ~/.opf/privacy_filter/; later runs read it from cache. On GPU the model wants about 3 GB of VRAM, so fall back to device="cpu" if that is tight — CPU parsing lands near 600 ms. Offsets index the exact string handed to parse(), so strip or normalise your text only after parsing if you plan to use them.
What it helps with
- pull emails, phones and account numbers out of a log with offsets
- label a dataset of personal data for training
- check whether tokens or passwords leaked into a support ticket
- export every PII span from a document as JSON before publishing
- mask the fragments after reviewing what was found
Example prompts for the agent
- Run this text through privacy-parser and list every PII span with its offsets
- Find secrets and account numbers in
dump.txtand print the result as JSON - Parse the string for personal data and replace each span with its label in square brackets
How to install privacy-parser-pii-extraction
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill privacy-parser-pii-extraction -a claude-code2Manually: put the files in place
~/.claude/skills/privacy-parser-pii-extraction/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/privacy-parser-pii-extraction/
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill privacy-parser-pii-extraction -a codex2Manually: put the files in place
.agents/skills/privacy-parser-pii-extraction/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill privacy-parser-pii-extraction -a cursor2Manually: put the files in place
.cursor/skills/privacy-parser-pii-extraction/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install reason-machines/trending-skills privacy-parser-pii-extraction2Manually: put the files in place
.github/skills/privacy-parser-pii-extraction/SKILL.md1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill privacy-parser-pii-extraction -a gemini-cli2Platform CLI
gemini skills install https://github.com/reason-machines/trending-skills --path skills/privacy-parser-pii-extractionManually: put the files in place
.devin/skills/privacy-parser-pii-extraction/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill privacy-parser-pii-extraction -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about privacy-parser-pii-extraction
How do I install privacy-parser-pii-extraction in Claude Code?
Run npx skills add reason-machines/trending-skills --skill privacy-parser-pii-extraction -a claude-code. The skill lands at ~/.claude/skills/privacy-parser-pii-extraction/SKILL.md.
What does privacy-parser-pii-extraction do?
It scans text and hands back a list of spans, each with a label, the matched substring, and start and end offsets. Nothing is masked for you — you decide what happens to the findings.
How is HybridPIIParser different from ModelPIIParser?
The hybrid merges adjacent spans carrying the same label and adds regex patterns on top of the model output. Secrets, account numbers and URLs are where the model alone misses most, so the gap shows up there.