Skip to content
aj-geddes avatar

Security Audit Logging

Structured security audit logging for compliance, forensics, and SIEM integration across Node.js, Python, and Java.

CCM score
39 of 100
skills.sh installs
571
GitHub stars
396
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers audit trails for security events, user actions, and system changes, with retention policies and SIEM shipping
  • Includes a Node.js audit logger built on winston with file rotation and an Elasticsearch transport, plus Python and Java guides
  • Guides logging of all security events with UTC timestamps, user context, and request IDs, while excluding passwords and secrets
  • Designed for teams meeting SOC 2, HIPAA, or PCI-DSS requirements and building breach detection or forensic capability

Install

$ npx -y skills add aj-geddes/useful-ai-prompts --skill security-audit-logging -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Security Audit Logging

Table of Contents

Overview

Implement comprehensive audit logging for security events, user actions, and system changes with structured logging, retention policies, and SIEM integration.

When to Use

  • Compliance requirements (SOC 2, HIPAA, PCI-DSS)
  • Security monitoring
  • Forensic investigations
  • User activity tracking
  • System change auditing
  • Breach detection

Quick Start

Minimal working example:

// audit-logger.js
const winston = require("winston");
const { ElasticsearchTransport } = require("winston-elasticsearch");

class AuditLogger {
  constructor() {
    this.logger = winston.createLogger({
      level: "info",
      format: winston.format.combine(
        winston.format.timestamp(),
        winston.format.json(),
      ),
      transports: [
        // File transport
        new winston.transports.File({
          filename: "logs/audit.log",
          maxsize: 10485760, // 10MB
          maxFiles: 30,
          tailable: true,
        }),

Details

Repository
github.com/aj-geddes/useful-ai-prompts
Categories
Security, Backend & APIs
First seen
Jun 3, 2026

Questions

What does the security-audit-logging skill do?

It implements comprehensive audit logging for security events, user actions and system changes, with structured logging, retention policies and SIEM integration. It suits building audit trails, compliance logging and security monitoring systems.

How do I install the security-audit-logging skill?

Run npx -y skills add aj-geddes/useful-ai-prompts --skill security-audit-logging -y in your project. Once installed, the agent can build audit logging code with a Node.js, Python or Java reference guide.

Which compliance standards does security-audit-logging support?

The skill targets compliance requirements such as SOC 2, HIPAA and PCI-DSS, along with forensic investigations and breach detection. It also covers user activity tracking and system change auditing.

More from aj-geddes/useful-ai-prompts

All 258

Similar to Security Audit Logging

More Security