跳到正文
cccskills
免费在 GitHub 公开

hipaa-compliance

Ensure HIPAA compliance when handling PHI (Protected Health Information). Use when writing code that accesses user health data, check-ins, journal entries, or any sensitive information. Activates for audit logging, data access, security events, and compliance questions.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md6.5 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

HIPAA Compliance for Recovery Coach

This skill helps you maintain HIPAA compliance when developing features that handle Protected Health Information (PHI).

DECISION POINTS

PHI Classification Decision Tree

Is this user data?
├─ NO → No HIPAA requirements, proceed normally
└─ YES → Is it health-related or personally identifiable?
   ├─ NO (aggregated analytics, page views) → No audit logging needed
   └─ YES → PHI detected, proceed to access type:
      ├─ READ access → Use logPHIAccess() + authentication check
      ├─ WRITE/UPDATE → Use logPHIModification() + change tracking
      ├─ DELETE → Use logPHIModification() + soft delete preferred
      └─ EXPORT → Use logAdminAction() + encryption required

Ambiguous Data Classification

Data TypePHI StatusDecision Rule
Check-in mood/cravingsPHIAlways audit - health condition
Journal entriesPHIAlways audit - personal health notes
Chat messagesPHIAlways audit - health discussions
User profile (name/email)PHIAudit modifications only
Sobriety datePHIAlways audit - health milestone
Usage patterns (timing)DependsIf linkable to individual → PHI
Error logs with userIdsPHIIf contains health context → PHI

Logging Performance Decision Tree

Is this a high-frequency operation (>100/min)?
├─ NO → Use synchronous audit logging
└─ YES → Performance consideration needed:
   ├─ Critical PHI access → Async logging with failure retry
   ├─ Bulk operations → Batch logging every 100 records
   └─ Analytics tracking → Sample logging (1 in 10)

FAILURE MODES

Anti-Pattern: Audit Log Gaps

Symptoms: Missing entries in audit trail, incomplete access records Detection: if (auditLog.count < actualOperations.count) Fix: Add try-catch around all PHI operations, implement audit middleware

Anti-Pattern: PHI Content Leakage

Symptoms: Actual health data appears in logs or error messages Detection: if (logEntry.includes(personalHealthInfo)) Fix: Use sanitization middleware, audit log reviews, content redaction

Anti-Pattern: Session Hijacking Vulnerability

Symptoms: Users accessing data without recent authentication Detection: if (timeSinceLastAuth > 15_MINUTES && accessingPHI) Fix: Force re-authentication for PHI access, implement session timeouts

Anti-Pattern: Break Glass Abuse

Symptoms: Emergency access used for non-emergencies Detection: if (breakGlassUsage.frequency > normalPatterns) Fix: Require written justification, automated compliance officer alerts

Anti-Pattern: Encryption At Rest Failures

Symptoms: PHI stored in plaintext, backup files unencrypted Detection: if (database.encryption === false && containsPHI) Fix: Enable database encryption, encrypt export files, audit storage

WORKED EXAMPLES

Scenario: Building Chat History Viewer with Performance Trade-offs

Context: User wants to view 6 months of chat history (1000+ messages).

Step 1 - PHI Classification:

// Decision: Chat messages contain health discussions → PHI
const messageType = 'chat';
const isPHI = true; // Health-related conversations

Step 2 - Performance vs Compliance Trade-off:

// OPTION A: Real-time logging (high latency)
messages.forEach(async (msg) => {
  await logPHIAccess(userId, 'chat', msg.id, AuditAction.PHI_VIEW);
});

// OPTION B: Batch logging (chosen solution)
const batchSize = 100;
const messageChunks = chunk(messages, batchSize);

for (const chunk of messageChunks) {
  await logBatchPHIAccess(
    userId, 
    'chat_bulk', 
    chunk.map(m => m.id),
    AuditAction.PHI_VIEW,
    { messageCount: chunk.length }
  );
}

Expert vs Novice:

  • Novice miss: Would log each message individually, causing 5+ second load times
  • Expert catch: Batch logging maintains compliance while preserving UX, includes metadata count for audit completeness

Step 3 - Implementation:

