contextjet-ai/awesome-llm-observability/scrub-pii-from-text
Claude Code and agent skill by contextjet-ai/awesome-llm-observability
- community
Checking that the SKILL.md file is still in the repository.
Use this to strip PII (emails, credit cards, SSNs, phone numbers, IPs, IBANs) out of text before it is logged to a tracing backend or sent to a third-party model. Trigger on "redact PII", "scrub sensitive data", "mask PII before logging", "don't send customer data to the tracing tool", especially for finance/healthcare/regulated apps. Ships a runnable, tested scrubber with a Luhn check to cut false positives.
Install
npx vskill@latest install contextjet-ai/awesome-llm-observability/scrub-pii-from-textSKILL.md
Scrub PII from text
Observability captures prompts and completions, which in a regulated app can mean shipping account numbers or PII to a third-party backend. This skill ships a scrubber you can run in the export path so raw values never leave your process.
Use the bundled script
`scripts/pii_scrub.py` is pure Python, no install needed:
It masks emails, credit cards (Luhn-validated, so random 16-digit order ids are not flagged), US SSNs, phone numbers, IPv4 addresses, and IBANs. Run it directly: python scripts/pii_scrub.py.
How to apply it
- Redact before export, not after: call
scrub()in your span processor / logging hook so no path bypasses it (seeredact-pii-for-tracingfor where that hook goes). - Redact both directions: user input and model output (models echo PII back).
- Layer a real detector for high stakes: this is a strong default, but for finance/health, add Presidio plus a domain ruleset. Regex alone misses context-dependent PII.
Validation
Run the tests: pytest skills/scrub-pii-from-text/tests/. They confirm emails/SSNs/valid cards are masked, that a Luhn-invalid number is left alone (false-positive guard), that clean text is untouched, and that find_pii reports entities.
Anti-patterns
- Regex-only redaction as your whole compliance story for high-stakes data.
- Masking input but not model output.
- Redacting after the SDK already exported the span (mask before export).
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/scrub-pii-from-text/SKILL.md
Popularity
- Repository stars
- 45
- Repository forks
- 32
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/contextjet-ai/awesome-llm-observability/scrub-pii-from-text)