audit.log

Log Betty Framework skill executions as timestamped JSON audit entries.

2|Updated Oct 22, 2025
One-click install
npx skills add https://github.com/epieczko/betty --skill audit-log
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: audit.log
Source: https://github.com/epieczko/betty/tree/main/skills/audit.log
Command: npx skills add https://github.com/epieczko/betty --skill audit-log

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires PyYAML.

What problem does it solve?

The audit.log skill provides centralized audit logging for the Betty Framework. It records timestamped JSON entries tracking skill execution, status, duration, and errors to support compliance, debugging, and operational visibility.

Core Features & Use Cases

  • Centralized audit entries with fields: timestamp, skill, status, duration, errors, and metadata
  • Rotation policy to retain only the last 10,000 entries
  • Thread-safe writes and structured outputs for automation and analytics

Quick Start

Append an audit entry for a sample skill: python audit_log.py "workflow.validate" "success" 150

Frequently Asked Questions about audit.log

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up centralized audit logging for Betty Framework skill executions?

Centralized audit logging captures timestamped JSON entries for every skill execution, recording status, duration, errors, and metadata. Use audit.log to automatically append entries with fields like timestamp, skill name, execution status, and duration_ms, enabling compliance tracking and debugging without manual log management.

Can I use audit logging to track skill execution errors and performance metrics?

Yes, audit logging records execution status, duration in milliseconds, and error details for each skill run. Every logged entry includes timestamp, skill identifier, completion status, and metadata fields, providing visibility into both failures and performance across all Betty Framework skill executions.

How does audit log rotation work and what happens to old entries?

Audit log rotation automatically retains only the most recent 10,000 entries in JSON format. When the limit is reached, older entries are removed, keeping the log file manageable while preserving the most recent execution history for debugging and compliance review.

Does audit logging support thread-safe concurrent writes from multiple skills?

Yes, audit logging implements thread-safe writes via safe_update_json to handle concurrent skill executions. Multiple skills can write audit entries simultaneously without data corruption, ensuring reliable JSON structured output across parallel Betty Framework operations.

What's the quickest way to start logging audit entries from a skill?

Invoke audit logging from the command line by passing the skill name, execution status, and duration: python audit_log.py "skill.name" "success" 150. This appends a timestamped JSON entry with all required fields and automatically manages log rotation.

Can I integrate audit logging with Betty Framework registry and CLI tools?

Yes, audit logging supports both CLI invocation and registry integration within the Betty Framework. Once integrated, audit entries are automatically generated for all skill executions tracked through the framework's registry without additional configuration per skill.