export async function getChatHistory(userId: string) {
  const session = await requireAuth();
  
  // Performance: Paginated fetch
  const messages = await db.messages.findMany({
    where: { userId },
    orderBy: { createdAt: 'desc' },
    take: 100 // First page only
  });
  
  // Compliance: Batch audit log
  await logBatchPHIAccess(
    session.userId,
    'chat_history',
    messages.map(m => m.id),
    AuditAction.PHI_VIEW,
    { 
      pageSize: messages.length,
      totalRequested: '6_months',
      loadTime: performance.now()
    }
  );
  
  return messages;
}

QUALITY GATES

Before deploying any PHI-related feature:

  • All PHI read operations have corresponding audit log entries
  • All PHI write operations include change metadata (never actual content)
  • Authentication check exists before any PHI access
  • Session timeout enforcement is active (15 min for PHI routes)
  • Error handling never exposes PHI in error messages
  • Database queries use parameterized statements (SQL injection prevention)
  • PHI export features create audit trail entries
  • Failed access attempts trigger security event logs
  • Break glass access requires written justification
  • All audit logs exclude actual PHI content (IDs and metadata only)

NOT-FOR BOUNDARIES

Do NOT use this skill for:

  • Non-health applications → For general privacy compliance, use [gdpr-compliance] skill instead
  • Financial data protection → For PCI DSS compliance, use [financial-security] skill instead
  • Internal analytics → For usage tracking without PHI, use [analytics-privacy] skill instead
  • API rate limiting → For general security, use [api-security] skill instead
  • Database design → For schema design, use [data-modeling] skill instead

When to delegate:

  • If handling payment data: Use [pci-compliance] skill
  • If building authentication: Use [auth-security] skill
  • If designing data retention: Use [data-lifecycle] skill
  • If incident response needed: Use [security-incident] skill

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Expert in 2000s-era music visualization (Milkdrop, AVS, Geiss) and modern WebGL implementations. Specializes in Butterchurn integration, Web Audio API AnalyserNode FFT data, GLSL shaders for audio-reactive visuals, and psychedelic generative art. Activate on "Milkdrop", "music visualization", "WebGL visualizer", "Butterchurn", "audio reactive", "FFT visualization", "spectrum analyzer". NOT for simple bar charts/waveforms (use basic canvas), video editing, or non-audio visuals.

中文简介正在准备中。当前显示原文说明。

curiositech/windags-skills162026年10月19日 更新

Expert legal research agent for finding and scraping expungement data state by state. Knows authoritative sources, URL patterns, Firecrawl configuration, and 2026 legal landscape.

中文简介正在准备中。当前显示原文说明。

curiositech/windags-skills162026年10月19日 更新

Expert in 3D computer vision labeling tools, workflows, and AI-assisted annotation for LiDAR, point clouds, and sensor fusion. Covers SAM4D/Point-SAM, human-in-the-loop architectures, and vertical-specific training strategies. Activate on '3D labeling', 'point cloud annotation', 'LiDAR labeling', 'SAM 3D', 'SAM4D', 'sensor fusion annotation', '3D bounding box', 'semantic segmentation point cloud'. NOT for 2D image labeling (use clip-aware-embeddings), general ML training (use ml-engineer), video annotation without 3D (use computer-vision-pipeline), or VLM prompt engineering (use prompt-engineer).

中文简介正在准备中。当前显示原文说明。

curiositech/windags-skills162026年10月19日 更新

Apply crisis decision-making research to agent routing, uncertainty triage, and coordination failure analysis in time-pressured systems. Use when diagnosing handoff failures, analytical paralysis, or expert judgment under incomplete information. NOT for routine coding, simple CRUD design, or static single-agent tasks with complete information.

中文简介正在准备中。当前显示原文说明。

curiositech/windags-skills162026年10月19日 更新

Use for insight, reframing, contradiction, impasse, and anomaly-driven problem solving when execution effort no longer helps. NOT for routine optimization, error correction, or well-specified tasks with known solution paths.

中文简介正在准备中。当前显示原文说明。

curiositech/windags-skills162026年10月19日 更新

Apply normative BDI reasoning to agents that must detect norms, choose which commitments to internalize, and resolve conflicts by comparing consequences. Use when obligations, prohibitions, or policies collide in autonomous systems. NOT for simple fixed-priority rules, pure constraint satisfaction, or domains where no real normative conflict exists.

中文简介正在准备中。当前显示原文说明。

curiositech/windags-skills162026年10月19日 更新

查看 curiositech 的全部技能

报告此技能的问题