Borrowing it
Nothing to install: this file belongs to charliehzm/medharness. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/charliehzm/medharness/main/.claude/skills/phi-desensitize/SKILL.mdgit clone --depth 1 https://github.com/charliehzm/medharnessWrote 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.
[](https://agentmods.dev/skills/charliehzm/medharness/phi-desensitize)<a href="https://agentmods.dev/skills/charliehzm/medharness/phi-desensitize"><img src="https://agentmods.dev/badge/skills/charliehzm/medharness/phi-desensitize/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.
<a href="https://agentmods.dev/skills/charliehzm/medharness/phi-desensitize"><img src="https://agentmods.dev/badge/skills/charliehzm/medharness/phi-desensitize.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00224 | $0.01903 |
| Opus 5 | $0.00112 | $0.00951 |
| Sonnet 5 | $0.00045 | $0.00381 |
| Haiku 4.5 | $0.00022 | $0.00190 |
Grade A, and why
phi-desensitize 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 11d 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.
How it starts
The opening of the file, as written. The whole thing — 139 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PHI Desensitize
The single most important runtime gate in the entire AI Coding system: no L3/L4 token should ever enter a model context window without first passing through this skill.
Core mental model
Desensitization is not redaction. Redaction destroys information; desensitization replaces it with reversible placeholders so the downstream LLM can still reason about structure and relationships, while the operator can reverse the mapping on a vetted output in a controlled environment.
"Patient 张三 (ID 110101199001011234) seen 2026-03-12"
↓ desensitize
"Patient {{PT_A1}} (ID {{ID_B7}}) seen {{DATE_C3}}"
↓ LLM reasons, produces analysis referencing {{PT_A1}}
↓ controlled reversal in approved environment
"Patient 张三 (ID 110101199001011234) seen 2026-03-12 — diagnosis: ..."
What this skill produces
For each invocation:
desensitized_payload— sanitized text / JSON / fixture<source>.desensitize_map.json.enc— encrypted reversal map (AES-256-GCM, key from KMS)residual_risk_report.md— listing any tokens the classifier was uncertain about
When NOT to use this skill
Skip for:
- Already fully synthetic data (use
test-data-generationinstead) - Purely L1 / public content (no PHI possible)
- One-way logging where reversal is never needed (use simple redaction)
- Encryption / hashing at storage layer (that's data-at-rest concern, different domain)
Active context bundle
Always load first
- This
SKILL.md reference/hipaa-18-identifiers.md— the canonical PHI taxonomyreference/cn-personal-info-catalog.md— 公安部 / 健康医疗数据安全指南 PII categoriesreference/detection-rules.md— regex + ML classifier combination strategy
Load on demand
reference/free-text-strategy.md— for unstructured notes / discharge summariesreference/structured-data-strategy.md— for JSON / CSV / Parquet payloadsreference/reversal-protocol.md— when reversal is needed in approved environment
Detection strategy (dual-pass)
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.
- 11d ago First seen · 139 lines · 224 tokens per session scan A a1976cdd5456
phi-desensitize is a skill published in the GitHub repository charliehzm/medharness (86 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 224 tokens to every session and 1,903 once invoked, about $0.0011 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-30.
Other skills, from other repositories
hipaa-review
Performs a HIPAA Security Rule compliance review against all Administrative, Physical, and Technical Safeguards defined in 45 CFR Part 164, Subpart C. Auto-invoked when discussing healthcare data security, ePHI protection, HIPAA audit readiness, or business associate compliance. Evaluates required and addressable…
Healthcare Compliance
HIPAA compliance, healthcare regulations, privacy and security standards for medical organizations and providers.
compliance
Use when scoping which regulatory frameworks bind a business — SOC 2, ISO 27001, HIPAA, PCI DSS, EU AI Act, DORA, NIS2 — building a control register with owners and evidence, or standing up the cadence that keeps it audit-ready. NOT drafting privacy-policy/ROPA/DPA or ToS text (that is gdpr-privacy, terms-conditions)…
performing-soc2-type2-audit-preparation
Automates SOC 2 Type II audit preparation including gap assessment against AICPA Trust Services Criteria (CC1-CC9), evidence collection from cloud providers and identity systems, control testing validation, remediation tracking, and continuous compliance monitoring. Covers all five TSC categories (Security…
akf-trust-metadata-v2
AKF — The AI Native File Format workflow skill. Use this skill when the user needs The AI native file format. EXIF for AI — stamps every file with trust scores, source provenance, and compliance metadata. Embeds into 20+ formats (DOCX, PDF, images, code). EU AI Act, SOX, HIPAA auditing and the operator should preserve…
compliance-audit
Regulatory compliance auditing across GDPR, HIPAA, PCI DSS, SOC 2, and ISO frameworks with automated evidence collection and gap analysis. Use when conducting compliance assessments, preparing for certifications, or implementing regulatory controls.