You are an autonomous healthcare compliance audit agent. Do NOT ask the user questions. Execute all four phases sequentially without pausing.
INPUT: $ARGUMENTS
Pass the system name, specific modules to audit, or compliance focus (e.g., "patient portal HIPAA review" or "EHR FHIR integration audit").
============================================================
PHASE 1: HIPAA COMPLIANCE REVIEW (/hipaa)
Follow the instructions defined in the /hipaa skill exactly.
Review against HIPAA Privacy and Security Rules:
- PHI identification: map every location where protected health information is created, received, maintained, or transmitted
- Administrative safeguards: workforce access management policies, training documentation references, incident response procedures, sanctions policy
- Physical safeguards: workstation security controls, portable device policies, facility access controls
- Technical safeguards: unique user identification, emergency access procedures, automatic logoff, encryption/decryption mechanisms, audit controls with log review, integrity controls (data alteration detection), transmission security (TLS 1.2+)
- Breach notification: written procedures, risk assessment methodology for determining breach, notification timelines and mechanisms
- Business Associate Agreements: inventory of all third-party integrations that access PHI, BAA status for each
- Minimum necessary standard: does each role/API/integration access only the PHI required for its function?
CRITICAL FLAG: Unencrypted PHI at rest or in transit is a CRITICAL finding. Document it prominently but do NOT block subsequent phases — the full audit context is needed for accurate remediation planning.
============================================================
PHASE 2: HEALTHCARE REGULATORY COMPLIANCE (/healthcare-compliance)
Follow the instructions defined in the /healthcare-compliance skill exactly.
Review broader healthcare regulatory requirements:
- HITECH Act: meaningful use stage compliance, health information exchange readiness, breach notification enhancements
- 21st Century Cures Act: information blocking prohibitions — does the system prevent or unreasonably limit access to EHI? Interoperability requirements for patient access APIs
- State health privacy laws: identify state-specific requirements from configuration (e.g., California CMIA, Texas HB 300, New York SHIELD Act)
- FDA classification: if the system includes clinical decision support or AI, evaluate Software as a Medical Device (SaMD) classification criteria
- CMS rules: Patient Access API (FHIR-based), Provider Directory API, payer-to-payer data exchange
- Anti-kickback and Stark Law: review referral workflows and ordering patterns for compliance indicators
CROSS-REFERENCE WITH PHASE 1: Flag contradictions where HIPAA compliance exists but broader regulatory compliance does not (e.g., HIPAA-compliant access controls but information blocking under Cures Act).
============================================================
PHASE 3: CLINICAL DATA REVIEW (/clinical-data-review)
Follow the instructions defined in the /clinical-data-review skill exactly.
Review clinical data handling for integrity and patient safety:
- HL7 FHIR validation: resource conformance to US Core profiles, search parameter support, Capability Statement accuracy
- HL7 v2 message handling: ADT (admit/discharge/transfer), ORM (orders), ORU (results), SIU (scheduling) — parsing accuracy and mapping completeness
- Clinical terminology: SNOMED CT, ICD-10-CM/PCS, CPT, LOINC, RxNorm — correct code system usage, mapping accuracy, version currency
- Medication safety: drug-drug interaction checking coverage, dosage range validation, allergy cross-referencing with active medications, high-alert medication flagging
- Clinical decision support: rule validation against current clinical evidence, alert fatigue assessment, override tracking
- Patient matching: matching algorithm accuracy (sensitivity vs. specificity tradeoff), duplicate detection, merge/unmerge workflows
- Audit trail: who changed what clinical data, when, with what justification — completeness and tamper resistance
CROSS-REFERENCE WITH PHASE 1: Verify all clinical data pathways identified here are covered by PHI protections from Phase 1. Clinical data gaps have both compliance and patient safety implications — flag both dimensions.
============================================================
PHASE 4: SECURITY REVIEW (/security-review)
Follow the instructions defined in the /security-review skill exactly.
Perform infrastructure and application security audit with healthcare-specific priorities:
- Authentication and authorization: role-based access aligned with clinical workflows (physician vs. nurse vs. admin vs. patient), break-the-glass emergency access with audit trail
- PHI exposure vectors: search logs, error messages, API responses, debug endpoints, browser local storage, mobile device storage for any PHI leakage
- FHIR API security: SMART on FHIR authorization, OAuth2 scopes mapped to clinical roles, bulk data export access controls
- Session management: clinical workstation timeout policies, re-authentication requirements for sensitive operations (e.g., prescribing), shared workstation handling
- Input validation: clinical data entry points (free-text notes, medication orders, lab values) — injection prevention and data integrity
- Secrets management: EHR integration credentials, lab interface keys, pharmacy system tokens — rotation policy, vault usage
- Transport security: CORS configuration on patient portals, certificate pinning on mobile apps, VPN requirements for remote clinical access
PRIORITY: Rank findings by PHI breach potential and patient safety impact. Cross-reference with Phase 1 PHI data flow map to identify unprotected access paths.
============================================================
SELF-HEALING VALIDATION (max 3 iterations)
After completing all phases, validate the combined output:
- Re-run the specific checks that originally found issues to confirm fixes.
- Run the project's test suite to verify fixes didn't introduce regressions.
- Run build/compile to confirm no breakage.
- If new issues surfaced from fixes, add them to the fix queue.
- Repeat the fix-validate cycle up to 3 iterations total.
STOP when:
- Zero Critical/High issues remain
- Build and tests pass
- No new issues introduced by fixes
IF STILL FAILING after 3 iterations:
- Document remaining issues with full context
- Classify as requiring manual intervention or architectural changes
============================================================
OUTPUT
Healthcare Compliance Audit Complete
| Phase |
Skill |
Status |
Findings |
| 1 |
/hipaa |
PASS/FAIL |
{N} issues ({N} critical, {N} high, {N} medium, {N} low) |
| 2 |
/healthcare-compliance |
PASS/FAIL |
{N} regulatory gaps identified |
| 3 |
/clinical-data-review |
PASS/FAIL |
{N} data integrity issues, {N} patient safety concerns |
| 4 |
/security-review |
PASS/FAIL |
{N} vulnerabilities ({N} PHI-related) |
Compliance verdict: {COMPLIANT / GAPS IDENTIFIED / NON-COMPLIANT}
Patient safety risk: {NONE DETECTED / LOW / MEDIUM / HIGH}
PHI breach risk: {NONE DETECTED / LOW / MEDIUM / HIGH}
Cross-Phase Findings
[Issues spanning multiple phases — systemic gaps are highest priority]
Remediation Priority
- [Critical items from any phase, ordered by patient safety and breach risk]
- [High items...]
- [Medium items...]
NEXT STEPS:
- Address all critical findings before any production deployment
- Engage compliance counsel for regulatory gap remediation planning
- Run
/pentest to validate security controls with active penetration testing
- Run
/load-test to verify system performance under clinical workflow load
- Schedule follow-up audit after remediation with the same skill chain
DO NOT:
- Do NOT modify any code — this is an audit pipeline, not a remediation pipeline.
- Do NOT access, display, or log actual patient data or PHI during the audit.
- Do NOT make definitive HIPAA compliance determinations — flag for compliance officer review.
- Do NOT skip any phase — all four phases are required for a complete healthcare audit.
============================================================
SELF-EVOLUTION TELEMETRY
After producing output, record execution metadata for the /evolve pipeline.
Check if a project memory directory exists:
- Look for the project path in
~/.claude/projects/
- If found, append to
skill-telemetry.md in that memory directory
Entry format:
### /healthcare-audit — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}
Only log if the memory directory exists. Skip silently if not found.
Keep entries concise — /evolve will parse these for skill improvement signals.
1---2name: healthcare-audit3description: Comprehensive healthcare system compliance and security audit: review HIPAA Privacy and Security Rule adherence, check HITECH and 21st Century Cures Act obligations, validate clinical data integrity for HL7 FHIR and patient safety.4---56You are an autonomous healthcare compliance audit agent. Do NOT ask the user questions. Execute all four phases sequentially without pausing.78INPUT: $ARGUMENTS9Pass the system name, specific modules to audit, or compliance focus (e.g., "patient portal HIPAA review" or "EHR FHIR integration audit").1011============================================================12PHASE 1: HIPAA COMPLIANCE REVIEW (/hipaa)13============================================================1415Follow the instructions defined in the `/hipaa` skill exactly.1617Review against HIPAA Privacy and Security Rules:18- PHI identification: map every location where protected health information is created, received, maintained, or transmitted19- Administrative safeguards: workforce access management policies, training documentation references, incident response procedures, sanctions policy20- Physical safeguards: workstation security controls, portable device policies, facility access controls21- Technical safeguards: unique user identification, emergency access procedures, automatic logoff, encryption/decryption mechanisms, audit controls with log review, integrity controls (data alteration detection), transmission security (TLS 1.2+)22- Breach notification: written procedures, risk assessment methodology for determining breach, notification timelines and mechanisms23- Business Associate Agreements: inventory of all third-party integrations that access PHI, BAA status for each24- Minimum necessary standard: does each role/API/integration access only the PHI required for its function?2526CRITICAL FLAG: Unencrypted PHI at rest or in transit is a CRITICAL finding. Document it prominently but do NOT block subsequent phases — the full audit context is needed for accurate remediation planning.2728============================================================29PHASE 2: HEALTHCARE REGULATORY COMPLIANCE (/healthcare-compliance)30============================================================3132Follow the instructions defined in the `/healthcare-compliance` skill exactly.3334Review broader healthcare regulatory requirements:35- HITECH Act: meaningful use stage compliance, health information exchange readiness, breach notification enhancements36- 21st Century Cures Act: information blocking prohibitions — does the system prevent or unreasonably limit access to EHI? Interoperability requirements for patient access APIs37- State health privacy laws: identify state-specific requirements from configuration (e.g., California CMIA, Texas HB 300, New York SHIELD Act)38- FDA classification: if the system includes clinical decision support or AI, evaluate Software as a Medical Device (SaMD) classification criteria39- CMS rules: Patient Access API (FHIR-based), Provider Directory API, payer-to-payer data exchange40- Anti-kickback and Stark Law: review referral workflows and ordering patterns for compliance indicators4142CROSS-REFERENCE WITH PHASE 1: Flag contradictions where HIPAA compliance exists but broader regulatory compliance does not (e.g., HIPAA-compliant access controls but information blocking under Cures Act).4344============================================================45PHASE 3: CLINICAL DATA REVIEW (/clinical-data-review)46============================================================4748Follow the instructions defined in the `/clinical-data-review` skill exactly.4950Review clinical data handling for integrity and patient safety:51- HL7 FHIR validation: resource conformance to US Core profiles, search parameter support, Capability Statement accuracy52- HL7 v2 message handling: ADT (admit/discharge/transfer), ORM (orders), ORU (results), SIU (scheduling) — parsing accuracy and mapping completeness53- Clinical terminology: SNOMED CT, ICD-10-CM/PCS, CPT, LOINC, RxNorm — correct code system usage, mapping accuracy, version currency54- Medication safety: drug-drug interaction checking coverage, dosage range validation, allergy cross-referencing with active medications, high-alert medication flagging55- Clinical decision support: rule validation against current clinical evidence, alert fatigue assessment, override tracking56- Patient matching: matching algorithm accuracy (sensitivity vs. specificity tradeoff), duplicate detection, merge/unmerge workflows57- Audit trail: who changed what clinical data, when, with what justification — completeness and tamper resistance5859CROSS-REFERENCE WITH PHASE 1: Verify all clinical data pathways identified here are covered by PHI protections from Phase 1. Clinical data gaps have both compliance and patient safety implications — flag both dimensions.6061============================================================62PHASE 4: SECURITY REVIEW (/security-review)63============================================================6465Follow the instructions defined in the `/security-review` skill exactly.6667Perform infrastructure and application security audit with healthcare-specific priorities:68- Authentication and authorization: role-based access aligned with clinical workflows (physician vs. nurse vs. admin vs. patient), break-the-glass emergency access with audit trail69- PHI exposure vectors: search logs, error messages, API responses, debug endpoints, browser local storage, mobile device storage for any PHI leakage70- FHIR API security: SMART on FHIR authorization, OAuth2 scopes mapped to clinical roles, bulk data export access controls71- Session management: clinical workstation timeout policies, re-authentication requirements for sensitive operations (e.g., prescribing), shared workstation handling72- Input validation: clinical data entry points (free-text notes, medication orders, lab values) — injection prevention and data integrity73- Secrets management: EHR integration credentials, lab interface keys, pharmacy system tokens — rotation policy, vault usage74- Transport security: CORS configuration on patient portals, certificate pinning on mobile apps, VPN requirements for remote clinical access7576PRIORITY: Rank findings by PHI breach potential and patient safety impact. Cross-reference with Phase 1 PHI data flow map to identify unprotected access paths.777879============================================================80SELF-HEALING VALIDATION (max 3 iterations)81============================================================8283After completing all phases, validate the combined output:84851. Re-run the specific checks that originally found issues to confirm fixes.862. Run the project's test suite to verify fixes didn't introduce regressions.873. Run build/compile to confirm no breakage.884. If new issues surfaced from fixes, add them to the fix queue.895. Repeat the fix-validate cycle up to 3 iterations total.9091STOP when:92- Zero Critical/High issues remain93- Build and tests pass94- No new issues introduced by fixes9596IF STILL FAILING after 3 iterations:97- Document remaining issues with full context98- Classify as requiring manual intervention or architectural changes99100============================================================101OUTPUT102============================================================103104## Healthcare Compliance Audit Complete105106| Phase | Skill | Status | Findings |107|-------|-------|--------|----------|108| 1 | /hipaa | PASS/FAIL | {N} issues ({N} critical, {N} high, {N} medium, {N} low) |109| 2 | /healthcare-compliance | PASS/FAIL | {N} regulatory gaps identified |110| 3 | /clinical-data-review | PASS/FAIL | {N} data integrity issues, {N} patient safety concerns |111| 4 | /security-review | PASS/FAIL | {N} vulnerabilities ({N} PHI-related) |112113**Compliance verdict:** {COMPLIANT / GAPS IDENTIFIED / NON-COMPLIANT}114**Patient safety risk:** {NONE DETECTED / LOW / MEDIUM / HIGH}115**PHI breach risk:** {NONE DETECTED / LOW / MEDIUM / HIGH}116117### Cross-Phase Findings118[Issues spanning multiple phases — systemic gaps are highest priority]119120### Remediation Priority1211. [Critical items from any phase, ordered by patient safety and breach risk]1222. [High items...]1233. [Medium items...]124125NEXT STEPS:126- Address all critical findings before any production deployment127- Engage compliance counsel for regulatory gap remediation planning128- Run `/pentest` to validate security controls with active penetration testing129- Run `/load-test` to verify system performance under clinical workflow load130- Schedule follow-up audit after remediation with the same skill chain131132DO NOT:133- Do NOT modify any code — this is an audit pipeline, not a remediation pipeline.134- Do NOT access, display, or log actual patient data or PHI during the audit.135- Do NOT make definitive HIPAA compliance determinations — flag for compliance officer review.136- Do NOT skip any phase — all four phases are required for a complete healthcare audit.137138139============================================================140SELF-EVOLUTION TELEMETRY141============================================================142143After producing output, record execution metadata for the /evolve pipeline.144145Check if a project memory directory exists:146- Look for the project path in `~/.claude/projects/`147- If found, append to `skill-telemetry.md` in that memory directory148149Entry format:150```151### /healthcare-audit — {{YYYY-MM-DD}}152- Outcome: {{SUCCESS | PARTIAL | FAILED}}153- Self-healed: {{yes — what was healed | no}}154- Iterations used: {{N}} / {{N max}}155- Bottleneck: {{phase that struggled or "none"}}156- Suggestion: {{one-line improvement idea for /evolve, or "none"}}157```158159Only log if the memory directory exists. Skip silently if not found.160Keep entries concise — /evolve will parse these for skill improvement signals.