本文へ移動
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(原文)

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

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

レビュー

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

同じリポジトリのスキル

概要と使いどころ

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-skills132026年10月12日 更新

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-skills132026年10月12日 更新

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-skills132026年10月12日 更新

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-skills132026年10月12日 更新

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-skills132026年10月12日 更新

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-skills132026年10月12日 更新

curiositech のスキルをすべて見る

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