ai-audit-logging

ai-audit-logging is a skill for Claude Code from latestaiagents/agent-skills. It costs 59 tokens per session (2,804 once invoked), scanned A, original, MIT.

A guide to recording what an AI system does, including its inputs, outputs, users, and decisions. These records form an audit trail for checking behavior and meeting compliance requirements.

In plain words
What is it for?
Use it to design audit-log fields and track AI operations for standards such as SOC 2, HIPAA, or the EU AI Act.
Why use it?
It makes AI activity traceable when you need to investigate incidents, debug behavior, or show how the system is governed.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the mlops plugin — 7 skills shipped together , and of llmops-guardian, latestaiagents

Good fit Use it to design audit-log fields and track AI operations for standards such as SOC 2, HIPAA, or the EU AI Act.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/latestaiagents/agent-skills/ai-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 latestaiagents/agent-skills --skill ai-audit-logging
Clone the repo
git clone --depth 1 https://github.com/latestaiagents/agent-skills

Made for: Claude Code.

Or install mlops, the plugin that ships this one along with the rest of its 7 skills.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/latestaiagents/agent-skills/ai-audit-logging/github.svg)](https://agentmods.dev/skills/latestaiagents/agent-skills/ai-audit-logging)
Your own site
<a href="https://agentmods.dev/skills/latestaiagents/agent-skills/ai-audit-logging"><img src="https://agentmods.dev/badge/skills/latestaiagents/agent-skills/ai-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 ai-audit-logging

Your own site · 80×15
<a href="https://agentmods.dev/skills/latestaiagents/agent-skills/ai-audit-logging"><img src="https://agentmods.dev/badge/skills/latestaiagents/agent-skills/ai-audit-logging.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,804 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.
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.00059 $0.02804
Opus 5 $0.00030 $0.01402
Sonnet 5 $0.00012 $0.00561
Haiku 4.5 $0.00006 $0.00280

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

Security

Grade A, and why

ai-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/mlops/llmops-guardian/ai-audit-logging/SKILL.md · 446 lines

How it starts

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

AI Audit Logging

Implement compliance-ready audit trails for AI system decisions and outputs.

When to Use

  • Meeting regulatory requirements (EU AI Act, SOC2, HIPAA)
  • Tracking AI decisions for accountability
  • Debugging AI system behavior
  • Investigating incidents involving AI
  • Demonstrating AI governance

Regulatory Context (2026)

EU AI Act Requirements

  • High-risk AI systems must maintain logs that enable:

    • Traceability of AI decisions
    • Recording of reference data
    • Logging of events throughout lifecycle
    • Logs must be kept for appropriate period
  • Effective August 2026 with fines up to 7% of global revenue

SOC2 AI Considerations

  • Processing Integrity: AI outputs must be accurate and complete
  • Confidentiality: AI must not expose confidential data
  • Availability: AI systems must maintain audit logs

Audit Log Schema

interface AIAuditLog {
  // Identification
  id: string;
  timestamp: Date;
  correlationId: string;
  sessionId: string;

  // Actor
  actor: {
    type: 'user' | 'system' | 'automated';
    id: string;
    name?: string;
    ip?: string;
    userAgent?: string;
  };

  // AI Operation
  operation: {
    type: 'inference' | 'generation' | 'classification' | 'analysis';
    model: string;
    modelVersion: string;
    provider: string;
  };

  // Input/Output
  io: {
    inputHash: string;        // Hash of input for privacy
    inputTokens: number;
    outputHash: string;       // Hash of output
    outputTokens: number;
    inputSummary?: string;    // Optional human-readable summary
    outputSummary?: string;
  };

  // Decisions
  decision?: {
    action: string;
    confidence: number;
    alternatives?: { action: string; confidence: number }[];
    reasoning?: string;
  };

  // Safety
  safety: {
    contentFiltered: boolean;
    filterReasons?: string[];
    humanReviewRequired: boolean;
    humanReviewCompleted?: boolean;
    reviewerId?: string;
  };

  // Performance
  performance: {
    latencyMs: number;
    queueTimeMs?: number;
    tokensPerSecond?: number;
  };

  // Cost
  cost: {
    inputCost: number;
    outputCost: number;
    totalCost: number;
    currency: string;
  };

  // Context
  context: {
    application: string;
    environment: 'production' | 'staging' | 'development';
    feature?: string;
    tags: string[];
  };

  // Metadata
  metadata: Record<string, unknown>;
}

Read the full file on GitHub · 446 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 · 446 lines · 59 tokens per session scan A 5aab9344a25e

Subscribe to this mod's changes

ai-audit-logging is a skill published in the GitHub repository latestaiagents/agent-skills (5 stars, last pushed 4mo ago), licensed MIT. It adds 59 tokens to every session and 2,804 once invoked, about $0.0003 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.