# privacy-parser-pii-extraction

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.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 310 installs · ★ 88
- Author: reason-machines
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/reason-machines/trending-skills/tree/HEAD/skills/privacy-parser-pii-extraction/SKILL.md
- Updated: 2026-10-09
- HTML: https://affpapa.org/en/nevibecode/skills/privacy-parser-pii-extraction

## What it 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.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill privacy-parser-pii-extraction -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/privacy-parser-pii-extraction/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/privacy-parser-pii-extraction/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill privacy-parser-pii-extraction -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/privacy-parser-pii-extraction/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill privacy-parser-pii-extraction -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/privacy-parser-pii-extraction/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install reason-machines/trending-skills privacy-parser-pii-extraction
```

2. **Manually: put the files in place**
- File: `.github/skills/privacy-parser-pii-extraction/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill privacy-parser-pii-extraction -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/reason-machines/trending-skills --path skills/privacy-parser-pii-extraction
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/privacy-parser-pii-extraction/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill privacy-parser-pii-extraction -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/reason-machines/trending-skills/tree/HEAD/skills/privacy-parser-pii-extraction/SKILL.md

## When to use it
- 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
- Run this text through privacy-parser and list every PII span with its offsets
- Find secrets and account numbers in `dump.txt` and print the result as JSON
- Parse the string for personal data and replace each span with its label in square brackets

## Similar
- [pii-detect](https://affpapa.org/en/nevibecode/skills/pii-detect.md) — skill · 762 installs
- [privacy-policy](https://affpapa.org/en/nevibecode/skills/privacy-policy.md) — skill · 3500 installs
- [privacy-engineering](https://affpapa.org/en/nevibecode/skills/privacy-engineering.md) — skill · 352 installs
- [pdf-extraction](https://affpapa.org/en/nevibecode/skills/pdf-extraction.md) — skill · 9300 installs
- [gdpr-compliance](https://affpapa.org/en/nevibecode/skills/gdpr-compliance.md) — skill · 365 installs
- [azure-ai-textanalytics-py](https://affpapa.org/en/nevibecode/skills/azure-ai-textanalytics-py.md) — skill · 2 installs

From the same set: [reason-machines/trending-skills](https://affpapa.org/en/nevibecode/by/reason-machines/trending-skills.md) — 186 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
