forensic-data-engineer

forensic-data-engineer is a skill for Claude Code, Codex from daffy0208/ai-dev-standards. It costs 25 tokens per session (7,282 once invoked), scanned A, original, MIT.

A guide for investigating suspicious or damaged data by examining changes, access records, and patterns. It also covers recovering deleted data and checking whether records were altered.

In plain words
What is it for?
Use it to analyze audit trails, reconstruct data history, investigate breaches, verify data integrity, and track where data came from and how it changed.
Why use it?
It helps explain what happened to data, detect fraud or unauthorized changes, and preserve evidence for audits or investigations.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/daffy0208/ai-dev-standards/forensic-data-engineer
Any agent
npx skills add daffy0208/ai-dev-standards --skill forensic-data-engineer
Clone the repo
git clone --depth 1 https://github.com/daffy0208/ai-dev-standards

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for forensic-data-engineer

README.md
[![agentmods](https://agentmods.dev/badge/skills/daffy0208/ai-dev-standards/forensic-data-engineer.svg)](https://agentmods.dev/skills/daffy0208/ai-dev-standards/forensic-data-engineer)
Your own site
<a href="https://agentmods.dev/skills/daffy0208/ai-dev-standards/forensic-data-engineer"><img src="https://agentmods.dev/badge/skills/daffy0208/ai-dev-standards/forensic-data-engineer.svg" alt="Measured on agentmods" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,282 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00025 $0.07282
Opus 5 $0.00013 $0.03641
Sonnet 5 $0.00005 $0.01456
Haiku 4.5 $0.00003 $0.00728

Measured 6d ago against content hash 5757fc9fa21a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

forensic-data-engineer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/forensic-data-engineer/SKILL.md · 1,185 lines

How it starts

The opening of the file, as written. The whole thing — 1,185 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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' }
)

Read the full file on GitHub · 1,185 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 1,185 lines · 25 tokens per session scan A 5757fc9fa21a

Subscribe to this mod's changes

forensic-data-engineer is a skill published in the GitHub repository daffy0208/ai-dev-standards (36 stars, last pushed 8mo ago), licensed MIT. It adds 25 tokens to every session and 7,282 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.