backend-audit-logging

backend-audit-logging is a skill for Claude Code, Codex from j4flmao/agent-skills. It costs 110 tokens per session (5,664 once invoked), scanned A, original, MIT.

A design for recording sensitive data access and changes in an append-only log that can show who did what and reveal tampering. It supports compliance records for rules such as GDPR, HIPAA, and SOC 2.

In plain words
What is it for?
Use it to define an audit-log table or implementation, including recorded events, retention rules, tamper evidence, and queries by user, resource, or time.
Why use it?
It provides a reliable history of important actions instead of leaving teams to reconstruct events from scattered application logs. This helps with investigations, reporting, and compliance checks.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument; mentions Codex.

Good fit Use it to define an audit-log table or implementation, including recorded events, retention rules, tamper evidence, and queries by user, resource, or time.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/j4flmao/agent-skills/audit-logging
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.

Any agent
npx skills add j4flmao/agent-skills --skill audit-logging
Clone the repo
git clone --depth 1 https://github.com/j4flmao/agent-skills

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 backend-audit-logging

README.md
[![agentmods](https://agentmods.dev/badge/skills/j4flmao/agent-skills/audit-logging/github.svg)](https://agentmods.dev/skills/j4flmao/agent-skills/audit-logging)
Your own site
<a href="https://agentmods.dev/skills/j4flmao/agent-skills/audit-logging"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/audit-logging/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for backend-audit-logging

Your own site · 80×15
<a href="https://agentmods.dev/skills/j4flmao/agent-skills/audit-logging"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/audit-logging.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 110 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,664 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00110 $0.05664
Opus 5 $0.00055 $0.02832
Sonnet 5 $0.00022 $0.01133
Haiku 4.5 $0.00011 $0.00566

Measured 8d ago against content hash 1f899d75de65, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

backend-audit-logging 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 8d 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/backend/universal/audit-logging/SKILL.md · 619 lines

How it starts

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

Backend Audit Logging

Purpose

Record every sensitive data access and state change in an immutable, tamper-evident audit trail for regulatory compliance (SOC 2, SOX, HIPAA, GDPR).

Agent Protocol

Trigger

Exact user phrases: "audit log", "audit trail", "compliance logging", "tamper-evident log", "immutable log", "audit table", "change tracking", "who changed what", "data provenance", "audit events", "reporting log".

Input Context

  • Regulatory framework (SOC 2, SOX, HIPAA, GDPR, PCI-DSS).
  • Data classification and sensitive fields.
  • Existing database and storage infrastructure.
  • Retention requirements.

Output Artifact

Audit log schema or implementation code. No file unless requested.

Response Format

Event: {event type}
Actor: {user/system}
Resource: {resource type}:{id}
Action: {read|create|update|delete}

Completion Criteria

  • Audit events recorded for all sensitive operations
  • Audit log is append-only (immutable)
  • Tamper evidence implemented (hash chain or similar)
  • Retention policy configured
  • Audit logs queryable by actor, resource, and time range

Architecture Decision Trees

Storage Backend Decision Tree

What is the primary compliance requirement?
├── SOC 2 / SOX → PostgreSQL with hash chain (append-only table, partition by month)
├── HIPAA → Encrypted database with strict access controls + hash chain + 6-year retention
├── GDPR → Searchable storage with data deletion capability (anonymization, not deletion)
├── PCI-DSS → Immutable log with strict access controls, 1-year retention, quarterly review
└── General compliance → Cloud-native audit service (AWS CloudTrail, Azure Monitor)

What is the write volume?
├── < 1000 events/sec → Relational database (PostgreSQL, MySQL) with hash chain
├── 1000–10000 events/sec → Time-series database (TimescaleDB, ClickHouse)
└── > 10000 events/sec → Log aggregator (Elasticsearch) + batched hash chain

Tamper Evidence Decision Tree

Is tamper evidence required by compliance framework?
├── Yes → Is regulatory framework HIPAA or PCI-DSS?
│   ├── Yes → Hash chain with periodic verification (quarterly) + external audit service
│   └── No → Hash chain (SHA-256 linked list) or digital signature per entry
└── No → Append-only table with database-level access controls (no hash chain needed)

Volume consideration:
├── Single DB (<1000/s) → Hash chain linking each row via previous_hash
├── Medium (1000–10000/s) → Batch Merkle tree, publish root hash periodically
└── High (>10000/s) → Periodic hash anchor (chain per batch, not per event)

Read the full file on GitHub · 619 lines

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. 8d ago First seen · 619 lines · 110 tokens per session scan A 1f899d75de65

Subscribe to this mod's changes

backend-audit-logging is a skill published in the GitHub repository j4flmao/agent-skills (23 stars, last pushed 5d ago), licensed MIT. It adds 110 tokens to every session and 5,664 once invoked, about $0.0006 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-09-03.

Related

Other skills, from other repositories

akf-trust-metadata

The AI native file format. EXIF for AI — stamps every file with trust scores, source provenance, and compliance metadata. Embeds into 20+ formats (DOCX, PDF, images, code). EU AI Act, SOX, HIPAA auditing.

sickn33/agentic-awesome-skills · 60 tokens

achieving-cmmc-level-2-compliance

Prepare a defense-contractor environment for CMMC Level 2 certification: scope CUI and FCI, implement the 110 NIST SP 800-171 Rev 2 security requirements across 14 families, compute the SPRS score with the DoD Assessment Methodology, manage a compliant POA&M, and ready the organization for a C3PAO assessment. Use when…

mukul975/Anthropic-Cybersecurity-Skills · 255 tokens

fedramp

Expert guidance for FedRAMP certification and compliance under CR26 (FedRAMP Consolidated Rules for 2026). Use this skill whenever a user asks about FedRAMP authorization, ATO (Authority to Operate), cloud security for federal government, NIST SP 800-53 controls, CSP compliance, or any of the core FedRAMP document…

Sushegaad/Claude-Skills-Governance-Risk-and-Compliance · 236 tokens

eu-cra

Expert EU Cyber Resilience Act (CRA) advisor for Regulation (EU) 2024/2847 — mandatory cybersecurity and vulnerability handling requirements for all products with digital elements (PDEs) sold in the EU. Use this skill for gap analysis, product classification (Default / Class I / Class II), conformity assessment route…

Sushegaad/Claude-Skills-Governance-Risk-and-Compliance · 133 tokens

app-store-preflight-compliance

Pre-submission compliance scanner workflow for Apple App Store apps. Use when reviewing iOS, macOS, tvOS, watchOS, or visionOS projects (Swift, Objective-C, React Native, Expo) for App Store rejection risks, submission readiness, privacy compliance, or guideline violations.

RevylAI/greenlight · 65 tokens

nis2

EU NIS2 Directive (Directive (EU) 2022/2555) compliance advisor for essential and important entities: entity classification, Art. 21 risk management measures, Art. 23 incident reporting timelines (24h/72h/1 month), Art. 20 governance obligations, supply chain security (Art. 21(2)(d); coordinated risk assessments Art.…

Sushegaad/Claude-Skills-Governance-Risk-and-Compliance · 195 tokens