重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
hipaa-compliance by erichowens/some_claude_skills
npx skills add https://github.com/erichowens/some_claude_skills --skill hipaa-compliance此技能帮助您在开发处理受保护健康信息的功能时,保持 HIPAA 合规性。
| 数据类型 | PHI 状态 | 处理方式 |
|---|---|---|
| 签到情绪/渴望 | PHI | 审计所有访问 |
| 日记条目 | PHI | 审计所有访问 |
| 聊天对话 | PHI | 审计所有访问 |
| 用户资料(姓名、邮箱) | PHI | 审计修改操作 |
| 清醒日期 | PHI | 审计访问 |
| 紧急联系人 | PHI | 审计访问 |
| 使用分析(汇总数据) | 非 PHI | 无需审计 |
| 页面浏览(无内容) | 非 PHI | 无需审计 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
始终记录以下操作:
使用 src/lib/hipaa/audit.ts 中的审计日志工具:
import {
logPHIAccess,
logPHIModification,
logSecurityEvent,
logAdminAction
} from '@/lib/hipaa/audit';
// 查看 PHI
await logPHIAccess(
userId,
'checkin', // targetType
checkinId, // targetId
AuditAction.PHI_VIEW
);
// 修改 PHI
await logPHIModification(
userId,
'journal',
journalId,
AuditAction.PHI_UPDATE,
{ field: 'content' } // 切勿包含实际内容!
);
// 安全事件
await logSecurityEvent(
userId,
AuditAction.RATE_LIMIT,
{ path: '/api/chat', attempts: 60 }
);
// 管理员操作
await logAdminAction(
adminId,
AuditAction.ADMIN_USER_VIEW,
'user',
targetUserId
);
审计系统会自动脱敏,但请明确遵循:
// 错误 - 包含 PHI
await logPHIAccess(userId, 'journal', id, action, {
content: journalEntry.content // 绝对禁止这样做
});
// 正确 - 仅包含元数据
await logPHIAccess(userId, 'journal', id, action, {
wordCount: journalEntry.content.length,
hasAttachments: false
});
password、token、secret、keyauthorization、cookie、sessioncredential、content、message、notes来自 src/lib/auth.ts:
import { getSession, requireAuth } from '@/lib/auth';
import { logPHIAccess } from '@/lib/hipaa/audit';
export async function GET(request: Request) {
const session = await getSession();
if (!session) {
return Response.json({ error: 'Unauthorized' }, { status: 401 });
}
// 获取数据
const data = await fetchUserData(session.userId);
// 记录访问日志
await logPHIAccess(
session.userId,
'userdata',
session.userId,
AuditAction.PHI_VIEW
);
return Response.json(data);
}
'use client';
import { useEffect } from 'react';
export function JournalViewer({ entryId }: { entryId: string }) {
useEffect(() => {
// 在挂载时记录查看日志(首选服务器端,但客户端作为备份)
fetch('/api/audit/log', {
method: 'POST',
body: JSON.stringify({
action: 'PHI_VIEW',
targetType: 'journal',
targetId: entryId
})
});
}, [entryId]);
// ... 渲染逻辑
}
在发布任何涉及 PHI 的功能之前:
audit_log 表对于紧急情况,使用应急通道访问:
import { requestBreakGlassAccess } from '@/lib/hipaa/break-glass';
// 这会创建增强的审计追踪
const access = await requestBreakGlassAccess(
adminId,
targetUserId,
'Emergency support required - user reported crisis'
);
应急通道访问:
docs/INCIDENT-RESPONSE-PLAN.mddocs/SECURITY-HARDENING.md每周安装量
57
代码仓库
GitHub 星标数
81
首次出现
2026 年 1 月 24 日
安全审计
已安装于
gemini-cli48
opencode48
codex47
cursor46
claude-code45
github-copilot44
This skill helps you maintain HIPAA compliance when developing features that handle Protected Health Information (PHI).
| Data Type | PHI Status | Handling |
|---|---|---|
| Check-in mood/cravings | PHI | Audit all access |
| Journal entries | PHI | Audit all access |
| Chat conversations | PHI | Audit all access |
| User profile (name, email) | PHI | Audit modifications |
| Sobriety date | PHI | Audit access |
| Emergency contacts | PHI | Audit access |
| Usage analytics (aggregated) | NOT PHI | No audit needed |
| Page views (no content) | NOT PHI | No audit needed |
Always log these operations:
Use the audit logging utilities in src/lib/hipaa/audit.ts:
import {
logPHIAccess,
logPHIModification,
logSecurityEvent,
logAdminAction
} from '@/lib/hipaa/audit';
// Viewing PHI
await logPHIAccess(
userId,
'checkin', // targetType
checkinId, // targetId
AuditAction.PHI_VIEW
);
// Modifying PHI
await logPHIModification(
userId,
'journal',
journalId,
AuditAction.PHI_UPDATE,
{ field: 'content' } // Never include actual content!
);
// Security event
await logSecurityEvent(
userId,
AuditAction.RATE_LIMIT,
{ path: '/api/chat', attempts: 60 }
);
// Admin action
await logAdminAction(
adminId,
AuditAction.ADMIN_USER_VIEW,
'user',
targetUserId
);
The audit system automatically sanitizes, but be explicit:
// BAD - Contains PHI
await logPHIAccess(userId, 'journal', id, action, {
content: journalEntry.content // NEVER DO THIS
});
// GOOD - Only metadata
await logPHIAccess(userId, 'journal', id, action, {
wordCount: journalEntry.content.length,
hasAttachments: false
});
password, token, secret, keyauthorization, cookie, sessioncredential, content, message, notesFrom src/lib/auth.ts:
import { getSession, requireAuth } from '@/lib/auth';
import { logPHIAccess } from '@/lib/hipaa/audit';
export async function GET(request: Request) {
const session = await getSession();
if (!session) {
return Response.json({ error: 'Unauthorized' }, { status: 401 });
}
// Fetch the data
const data = await fetchUserData(session.userId);
// Log the access
await logPHIAccess(
session.userId,
'userdata',
session.userId,
AuditAction.PHI_VIEW
);
return Response.json(data);
}
'use client';
import { useEffect } from 'react';
export function JournalViewer({ entryId }: { entryId: string }) {
useEffect(() => {
// Log view on mount (server-side preferred, but client backup)
fetch('/api/audit/log', {
method: 'POST',
body: JSON.stringify({
action: 'PHI_VIEW',
targetType: 'journal',
targetId: entryId
})
});
}, [entryId]);
// ... render
}
Before shipping any feature that touches PHI:
audit_log table in databaseFor emergency situations, use break-glass access:
import { requestBreakGlassAccess } from '@/lib/hipaa/break-glass';
// This creates enhanced audit trail
const access = await requestBreakGlassAccess(
adminId,
targetUserId,
'Emergency support required - user reported crisis'
);
Break glass access:
docs/INCIDENT-RESPONSE-PLAN.mddocs/SECURITY-HARDENING.mdWeekly Installs
57
Repository
GitHub Stars
81
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
gemini-cli48
opencode48
codex47
cursor46
claude-code45
github-copilot44
Lark Mail CLI 使用指南:邮件管理、安全规则与自动化工作流
47,900 周安装
架构决策记录(ADR)完整指南:模板、生命周期与最佳实践
368 周安装
sadd:do-competitively - 多代理竞争性AI生成与评估框架,实现宪法式AI自我批判循环
366 周安装
DOCX文件处理指南:创建、编辑、分析Word文档的完整技术方案
364 周安装
Agent Tool Builder:大语言模型工具设计专家,优化AI代理工具模式与错误处理
366 周安装
macOS应用公证完整指南:使用asc-notarization进行开发者ID签名与公证
372 周安装
json-render MCP 集成:在 Claude、ChatGPT 等 AI 客户端中嵌入交互式 UI 应用
377 周安装