klingai-usage-analytics

Featured

Build usage analytics and reporting for Kling AI video generation. Use when tracking patterns, analyzing costs, or building dashboards. Trigger with phrases like 'klingai analytics', 'kling ai usage report', 'klingai metrics', 'video generation stats'.

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 Usage Analytics ## Overview Track video generation usage with structured logging, aggregate metrics, daily reports, and cost analysis. Built on JSONL event logs that can feed into any analytics platform. ## Event Logger ```python import json import time from datetime import datetime from pathlib import Path class KlingEventLogger: """Append-only JSONL event log for Kling AI operations.""" def __init__(self, log_dir: str = "logs"): self.log_dir = Path(log_dir) self.log_dir.mkdir(exist_ok=True) def _write(self, event: dict): date = datetime.utcnow().strftime("%Y-%m-%d") filepath = self.log_dir / f"kling-{date}.jsonl" event["timestamp"] = datetime.utcnow().isoformat() with open(filepath, "a") as f: f.write(json.dumps(event) + "\n") def log_submission(self, task_id, prompt, model, duration, mode): self._write({ "event": "task_submitted", "task_id": task_id, "model": model, "duration": int(duration), "mode": mode, "prompt_len": len(prompt), }) def log_completion(self, task_id, status, elapsed_sec, credits_used): self._write({ "event": "task_completed", "task_id": task_id, "status": status, "elapsed_sec": elapsed_sec, "credits_used": credits_used, }) def log_error(self, task_id, error_type, message): self._wri...

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