Install any skill in seconds. Free to start, no credit card required.
Get Started Free →jeremylongshore/klingai-audit-logging
Implement audit logging for Kling AI operations for compliance and security.
Passed 15 of 25 test cases with the skill, and 6 of 25 without it.
and 13 more in the full report
9 fixed6 passed either way10 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 9 test cases the skill fixed. Same model, same prompt, with and without the skill.
When instantiating AuditLogger without explicit directory parameters, where should audit log files be placed on disk?
| Checked | Without skill | With skill |
|---|---|---|
| Set default log_dir argument to string audit. | Missed | Passed |
| Create log directory using Path.mkdir with exist_ok=True. | Missed | Passed |
The instructions your model reads when the skill loads.
Compliance-grade audit logging for Kling AI API operations. Every task submission, status change, and credential usage is captured in tamper-evident structured logs.
import json
import hashlib
import time
from datetime import datetime
from pathlib import Path
class AuditLogger:
"""Append-only audit log with integrity checksums."""
def __init__(self, log_dir: str = "audit"):
self.log_dir = Path(log_dir)
self.log_dir.mkdir(exist_ok=True)
self._prev_hash = "genesis"
def _compute_hash(self, entry: dict) -> str:
raw = json.dumps(entry, sort_keys=True) + self._prev_hash
return hashlib.sha256(raw.encode()).hexdigest()[:16]
def log(self, event_type: str, actor: str, details: dict):
"""Write a tamper-evident audit entry."""
entry = {
"timestamp": datetime.utcnow().isoformat() + "Z",
"event_type": event_type,
"actor": actor,
"details": details,
"prev_hash": self._prev_hash,
}
entry["hash"] = self._compute_hash(entry)
self._prev_hash = entry["hash"]
date = datetime.utcnow().strftime("%Y-%m-%d")
test cases passed, vs 6 / 25 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.