build-audit-logs

Installation
SKILL.md

Build or Review an Audit System with evlog

For application developers who either need to add an audit trail to their product, or who already have one and want it reviewed. Walks through the design calls, the end-to-end implementation, and a review checklist for an existing setup.

This skill assumes the audit lives in your app. To extend the evlog package itself (new audit helper, new drain wrapper), see the contributor skills under .agents/skills/.

Quick reference: call-site cheat sheet

When you already know the system is wired and just need to remember the API:

Situation Helper
Inside a request handler, action succeeded log.audit({ action, actor, target, outcome: 'success' })
Inside a request handler, AuthZ denial log.audit.deny('reason', { action, actor, target })
Standalone job / script / CLI (no request) audit({ action, actor, target, outcome })
Auto-record success / failure / denied for a function withAudit({ action, target }, fn)
Recording a state change add changes: auditDiff(before, after)
Centralised typed action vocabulary defineAuditCatalog('billing', { INVOICE_REFUND: { target: 'invoice' } }) — or defineAuditAction('invoice.refund', { target: 'invoice' }) for one-offs
Asserting audits in tests mockAudit()assertAudit() or toIncludeAuditOf()
Installs
10
Repository
hugorcd/evlog
GitHub Stars
1.8K
First Seen
Jun 3, 2026
build-audit-logs — hugorcd/evlog