Skip to content
Back to skills

2306 Report Generator 405cb64a

ASecurity

```python 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)

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
datapythonperformance

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 2306-report-generator_405cb64a --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 2306 Report Generator 405cb64a?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 2306 Report Generator 405cb64a
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-2306-report-generator-405cb64a/badge)](https://www.skillsdirectory.com/skills/tools-only-2306-report-generator-405cb64a)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
# Report Generator

## Report Generator

```python
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))
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.