klingai-audit-logging

Featured

Implement audit logging for Kling AI operations for compliance and security. Use when tracking API usage or preparing for audits. Trigger with phrases like 'klingai audit', 'kling ai audit log', 'klingai compliance log', 'video generation audit trail'.

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Kling AI Audit Logging ## Overview Compliance-grade audit logging for Kling AI API operations. Every task submission, status change, and credential usage is captured in tamper-evident structured logs. ## Audit Event Schema ```python 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") filepath = self.log_dir / f"audit-{date}.jsonl" with open(filepath, "a") as f: f.write(json.dumps(entry) + "\n") return entry["hash"] ``` ## Audit Events for Kling AI ```python class KlingAuditClient: """Kling client...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category