Live survey315 models · 14 providers · 23,592 auditsAudited implement · SAFE →What changedHow we verifyllms.txt

Agent skill · Audited from source

Implementing Database Audit Logging

skill · jeremylongshore/claude-code-plugins-plus-skillsMIT licenceAudited 8 Oct 2026 · source 4f83675ca38a

★ 2,823pushed todayversion 1.28.0
!CAUTIONGrade B · 89/100 · 1 finding · 4f83675
2,823repo stars · whole jeremylongshore/claude-code-plugins-plus-skills

Is it safe? With care — CAUTION, grade B (89/100). We read this skill's source at commit 4f83675ca38a and found no filesystem, network or shell access and no hard-coded secrets. The audit raised 1 finding, 1 critical or high. What it does: Process use when you need to track database changes for compliance and

Ask an AI about this pageGChatGPTCClaudePPerplexityGeGeminiXGrok
More
Cite

Cite this page

ModelsAtlas. “Implementing Database Audit Logging (jeremylongshore/claude-code-plugins-plus-skills)”. Retrieved 8 Oct 2026. https://modelsatlas.com/skills/jeremylongshore/implementing-database-audit-logging

Trust audit

Audit 0.4.1 · source read 8 Oct 2026

Trust score89/100!CAUTION B
0 critical1 high0 medium0 low0 info

CAUTION means the audit found things worth knowing before you trust this skill. Grade B is shared by 17,406 of 18,389 audited skills.

What the source does

  • FilesystemNone observedNo reads or writes in the source
  • NetworkNone observedNo outbound calls in the source
  • ShellNone observedNo commands run in the source
  • DependenciesPinnedNothing floats
  • SecretsNone foundNo keys in source

Five audit layers

LayerWhat we checkResultFindings
L0 ProvenanceRepo owner, licence, archive status, activityPASS0
L1 Static sourceSecrets, path traversal, supply chain, hidden codePASS0
L2 InstructionsPrompt injection, authority framing, hidden directivesFAIL1
L3 InventoryThe files and declarations match the sourcePASS0
L4 SandboxRun in isolation and watch behaviourSKIPPED why0

Gates applied: no behavioural pass.

Findings (1)

HIGHPrompt injectionprompt.credential_read · SKILL.md:44
F-01 Prompt injectionCWE-94 · CWE-1427Layer L2
- Tables containing access control data (roles, permissions, API keys) -- security requirement
Why
asks the agent to read credentials
Fix
—

Audit 0.4.1 · source sha 4f83675ca38a · 8 Oct 2026Report an issue or request a re-scan

Provenance

Who published it, and what the verdict is pinned to

What it tells the agent

Full source on GitHub ↗

Its description: Process use when you need to track database changes for compliance and

---
name: implementing-database-audit-logging
description: 'Process use when you need to track database changes for compliance and
  security monitoring.

  This skill implements audit logging using triggers, application-level logging, CDC,
  or native logs.

  Trigger with phrases like "implement database audit logging", "add audit trails",

  "track database changes", or "monitor database activity for compliance".

  '
allowed-tools: Read, Write, Edit, Grep, Glob, Bash(psql:*), Bash(mysql:*)
version: 1.28.0
author: Jeremy Longshore <[email protected]>
license: MIT
tags:
- database
- security
- monitoring
- logging
compatibility: Designed for Claude Code
---
# Database Audit Logger

## Overview

Implement database audit logging to track all data modifications (INSERT, UPDATE, DELETE) with full before/after values, user identity, timestamps, and application context. This skill supports trigger-based auditing for PostgreSQL and MySQL, change data capture (CDC) patterns, and application-level audit logging.

## Prerequisites

- Database credentials with CREATE TABLE, CREATE FUNCTION, and CREATE TRIGGER permissions
- `psql` or `mysql` CLI for executing audit setup DDL
- Understanding of applicable compliance requirements (which tables, which operations, retention period)
- Estimated storage for audit logs: plan for 10-30% of the audited table's data volume per year
- Separate tablespace or storage volume for audit data to prevent audit growth from affecting application performance

## Instructions

1. Identify tables requiring audit logging based on compliance and business needs:
   - Tables containing PII (users, contacts, addresses) -- GDPR/HIPAA requirement
   - Tables containing financial data (transactions, payments, invoices) -- SOX/PCI-DSS requirement
   - Tables containing access control data (roles, permissions, API keys) -- security requirement
   - Determine which operations to audit per table: INSERT, UPDATE, DELETE, or all three

2. Create the audit log table with comprehensive metadata:

   ```sql
   CREATE TABLE audit_log (
     id BIGSERIAL PRIMARY KEY,
     table_name VARCHAR(100) NOT NULL,
     record_id TEXT NOT NULL,
     action VARCHAR(10) NOT NULL CHECK (action IN ('INSERT', 'UPDATE', 'DELETE')),
     old_values JSONB,
     new_values JSONB,
     changed_columns TEXT[],
     changed_by VARCHAR(100),
     changed_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
     client_ip INET,
     application_name VARCHAR(100),
     transaction_id BIGINT
   );
   ```

3. Add indexes for common audit queries:
   - `CREATE INDEX idx_audit_table_record ON audit_log (table_name, record_id)`
   - `CREATE INDEX idx_audit_changed_at ON audit_log (changed_at)`
   - `CREATE INDEX idx_audit_changed_by ON audit_log (changed_by)`
   - `CREATE INDEX idx_audit_action ON audit_log (table_name, action)`

