build-audit-logs

Build and review tamper-evident audit trails in TypeScript applications using evlog.

Updated Sep 16, 2026
One-click install
npx skills add https://github.com/jasonviipers/vipers --skill build-audit-logs-jasonviipers
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: build-audit-logs
Source: https://github.com/jasonviipers/vipers/tree/main/.agents/skills/build-audit-logs
Command: npx skills add https://github.com/jasonviipers/vipers --skill build-audit-logs-jasonviipers

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires evlog, and includes references (resource) components.

What problem does it solve? Applications that handle sensitive actions (refunds, role changes, deletions) need a forensic audit trail answering who did what, on which resource, and with what outcome, but teams often ship systems with missing denial logging, PII leaks, or no tamper evidence. ## Core Features & Use Cases - End-to-end audit buildout: Wire the evlog pipeline with auditEnricher, auditOnly drains, signed hash-chain or HMAC integrity, typed action catalogs, and redaction presets. - Four-pass review mode: Audit an existing setup by grepping for pipeline wiring, call-site coverage, redaction and integrity gaps, and test coverage, then report findings by severity (P0/P1/P2). - Compliance guidance: Covers retention windows for SOC2, HIPAA, PCI DSS, multi-tenant isolation, and GDPR crypto-shredding patterns. - Use Case: A developer adding audit logging to a billing service can follow the steps to define a typed action catalog, wrap refund logic with withAudit(), log denials, and ship a hash-chained FS drain alongside a queryable Axiom dataset. ## Quick Start Ask the assistant to add an evlog audit trail to your TypeScript app's mutating endpoints, or to review your existing audit setup for coverage and compliance gaps.

Frequently Asked Questions about build-audit-logs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add audit logging to a TypeScript app with evlog?

Register auditEnricher() in your framework integration, add a main drain plus an auditOnly(signed(...)) drain, then instrument call sites with withAudit() or log.audit(). Define actions centrally with defineAuditCatalog or defineAuditAction.

How do I review an existing audit logging setup for gaps?

Run four passes: check pipeline wiring for auditEnricher and auditOnly, grep mutating endpoints and 403 throws for missing log.audit.deny() calls, verify auditRedactPreset and signed drain configuration, and confirm tests use mockAudit() with denial assertions.

Does evlog audit logging work with Next.js and Hono?

Yes, evlog provides integrations for Next.js App Router, Hono, Express, and Nuxt/Nitro with the same wiring pattern. Standalone scripts and queue workers use the audit() function directly without a request context.

How do I make audit logs tamper-evident for SOC2 or HIPAA compliance?

Wrap the audit drain with signed() using the hmac or hash-chain strategy, and store audits in an append-only sink like S3 Object Lock or an FS journal. Persist hash-chain state externally (for example Redis) so the chain survives restarts.

Why are my audit events missing denial outcomes?

Denials are only recorded if each authorization check explicitly calls log.audit.deny() or the action is wrapped in withAudit(), which maps 403 errors to a denied outcome automatically. Silent 403 throws without a paired deny call are the most common coverage gap.

How do I handle GDPR deletion requests with append-only audit logs?

Keep audit rows immutable and encrypt PII fields with a per-actor key stored outside the audit store. To forget a user, delete their key so the PII becomes unreadable while the hash chain stays valid, a pattern called crypto-shredding.