本文へ移動
cccskills
無料GitHub で公開

hipaa-workflow-design

Use this skill when designing HIPAA-compliant workflow requirements for Health Cloud: minimum necessary access design, audit trail requirements mapping, access control patterns, and BAA dependency identification. NOT for org-level HIPAA architecture or Shield encryption configuration — use architect/hipaa-compliance-architecture. NOT for care team and SDOH process design — use admin/care-coordination-requirements.

インストール方法を見る

含まれるファイル(8)

  • SKILL.md14.1 KB
  • references/examples.md6.2 KB
  • references/gotchas.md7.9 KB
  • references/llm-anti-patterns.md8.7 KB
  • references/metadata-examples.md8.4 KB
  • references/well-architected.md4.6 KB
  • scripts/check_hipaa_workflow_design.py5.0 KB
  • templates/hipaa-workflow-design-template.md2.0 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

HIPAA Workflow Design for Health Cloud

Use this skill when designing HIPAA-driven workflow requirements for Health Cloud: minimum necessary access, audit trail requirements, PHI access controls, and the mapping from HIPAA safeguards to Salesforce controls. It covers requirements design and mapping. It does NOT cover the build of security controls (Shield Platform Encryption configuration, Event Monitoring pipelines, field-level security setup), which belong to implementation skills.

