build-audit-logs

build-audit-logs is a skill for Claude Code, Codex from HugoRCD/evlog. It costs 49 tokens per session (6,057 once invoked), scanned A, original, MIT.

A guide for building or reviewing an audit trail in a TypeScript or JavaScript application. An audit trail records who performed an action, what changed, and whether it succeeded or was denied.

In plain words
What is it for?
Use it to add or inspect typed actions, authorization denials, state-change differences, automatic success or failure records, retention, and compliance-style reviews.
Why use it?
It provides a consistent way to record application actions and review whether an existing audit system captures important events correctly.

Skill for Claude CodeCodex

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

About the project

evlog is a TypeScript-first logging and observability project built around wide events and structured errors across runtimes. It is intended to help developers record application behavior and diagnose failures.

HugoRCD/evlog · 1,841 stars · on GitHub · evlog.dev

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/hugorcd/evlog/build-audit-logs
Any agent
npx skills add HugoRCD/evlog --skill build-audit-logs
Clone the repo
git clone --depth 1 https://github.com/HugoRCD/evlog

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 build-audit-logs

README.md
[![agentmods](https://agentmods.dev/badge/skills/hugorcd/evlog/build-audit-logs.svg)](https://agentmods.dev/skills/hugorcd/evlog/build-audit-logs)
Your own site
<a href="https://agentmods.dev/skills/hugorcd/evlog/build-audit-logs"><img src="https://agentmods.dev/badge/skills/hugorcd/evlog/build-audit-logs.svg" alt="Measured on agentmods" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,057 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.00049 $0.06057
Opus 5 $0.00024 $0.03028
Sonnet 5 $0.00010 $0.01211
Haiku 4.5 $0.00005 $0.00606

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

Security

Grade A, and why

build-audit-logs 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/build-audit-logs/SKILL.md · 471 lines

How it starts

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

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()

AuditFields schema (always provide action, actor, outcome; target strongly recommended; the rest is filled in for you):

interface AuditFields {
  action: string                                  // 'invoice.refund'
  actor: { type: 'user' | 'system' | 'api' | 'agent', id: string, email?, displayName?, model?, tools?, reason?, promptId? }
  outcome: 'success' | 'failure' | 'denied'
  target?: { type: string, id: string, [k: string]: unknown }
  reason?: string
  changes?: { before?: unknown, after?: unknown, patch?: AuditPatchOp[] }
  causationId?: string
  correlationId?: string
  version?: number                                // defaults to AUDIT_SCHEMA_VERSION
  idempotencyKey?: string                         // auto-derived from action+actor+target+timestamp
  context?: { requestId?, traceId?, ip?, userAgent?, tenantId?, ... }   // filled by auditEnricher
  signature?: string                              // added by signed(drain, { strategy: 'hmac' })
  prevHash?: string                               // added by signed(drain, { strategy: 'hash-chain' })
  hash?: string                                   // added by signed(drain, { strategy: 'hash-chain' })
}

Read the full file on GitHub · 471 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 · 471 lines · 49 tokens per session scan A 7fcea33b856c

Subscribe to this mod's changes

build-audit-logs is a skill published in the GitHub repository HugoRCD/evlog (1,841 stars, last pushed today), licensed MIT. It adds 49 tokens to every session and 6,057 once invoked, about $0.0002 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.

Related

Other skills, from other repositories

nestjs-error-handling

Implement Global Exception Filters and standard error formats in NestJS. Use when implementing global exception filters or standardizing error responses in NestJS.

FilippoDeSilva/skills · 32 tokens

run-tests

Runs .NET tests with dotnet test. Use when user says "run tests", "execute tests", "dotnet test", "test filter", "tests not running", or needs to detect the test platform (VSTest or Microsoft.Testing.Platform), identify the test framework, apply test filters, or troubleshoot test execution failures. Covers MSTest…

exceptionless/Exceptionless · 114 tokens

dd-code-generation

Use pup CLI for immediate Datadog operations or generate code for integration into applications.

DataDog/pup · 16 tokens

migrate-better-result-3

Migrate a TypeScript codebase from better-result 2.x to 3.0. Use when upgrading better-result across the TaggedError syntax, removed Result serialization helpers, recovery inference, matching, or retry APIs.

dmmulroy/better-result · 52 tokens

vendor-update

Upgrade Go/Node.js vendor dependencies and sync tool versions. Use whenever the user says "upgrade dependencies", "update vendors", "vendor update", "run vendor-upgrade", "bump dependencies", "update packages", or asks to run the vendor-update Make target. This skill also checks scripts/build/version.mk after…

apache/skywalking-banyandb · 95 tokens

agent-inspect

Local evidence debugger and trajectory-test toolkit for TypeScript AI agents. Use when capturing framework-faithful traces, asserting TraceContract/TraceFacts, packaging Evidence v2, or inspecting local runs over read-only MCP (gettracefacts).

rajudandigam/agent-inspect · 52 tokens