hipaa-phi-redaction-pipeline

hipaa-phi-redaction-pipeline is a skill for Claude Code, Codex from vaquarkhan/compliance-agent-skills. It costs 117 tokens per session (2,081 once invoked), scanned A, original, MIT.

A privacy pipeline for detecting and masking protected health information before it reaches an AI model. It uses Presidio to find sensitive entities, replaces them with reversible tokens, and restores them only for authorized recipients.

In plain words
What is it for?
Use it to redact names, contact details, identification numbers, medical licenses, addresses, and other configured sensitive data in healthcare-related prompts and responses.
Why use it?
It reduces the risk of sending raw patient or other protected medical data to the model. It also keeps a controlled way to restore the original values downstream.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to redact names, contact details, identification numbers, medical licenses, addresses, and other configured sensitive data in healthcare-related prompts and responses.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vaquarkhan/compliance-agent-skills/hipaa-phi-redaction-pipeline
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add vaquarkhan/compliance-agent-skills --skill hipaa-phi-redaction-pipeline
Clone the repo
git clone --depth 1 https://github.com/vaquarkhan/compliance-agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for hipaa-phi-redaction-pipeline

README.md
[![agentmods](https://agentmods.dev/badge/skills/vaquarkhan/compliance-agent-skills/hipaa-phi-redaction-pipeline/github.svg)](https://agentmods.dev/skills/vaquarkhan/compliance-agent-skills/hipaa-phi-redaction-pipeline)
Your own site
<a href="https://agentmods.dev/skills/vaquarkhan/compliance-agent-skills/hipaa-phi-redaction-pipeline"><img src="https://agentmods.dev/badge/skills/vaquarkhan/compliance-agent-skills/hipaa-phi-redaction-pipeline/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for hipaa-phi-redaction-pipeline

Your own site · 80×15
<a href="https://agentmods.dev/skills/vaquarkhan/compliance-agent-skills/hipaa-phi-redaction-pipeline"><img src="https://agentmods.dev/badge/skills/vaquarkhan/compliance-agent-skills/hipaa-phi-redaction-pipeline.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 117 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,081 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00117 $0.02081
Opus 5 $0.00059 $0.01040
Sonnet 5 $0.00023 $0.00416
Haiku 4.5 $0.00012 $0.00208

Measured 12d ago against content hash 5b5e3697d2b7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

hipaa-phi-redaction-pipeline scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/hipaa-phi-redaction-pipeline/SKILL.md · 164 lines

How it starts

The opening of the file, as written. The whole thing — 164 lines — stays where its author put it; the contents beside it link to each section on GitHub.

HIPAA PHI Redaction Pipeline

Overview

This skill governs the PHI redaction gate that prevents raw ePHI from reaching the LLM reasoning engine. The repository implements this in redaction.py using Microsoft Presidio (presidio_analyzer, presidio_anonymizer) with reversible masked tokens (e.g., <PERSON_1>, <US_SSN_1>).

Pipeline flow:

User input → Presidio analyze → Tokenize → Redacted text → LLM/agent → Output → Deanonymize (authorized only)

The compliance agent (agent.py) runs redaction upstream of compliance_agent.run(). The agent receives only redacted text; restoration uses deanonymize_response tool or PHIRedactor.deanonymize() for authorized downstream delivery.

Default entity profile (entity_profile="balanced" in PHIRedactor): PERSON, PHONE_NUMBER, EMAIL_ADDRESS, US_SSN, US_DRIVER_LICENSE, US_PASSPORT, US_BANK_NUMBER, CREDIT_CARD, MEDICAL_LICENSE, IP_ADDRESS.

Aggressive profile (entity_profile="aggressive"): balanced types plus DATE_TIME, LOCATION, NRP, URL — higher recall but over-redacts audit URLs and dates. Use for clinical free-text; use balanced for PCI/SOC 2 technical audits.

Legacy alias DEFAULT_ENTITY_TYPES maps to the aggressive list.

Built-in custom recognizers in redaction.py add dashed and spaced US SSN patterns. For MRN/ICD/CPT, see examples/custom-ssn-recognizer.py.

When to Use

Use this skill when:

  • Tuning Presidio entity types or score thresholds for your data
  • Validating redaction effectiveness before production agent deployment
  • Auditing whether prompts/responses leak ePHI past the gate
  • Integrating Presidio MCP or custom DLP with the agent pipeline
  • Configuring session-scoped token maps and deanonymization authorization
  • Testing edge cases: clinical notes, structured HL7/FHIR snippets, mixed PHI/PCI

Do not use this skill when:

  • Designing IAM or encryption controls (use hipaa-technical-safeguards)
  • Replacing a full data-loss-prevention program for non-LLM channels
  • PCI cardholder data tokenization in payment systems (use PCI skills)

Read the full file on GitHub · 164 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 164 lines · 117 tokens per session scan A 5b5e3697d2b7

Subscribe to this mod's changes

hipaa-phi-redaction-pipeline is a skill published in the GitHub repository vaquarkhan/compliance-agent-skills (2 stars, last pushed 18d ago), licensed MIT. It adds 117 tokens to every session and 2,081 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

cmmc-assessment-objectives

Verbatim reference for all 320 NIST 800-171A Rev 2 assessment objectives, plus the Rev 2 → Rev 3 control crosswalk. Use for AO-level lookups (e.g., 3.1.1[c]), evidence planning, and forward-mapping to Rev 3. Pairs with cmmc-expert.

GRCEngClub/claude-grc-engineering · 80 tokens

dora-expert

DORA expert for EU financial entities. Deep knowledge of Digital Operational Resilience Act including 5 pillars, ICT risk management, incident reporting, resilience testing, third-party oversight, and information sharing for financial sector digital resilience.

GRCEngClub/claude-grc-engineering · 49 tokens

cmmc-expert

CMMC v2.0 expert for DoD contractors. Covers NIST 800-171 Rev 2 (14 families, 110 controls), SPRS scoring, POA&M rules, 32 CFR Part 170, DFARS clauses, scoping, ESP/CSP, C3PAO assessment lifecycle, and Rev 2 → Rev 3 transition.

GRCEngClub/claude-grc-engineering · 80 tokens

eu-nis2-expert

EU NIS2 Directive (Directive (EU) 2022/2555) expert. Reference-depth knowledge of essential vs important entity classification, Article 20 governance, the Article 21 ten cybersecurity risk-management measures, the Article 23 24h/72h/1mo incident-reporting timeline, and supervision/enforcement under Articles 32-34.…

GRCEngClub/claude-grc-engineering · 90 tokens

gdpr-expert

GDPR expert for EU privacy compliance. Deep knowledge of General Data Protection Regulation including 99 articles, 7 principles, 6 lawful bases, data subject rights, DPO requirements, DPIA, breach notification, cross-border transfers, and enforcement.

GRCEngClub/claude-grc-engineering · 55 tokens

glba-expert

GLBA expert for financial institutions. Deep knowledge of Gramm-Leach-Bliley Act including Safeguards Rule (16 CFR Part 314), Privacy Rule (16 CFR Part 313), FTC enforcement, information security program requirements, vendor management, and consumer privacy notices.

GRCEngClub/claude-grc-engineering · 58 tokens