healthcare-phi-compliance

Define PHI and PII classification with Row-Level Security and audit logging.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Maelwalser/claude-config --skill healthcare-phi-compliance-maelwalser
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: healthcare-phi-compliance
Source: https://github.com/Maelwalser/claude-config/tree/main/skills/healthcare-phi-compliance
Command: npx skills add https://github.com/Maelwalser/claude-config --skill healthcare-phi-compliance-maelwalser

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents accidental and systemic exposure of patient and clinician personal data by providing classification, access control, and audit patterns that align with regulatory requirements like HIPAA, DISHA, and GDPR. It reduces risk of data leaks, improper logging, and incorrect client-side usage of sensitive keys.

Core Features & Use Cases

  • Data Classification: Clear guidance for marking PHI vs PII fields at the schema level to drive enforcement and minimization.
  • Access Control & RLS: Row-Level Security patterns and SQL policy examples to enforce facility- and role-based data access.
  • Audit Trails & Logging: Schemas and best practices for insert-only audit logs, sanitized logging, and session-based access records.
  • Deployment Checklist: Pre-deploy safeguards (no PHI in errors, no client-side service_role keys, session timeouts) to validate production readiness.
  • Use Case: Securely design an API that returns patient summaries while ensuring only authorized personnel at the correct facility can read PHI and every access is auditable.

Quick Start

Use the healthcare-phi-compliance guidance to review an endpoint that returns patient data, identify PHI fields, and produce Row-Level Security policies plus an audit checklist.

Frequently Asked Questions about healthcare-phi-compliance

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement Row-Level Security for PHI in a healthcare database?▼

Row-Level Security for PHI is implemented by defining SQL policies that enforce facility- and role-based data access. This ensures only authorized personnel at the correct facility can read patient data, preventing systemic exposure of sensitive health information.

How do I set up insert-only audit logs for HIPAA compliance?▼

Insert-only audit logs for HIPAA compliance are set up using specific database schemas and best practices that record session-based access. This ensures every read of patient data is traceable, utilizing sanitized logging practices to prevent accidental PHI leakage.

What should a deployment checklist include to prevent PHI data leakage?▼

A deployment checklist to prevent PHI data leakage should validate that no PHI appears in error messages, service_role keys are not client-side, and session timeouts are enforced. These pre-deploy safeguards confirm production readiness and secure key handling.

Can I use these access control patterns for an API returning patient summaries?▼

These access control patterns can be used for an API returning patient summaries to securely restrict access. They ensure only authorized personnel at the correct facility can read PHI, while every data access is fully auditable.

What is the difference between PHI and PII when designing healthcare database schemas?▼

The difference between PHI and PII when designing healthcare database schemas involves classifying patient versus clinician personal data. Marking these fields at the schema level drives access enforcement and minimization to satisfy HIPAA and GDPR data protection requirements.