4. Create the PostgreSQL audit trigger function:

   ```sql
   CREATE OR REPLACE FUNCTION audit_trigger_func() RETURNS TRIGGER AS $$
   BEGIN
     IF TG_OP = 'INSERT' THEN
       INSERT INTO audit_log (table_name, record_id, action, new_values, changed_by, client_ip, application_name, transaction_id)
       VALUES (TG_TABLE_NAME, NEW.id::text, 'INSERT', to_jsonb(NEW), current_setting('app.user', true), inet_client_addr(), current_setting('application_name'), txid_current());
     ELSIF TG_OP = 'UPDATE' THEN
       INSERT INTO audit_log (table_name, record_id, action, old_values, new_values, changed_by, client_ip, application_name, transaction_id)
       VALUES (TG_TABLE_NAME, NEW.id::text, 'UPDATE', to_jsonb(OLD), to_jsonb(NEW), current_setting('app.user', true), inet_client_addr(), current_setting('application_name'), txid_current());
     ELSIF TG_OP = 'DELETE' THEN
       INSERT INTO audit_log (table_name, record_id, action, old_values, changed_by, client_ip, application_name, transaction_id)
       VALUES (TG_TABLE_NAME, OLD.id::text, 'DELETE', to_jsonb(OLD), current_setting('app.user', true), inet_client_addr(), current_setting('application_name'), txid_current());
     END IF;
     RETURN COALESCE(NEW, OLD);
   END;
   $$ LANGUAGE plpgsql;
   ```

5. Attach triggers to each audited table:
   - `CREATE TRIGGER audit_users AFTER INSERT OR UPDATE OR DELETE ON users FOR EACH ROW EXECUTE FUNCTION audit_trigger_func()`
   - Repeat for each table requiring audit logging

6. Pass application-level user context to the database session so audit logs capture the actual application user (not just the database role):
   - At the start of each request: `SET LOCAL app.user = '[email protected]'`
   - For connection pools, set in the connection checkout hook
   - This value is captured by `current_setting('app.user', true)` in the trigger

7. Partition the audit_log table by month for efficient querying and archival:
   - `CREATE TABLE audit_log (...) PARTITION BY RANGE (changed_at)`
   - Create monthly partitions: `CREATE TABLE audit_log_2024_01 PARTITION OF audit_log FOR VALUES FROM ('2024-01-01') TO ('2024-02-01')`
   - Automate partition creation for future months

8. Protect audit log integrity:
   - Revoke UPDATE and DELETE permissions on audit_log from all application users
   - Grant only INSERT permission to the trigger execution context
   - Consider using `pg_audit` extension for additional tamper protection
   - Ship audit logs to an external system (SIEM, S3) for independent retention

9. Create compliance report queries:
   - **Change history for a record**: `SELECT * FROM audit_log WHERE table_name = 'users' AND record_id = '12345' ORDER BY changed_at`
   - **All changes by a user**: `SELECT * FROM audit_log WHERE changed_by = '[email protected]' ORDER BY changed_at DESC`
   - **Bulk operations detection**: `SELECT changed_by, table_name, action, COUNT(*) FROM audit_log WHERE changed_at > NOW() - INTERVAL '1 hour' GROUP BY 1,2,3 HAVING COUNT(*) > 100`
   - **Off-hours activity**: `SELECT * FROM audit_log WHERE EXTRACT(HOUR FROM changed_at) NOT BETWEEN 8 AND 18`

10. Set up audit log archival: mo

Excerpt, first 6,000 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.

Install

Pinned to the audited commit 4f83675

Download folder ↗
git clone https://github.com/jeremylongshore/claude-code-plugins-plus-skills
git -C claude-code-plugins-plus-skills checkout 4f83675ca38a

The author documents no install command, so this uses the repository directly. Our verdict covers commit 4f83675ca38a only.

Works in which agents?

What its own text says, not a test

AgentStatusMore
Claude CodeMentioned in its text, not testedSkills for Claude Code · About Claude Code
“Mentioned” means the skill’s text names the agent. We have not run it there.

Audit history

Every audit, every source change

  1. !CAUTION B 89 / 100

    first audit · source 4f83675ca38a

README badge

For maintainers · shows the latest audit

ModelsAtlas: CAUTION BMODELSATLASCAUTION · B
[![ModelsAtlas: CAUTION B](https://modelsatlas.com/skills/jeremylongshore/implementing-database-audit-logging/badge.svg)](https://modelsatlas.com/skills/jeremylongshore/implementing-database-audit-logging/)

The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.

Add this badge to your README

[![ModelsAtlas: CAUTION B](https://modelsatlas.com/skills/jeremylongshore/implementing-database-audit-logging/badge.svg)](https://modelsatlas.com/skills/jeremylongshore/implementing-database-audit-logging/)

Questions about Implementing Database Audit Logging

What does the Implementing Database Audit Logging skill do?
Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.
Is Implementing Database Audit Logging safe to install?
With care. The audit graded it B (89/100) and found 1 thing worth knowing before you trust this skill, listed below with the exact line each was found on.
What can Implementing Database Audit Logging access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
Which assistants does Implementing Database Audit Logging work with?
Its documentation mentions claude-code. That is what the text claims, not a compatibility test we ran.
How current is this page?
The grade is for one exact copy of the source (4f83675ca38a), read on 2026-10-08. The repository is watched, and a new audit runs when it changes — this is the first audit.

Sources

Spotted something wrong? Report a correction · Methodology

Keep going in your AI

Opens with this page as the source. We add nothing else to the prompt.