Grounding note: retention, field tracking, encryption, and Event Monitoring facts here are grounded in the Salesforce Security Guide, Object Reference, and Metadata API Developer Guide (Summer '26). HIPAA regulation text (45 CFR Part 164) and the Salesforce BAA terms did not fetch for this pass, so regulatory citations and BAA scope statements carry UNVERIFIED markers. Legal counsel owns those interpretations.


Before Starting

  • Confirm the Business Associate Agreement (BAA) status with Salesforce and which services it covers. UNVERIFIED (2026-10-03): BAA coverage is product-specific and must be in place before PHI is stored; this is a contractual matter not described in the technical guides read.
  • Inventory every field that holds PHI and tag it in metadata. CustomField.complianceGroup accepts HIPAA (with CCPA, COPPA, GDPR, PCI, PII), and securityClassification accepts Public, Internal, Confidential, Restricted, and MissionCritical.
  • Check which PHI fields can be history-tracked at all. Field history cannot track formula, roll-up summary, or auto-number fields, Created By and Last Modified By, long text fields, or multi-select fields. Clinical notes in long text fields need another audit approach.
  • Confirm Shield licences (Platform Encryption, Event Monitoring, Field Audit Trail) are in the contract. UNVERIFIED (2026-10-03): that Shield is never included in any edition is a commercial claim not in the guides read.

Questions to Ask Before Configuring

Ask these before designing access or audit controls. Each one traces to a gotcha in references/gotchas.md.

QuestionWhy it mattersWhat a good answer addsWhat proper configuration adds over just doing it
"How long must field change history be kept, and who decides when it may be deleted?"Without Field Audit Trail, history lasts 18 months (24 via API); with it, archived history is kept until deleted (gotcha 1)A retention period, an owner, and a deletion procedureAudit evidence that exists when an investigator asks
"Which PHI fields are long text, multi-select, or formulas?"Those fields cannot be history-tracked (gotcha 2)A list of untrackable PHI fields and the alternative evidence for eachNo false assumption that every PHI change is audited
"How long must access logs be kept, and where?"Event Log Files are kept one year by default for Shield and Event Monitoring customers; streaming events three days; Event Log Objects 30 days (gotcha 3)A log retention target and an external storeAccess history that survives past the platform window
"Will Platform Encryption be turned on after history is already archived?"Previously archived field history stays unencrypted (gotcha 4)An encryption timeline aligned with archivingNo unencrypted PHI left in the archive
"Which roles need which PHI fields?"Minimum necessary access is field-level as well as record-level (gotcha 6)An access matrix per role and fieldPermission sets that grant only what each role needs
"Are PHI fields tagged so they can be found later?"complianceGroup and securityClassification live on the field definition (gotcha 7)A tagging rule applied in every field deployA PHI inventory that maintains itself

What a proper HIPAA design adds over "just turning on Shield": every PHI field is tagged, its history is kept as long as policy requires, access logs leave the platform before they expire, and each role sees only the fields it needs.


Core Concepts

Shared responsibility

Salesforce runs the infrastructure; the customer configures who can access PHI, encryption, audit retention, consent workflows, and policies. UNVERIFIED (2026-10-03): the BAA documents this split; its text was not read for this pass.

HIPAA safeguard to Salesforce control mapping

HIPAA safeguard (as cited by earlier versions of this skill)Salesforce controlGrounded platform fact
Access controlPrivate org-wide defaults, sharing, permission sets with field-level securityPermission sets carry fieldPermissions and objectPermissions
Audit controlsField history tracking with Field Audit Trail; Event MonitoringRetention figures in gotchas 1 and 3
Integrity and encryption at restShield Platform Encryption (encryptionScheme on fields)ProbabilisticEncryption, CaseSensitiveDeterministicEncryption, CaseInsensitiveDeterministicEncryption
Minimum necessaryRole-scoped records plus field-level permission setsSame as access control

UNVERIFIED (2026-10-03): the section numbers earlier versions of this skill attached to these safeguards (§164.312(a)(1), §164.312(b), §164.312(c)(1), §164.312(e)(1), §164.514(d)) and the "6-year" retention figure come from HIPAA regulation text that did not fetch. The 6-year figure is commonly attributed to the documentation retention rule in 45 CFR 164.316(b)(2); confirm with counsel whether it applies to raw audit logs.

Field history retention

SetupRetentionFields per object
Field history tracking without Field Audit TrailUp to 18 months, and up to 24 months through the APIUp to 20
Field Audit Trail onArchived history kept until you delete it; by default history moves to the FieldHistoryArchive big object after 18 months in production and 1 month in sandboxesUp to 200

A HistoryRetentionPolicy sets archiveAfterMonths (1 to 18, default 18) and archiveRetentionYears (a reminder for manual deletion; data is not deleted automatically). Earlier versions of this skill said Field Audit Trail keeps history "up to 10 years"; the Summer '26 Security Guide says archived data is kept until you delete it.

Event Monitoring retention

SourceRetention
Event Log Files"All Shield and Event Monitoring customers have 1 year of Event Log File storage enabled by default"
Real-time event streams"Streaming events are retained for up to three days"
Event Log Objects (Hyperforce)"Log data is retained for up to 30 days"
LoginHistory and LoginEvent6 months

Earlier versions of this skill said Event Monitoring logs expire after 30 days by default; that is true of Event Log Objects and of the Login event log lines in one comparison table, but not of Event Log File storage for Shield and Event Monitoring customers. Multi-year retention still requires an external store.


Common Patterns

Minimum necessary access design

When to use: Several roles need different slices of PHI.

How it works:

  1. Define roles: clinicians, specialists, care coordinators, front desk, billing, compliance.
  2. Set org-wide defaults to Private for patient accounts and clinical objects.
  3. Grant record access through care team or role-based sharing.
  4. Grant field access with permission sets, one per role, from the access matrix; front desk gets demographics, billing gets billing codes, neither gets clinical notes.
  5. Tag every PHI field with complianceGroup HIPAA and a securityClassification (deployable example in references/metadata-examples.md).

Audit trail architecture

When to use: Specifying audit controls for production.

How it works:

  1. Track history on every trackable PHI field (enableHistory on the object, trackHistory on the field).
  2. With Field Audit Trail, set a HistoryRetentionPolicy per object and a documented deletion procedure for archived data.
  3. List untrackable PHI fields (long text, multi-select, formulas) and define alternative evidence.
  4. Export Event Log Files to an external store before the one-year window ends, and subscribe to real-time events if near-real-time alerting is needed.
  5. Set the external retention period from counsel's interpretation.

Decision Guidance

SituationRecommended ApproachReason
PHI field change history beyond 18 monthsField Audit Trail with a HistoryRetentionPolicyStandard history lasts 18 months (24 via API)
PHI in a long text fieldAlternative evidence (versioned records, an audit object, or Event Monitoring)Long text fields cannot be history-tracked
Access logs beyond one yearExport Event Log Files to an external storeOne year of Event Log File storage by default
Turning on encryption after archivingPlan re-encryption of archived history with SalesforceArchived history stays unencrypted
PHI inventory upkeepcomplianceGroup HIPAA on every PHI fieldThe tag travels with the field definition
BAA not yet signedDo not store PHIContractual prerequisite (UNVERIFIED (2026-10-03): legal)

Recommended Workflow

  1. Verify contractual prerequisites. BAA status and covered services, confirmed by the account team and counsel.
  2. Build the PHI field inventory as metadata. Tag every PHI field with complianceGroup HIPAA and a securityClassification, and flag untrackable types.
  3. Design access. Private org-wide defaults, sharing per care relationship, and a field-level access matrix turned into permission sets.
  4. Design field audit. History on trackable PHI fields, Field Audit Trail policies with archiveAfterMonths, a deletion procedure, and alternatives for untrackable fields.
  5. Design log retention. Event Log File export before the one-year window, real-time streams if needed, and an external retention period from counsel.
  6. Specify encryption order. Enable Platform Encryption before history is archived, or plan re-archiving, and record which fields use which encryptionScheme.

Review Checklist

  • BAA status and covered services confirmed in writing
  • Every PHI field tagged complianceGroup HIPAA with a securityClassification
  • Untrackable PHI fields listed with alternative evidence
  • Private org-wide defaults on PHI objects; sharing designed per care relationship
  • Field access matrix implemented as role permission sets
  • History tracking and Field Audit Trail policies defined, with a deletion procedure
  • Event Log Files exported before the one-year window
  • Encryption timeline aligned with history archiving

Salesforce-Specific Gotchas

The deep versions, with sources, live in references/gotchas.md.

#GotchaOne-line consequence
1History lasts 18 months without Field Audit TrailOlder PHI change evidence is gone
2Long text, multi-select, and formula fields cannot be trackedClinical notes changes leave no history
3Log retention differs by source: 1 year, 30 days, 3 daysAccess evidence expires on different clocks
4Archived history is not encrypted retroactivelyUnencrypted PHI stays in the archive
5Deleting a record does not delete its archived historyArchive needs its own deletion procedure
6Field limits: 20 tracked fields, or 200 with Field Audit TrailLarge PHI objects exceed standard tracking
7PHI tags live on the field definitionUntagged fields fall out of the inventory
8Retention policy metadata has documentation conflictsHand-written policies may not deploy

Output Artifacts

ArtifactDescription
PHI field inventoryField metadata tagged with complianceGroup and securityClassification
HIPAA controls specificationSafeguard-to-control mapping with grounded platform facts
Access control matrixRole-by-field access implemented as permission sets
Audit and log retention requirementsHistory policies, deletion procedure, Event Log File export, external retention

Related Skills

  • admin/health-cloud-patient-setup: PHI field configuration on patient records
  • admin/health-cloud-consent-management: consent records and their history
  • architect/hipaa-compliance-architecture: org-level HIPAA architecture and Shield configuration

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Use this skill when writing test-first, behavior-driven acceptance criteria in Given/When/Then format for a Salesforce user story. Covers happy path, edge cases, negative paths, permission boundaries, and data-state preconditions so the AC block can drive UAT scripts and Apex test design downstream. Trigger keywords: given when then, gherkin, behavior driven AC, test first acceptance criteria, scenario outline, BDD acceptance criteria. NOT for the user-story format itself (use admin/user-story-writing-for-salesforce). NOT for UAT script writing (use admin/uat-test-case-design). NOT for Apex test method generation (use agents/test-class-generator). NOT for high-level UAT planning (use admin/uat-and-acceptance-criteria). More triggers: acceptance criteria record, ac_id, req_id on a criterion, artefact under test, negative case for a rule-type requirement, no-match fall-through criterion, oracle for a Then clause, test type apex flow manual, criteria linter, check_ac_format.py, --manifest-dir.

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

Task and Event objects: polymorphic WhatId/WhoId, Activity object model, ActivityHistory vs OpenActivity, activity timeline customization, bulk task creation, Einstein Activity Capture boundaries. NOT for turning on EAC or calendar sync — use admin/einstein-activity-capture-setup. NOT for Email-to-Case — use admin/case-management-setup. Covers ActivitiesSettings metadata, enableActivities, shared Task/Event custom fields and FLS, TaskStatus value sets, Shared Activities and TaskRelation/EventRelation, recurring and child activities, and partial-success bulk DML on Task.

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

Design Invocable Apex actions that return deterministic, agent-friendly errors instead of surfacing raw exceptions to the LLM. NOT for authoring the action itself — @InvocableMethod schema, labels, security context — use agentforce/custom-agent-actions-apex. NOT for the Apex tests that force each error branch — use agentforce/agent-action-unit-tests.

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

Use when designing how an Agentforce agent extracts structured input parameters (slots) from a user's natural-language utterance to invoke an action. Triggers: 'agent extract date from user', 'agent action argument extraction', 'agentforce slot filling', 'agent invocable input mapping', 'agent fails to fill required parameter'. NOT for action authoring (use agentforce/agent-actions) or for prompt-template variable binding (use agentforce/prompt-builder-templates).

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

Apex test patterns for @InvocableMethod agent actions: per-reason-code branch coverage, bulk safety, callout mocking, deterministic assertions. NOT for testing whether the agent routes to the right topic or answers well — use agentforce/agent-testing-and-evaluation. NOT for designing the error envelope the tests assert on — use agentforce/agent-action-error-handling.

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

Designing or reviewing Agentforce actions: Flow actions, Apex invocable actions, prompt-template actions, action naming, input and output contracts, confirmation requirements, and safe error behavior. Triggers: 'agent actions', 'build an agent that can look up an order', 'make the agent able to check order status', 'give the agent a capability', 'agent that can retrieve a record', 'flow action for agent', 'agent invocable action', 'action schema design'. NOT for writing the Apex class itself — use agentforce/custom-agent-actions-apex. NOT for the reason_code error envelope that stops an agent retry loop — use agentforce/agent-action-error-handling.

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

PranavNagrecha のスキルをすべて見る

このスキルの問題を報告する