forensic-data-engineer
БесплатноБез исполняемых скриптовНе проверенExpert in data forensics, anomaly detection, audit trail analysis, fraud detection, and breach investigation
Об этом скилле
Forensic Data Engineer Skill
I help you investigate data anomalies, detect fraud, analyze audit trails, and ensure data integrity and compliance.
What I Do
Forensic Analysis:
- Anomaly detection and pattern recognition
- Fraud detection and prevention
- Breach investigation and root cause analysis
- Data integrity verification
Audit & Compliance:
- Audit trail analysis and reconstruction
- Chain of custody maintenance
- Regulatory compliance (GDPR, SOC2, HIPAA)
- Access control auditing
Data Recovery:
- Forensic recovery of deleted data
- Historical data reconstruction
- Change detection and unauthorized modifications
- Data lineage and provenance tracking
Forensic Patterns
Pattern 1: Audit Trail Implementation
Use case: Track all data changes for compliance and investigation
// lib/forensics/audit-trail.ts
interface AuditEntry {
id: string
timestamp: Date
userId: string
action: 'CREATE' | 'UPDATE' | 'DELETE' | 'READ'
tableName: string
recordId: string
oldValue?: any
newValue?: any
ipAddress: string
userAgent: string
sessionId: string
}
export async function createAuditLog(entry: Omit<AuditEntry, 'id' | 'timestamp'>) {
return await db.auditLog.create({
data: {
...entry,
timestamp: new Date()
}
})
}
// Middleware for automatic audit logging
export function withAudit<T extends (...args: any[]) => Promise<any>>(
operation: T,
metadata: { tableName: string; action: AuditEntry['action'] }
): T {
return (async (...args: any[]) => {
const startTime = Date.now()
const { tableName, action } = metadata
try {
// Capture before state for UPDATE/DELETE
let oldValue
if (action === 'UPDATE' || action === 'DELETE') {
oldValue = await captureCurrentState(tableName, args[0])
}
// Execute operation
const result = await operation(...args)
// Capture after state
const newValue = action !== 'DELETE' ? result : null
// Log audit entry
await createAuditLog({
userId: getCurrentUser().id,
action,
tableName,
recordId: args[0],
oldValue,
newValue,
ipAddress: getClientIp(),
userAgent: getClientUserAgent(),
sessionId: getSessionId()
})
return result
} catch (error) {
// Log failed attempt
await createAuditLog({
userId: getCurrentUser().id,
action,
tableName,
recordId: args[0],
ipAddress: getClientIp(),
userAgent: getClientUserAgent(),
sessionId: getSessionId()
})
throw error
}
}) as T
}
// Usage
const updateUser = withAudit(
async (userId: string, data: any) => {
return await db.user.update({
where: { id: userId },
data
})
},
{ tableName: 'users', action: 'UPDATE' }
)
Pattern 2: Anomaly Detection
Use case: Identify suspicious patterns in transaction data
// lib/forensics/anomaly-detection.ts
interface Transaction {
id: string
userId: string
amount: number
timestamp: Date
location: string
deviceId: string
}
export async function detectTransactionAnomalies(transaction: Transaction) {
const anomalies: string[] = []
// Check 1: Unusual amount (statistical outlier)
const userStats = await getUserTransactionStats(transaction.userId)
const zScore = (transaction.amount - userStats.mean) / userStats.stdDev
if (Math.abs(zScore) > 3) {
anomalies.push(`Unusual amount: ${transaction.amount} (z-score: ${zScore.toFixed(2)})`)
}
// Check 2: Rapid succession (velocity check)
const recentTransactions = await db.transactions.findMany({
where: {
userId: transaction.userId,
timestamp: {
gte: new Date(Date.now() - 5 * 60 * 1000) // Last 5 minutes
}
}
})
if (recentTransactions.length > 5) {
anomalies.push(`High velocity: ${recentTransactions.length} transactions in 5 minutes`)
}
// Check 3: Impossible travel (location mismatch)
const lastTransaction = await db.transactions.findFirst({
where: { userId: transaction.userId },
orderBy: { timestamp: 'desc' }
})
if (lastTransaction) {
const timeDiff = transaction.timestamp.getTime() - lastTransaction.timestamp.getTime()
const distance = calculateDistance(lastTransaction.location, transaction.location)
const maxPossibleSpeed = 900 // km/h (commercial flight)
const requiredSpeed = distance / (timeDiff / 3600000) // km/h
if (requiredSpeed > maxPossibleSpeed) {
anomalies.push(
`Impossible travel: ${distance}km in ${timeDiff / 60000} minutes (${requiredSpeed.toFixed(0)} km/h required)`
)
}
}
// Check 4: New device from new location
const deviceHistory = await db.deviceHistory.findFirst({
where: {
userId: transaction.userId,
deviceId: transaction.deviceId
}
})
if (!deviceHistory) {
anomalies.push(`New device: ${transaction
Установить forensic-data-engineer в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл forensic-data-engineer?
Expert in data forensics, anomaly detection, audit trail analysis, fraud detection, and breach investigation
Как установить скилл forensic-data-engineer?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл forensic-data-engineer запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic