Index of every page on this site: llms.txt
All skills
jeremylongshore avatar

/klingai-usage-analytics

@0d57af8
Run it yourself

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'.

Use this Skill: https://skilld.dev/gh/jeremylongshore/tons-of-skills-marketplace/klingai-usage-analytics

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesreport-generator.md

≈574 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Report Generator

Report Generator

def generate_usage_report(analytics: UsageAnalytics, days: int = 30) -> str:
    """Generate a formatted usage report."""
    summary = analytics.get_summary(
        start=datetime.utcnow() - timedelta(days=days)
    )
    performance = analytics.get_performance_metrics(days)
    top_users = analytics.get_top_users(limit=5, days=days)
    anomalies = analytics.detect_anomalies(days=7)

    report = f"""
================================================================================
                     KLING AI USAGE REPORT ({days} DAYS)
================================================================================

SUMMARY
-------
Total Generations: {summary['total_generations']}
Completed: {summary['completed']} ({summary['success_rate']:.1f}% success rate)
Failed: {summary['failed']}
Total Credits Used: {summary['total_credits']}
Average Credits/Video: {summary['avg_credits_per_video']:.1f}

PERFORMANCE
-----------
Average Generation Time: {performance['generation_time']['avg']:.1f}s
P95 Generation Time: {performance['generation_time']['p95']:.1f}s
Failure Rate: {performance['failure_rate']:.2f}%

BY MODEL
--------
"""
    for model, stats in summary['by_model'].items():
        report += f"  {model}: {stats['count']} videos, {stats['credits']} credits\n"

    report += """
BY DURATION
-----------
"""
    for duration, stats in summary['by_duration'].items():
        report += f"  {duration}: {stats['count']} videos, {stats['credits']} credits\n"

    report += """
TOP USERS
---------
"""
    for i, user in enumerate(top_users, 1):
        report += f"  {i}. {user['user_id']}: {user['generations']} videos, {user['credits']} credits\n"

    if anomalies:
        report += """
ANOMALIES DETECTED
------------------
"""
        for a in anomalies:
            report += f"  {a['date']}: {a['type'].upper()} - {a['generations']} generations (expected ~{a['expected']})\n"

    report += """
================================================================================
"""

    return report

# Usage
analytics = UsageAnalytics()

# Record events (in production, this would come from your tracking system)
# analytics.record_event(...)

# Generate report
print(generate_usage_report(analytics, days=30))

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    This skill provides a structured framework for tracking Kling AI generation metrics and costs through local event logging and reporting tools.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

Signed by skilld at 0d57af8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 3 months ago
What it can do
Reads files Edits files Runs commands
version
1.18.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
[
  "saas",
  "kling-ai",
  "analytics",
  "reporting"
]
All 5 allowed tools
ReadWriteEditBash(npm:*)Grep
Other metadata
compatibility
Designed for Claude Code

README badge

README badge for jeremylongshore/tons-of-skills-marketplace/klingai-usage-analytics