Agent Audit Trail
БесплатноБез исполняемых скриптовНе проверенAppend-only, hash-chained audit log for AI agents. Records agent actions, tool calls, decisions, and external writes with provenance, timestamps, and sha256…
от lxyeternal★ 68 звёзд на GitHubОб этом скилле
Agent Audit Trail
An append-only, hash-chained audit log for AI agents. Every significant action, decision, tool call, and external write is recorded with a sha256 chain linking entries together — making tampering detectable and providing an authoritative compliance record.
Overview
This skill provides:
- Append-only NDJSON log at
audit/atlas-actions.ndjson - Hash-chained entries — each entry includes the sha256 of the previous entry
- Monotonic ordering —
ordfield ensures strict sequence - Structured fields — consistent schema across all event types
- EU AI Act Article 12 compliance implementation
Log Location
audit/atlas-actions.ndjson
The file is append-only. Never truncate, overwrite, or reorder entries.
Log Entry Schema
Each line is a valid JSON object:
{
"ts": "2026-04-02T18:00:00.000+01:00",
"kind": "tool-call",
"actor": "atlas",
"domain": "agirails",
"plane": "action",
"gate": "external-write",
"ord": 42,
"provenance": "session:agent:main:discord:channel:1472016988741177520",
"target": "audit/atlas-actions.ndjson",
"summary": "Appended audit log entry",
"prev_hash": "sha256:abc123...",
"hash": "sha256:def456..."
}
Field Reference
| Field | Type | Description |
|---|---|---|
ts |
ISO-8601 | Timestamp with timezone offset (Europe/London) |
kind |
string | Event type (see below) |
actor |
string | Agent or component that triggered the event |
domain |
string | Domain partition (agirails, client-lab, personal) |
plane |
string | Four-plane label (ingress, interpretation, decision, action) |
gate |
string | Truth gate applied (see SOUL.md) |
ord |
integer | Monotonically increasing sequence number |
provenance |
string | Source session or external identity |
target |
string | File, URL, or resource affected |
summary |
string | Human-readable description of the event |
prev_hash |
string | sha256 of the previous log entry (hex, prefixed sha256:) |
hash |
string | sha256 of this entry excluding the hash field itself |
Event Kinds
| Kind | Plane | Description |
|---|---|---|
tool-call |
action | Any tool invocation |
external-write |
action | Write to external system (file, API, DB) |
credential-access |
action | Secret or key accessed |
install-extend |
action | Package install or skill activation |
decision |
decision | Agent decision with reasoning |
override |
decision | Safety override applied |
ingress |
ingress | External input received |
session-start |
ingress | Agent session initialised |
session-end |
ingress | Agent session terminated |
state-transition |
decision | Behaviour surface change |
payment |
action | ACTP/x402 payment event (amount, counterparty, txhash) |
Setup
1. Create the audit directory
mkdir -p audit
touch audit/atlas-actions.ndjson
2. Wire into TOOLS.md
Add to your workspace TOOLS.md:
## Audit Log
- Path: `audit/atlas-actions.ndjson`
- Format: append-only NDJSON, hash-chained (sha256), monotonic `ord`
- Timestamps: Europe/London ISO-8601 with offset
- Fields: ts, kind, actor, domain, plane, gate, ord, provenance, target, summary
3. Wire into SOUL.md
Add to your workspace SOUL.md invariants:
4. Append-only, hash-chained audit log with monotonic ordering
10. Behavior surface changes logged as state transitions
And to Truth Gates:
- external-write: provenance + intent + approval + tool-log + ordering
- credential-access: domain scope + justification + audit + human approval
- install-extend: integrity proof + scope + rollback ref + human approval
4. Helper script (optional)
# scripts/audit_append.py
import json, hashlib, time, sys
from datetime import datetime, timezone, timedelta
from pathlib import Path
LOG = Path("audit/atlas-actions.ndjson")
TZ = timezone(timedelta(hours=1)) # Europe/London BST; adjust for GMT
def last_hash():
lines = LOG.read_text().strip().splitlines() if LOG.exists() else []
if not lines:
return "sha256:0" * 1 # genesis
last = json.loads(lines[-1])
return last.get("hash", "sha256:genesis")
def last_ord():
lines = LOG.read_text().strip().splitlines() if LOG.exists() else []
if not lines:
return 0
return json.loads(lines[-1]).get("ord", 0)
def append(kind, actor, domain, plane, gate, provenance, target, summary):
entry = {
"ts": datetime.now(TZ).isoformat(),
"kind": kind,
"actor": actor,
"domain": domain,
"plane": plane,
"gate": gate,
"ord": last_ord() + 1,
"provenance": provenance,
"target": target,
"summary": summary,
"prev_hash": last_hash(),
}
raw = json.dumps({k: v for k,
Установить Agent Audit Trail в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл Agent Audit Trail?
Append-only, hash-chained audit log for AI agents. Records agent actions, tool calls, decisions, and external writes with provenance, timestamps, and sha256 chain integrity. Designed for compliance with EU AI Act Article 12 automatic event recording requirements for high-risk AI systems.
Как установить скилл Agent Audit Trail?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Agent Audit Trail запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic