Skip to content
Back to skills

2711 Debug Utilities 5a5f6fe4

ASecurity

```python def create_debug_report(client: TracedKlingAIClient, metrics: PerformanceMetrics) -> dict: """Generate comprehensive debug report.""" return { "timestamp": datetime.utcnow().isoformat(), "performance": metrics.get_stats(), "recent_traces": client.get_traces(limit=10), "configuration": { "base_url": client.base_url, "api_key_set": bool(client.api_key), "api_key_prefix": client.api_key[:10] + "..." if client.api_

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
code-qualitypythonapiperformance

Works with

  • cli
  • api

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 2711-debug-utilities_5a5f6fe4 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 2711 Debug Utilities 5a5f6fe4?

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

Security grade badge for 2711 Debug Utilities 5a5f6fe4
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-2711-debug-utilities-5a5f6fe4/badge)](https://www.skillsdirectory.com/skills/tools-only-2711-debug-utilities-5a5f6fe4)

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

SKILL.md
# Debug Utilities

## Debug Utilities

```python
def create_debug_report(client: TracedKlingAIClient, metrics: PerformanceMetrics) -> dict:
    """Generate comprehensive debug report."""
    return {
        "timestamp": datetime.utcnow().isoformat(),
        "performance": metrics.get_stats(),
        "recent_traces": client.get_traces(limit=10),
        "configuration": {
            "base_url": client.base_url,
            "api_key_set": bool(client.api_key),
            "api_key_prefix": client.api_key[:10] + "..." if client.api_key else None
        }
    }

def diagnose_issue(trace: RequestTrace) -> dict:
    """Analyze a trace for common issues."""
    issues = []
    suggestions = []

    # Check duration
    if trace.duration_ms > 30000:
        issues.append("Request took too long (>30s)")
        suggestions.append("Consider shorter duration or simpler prompt")

    # Check status
    if trace.response_status == 401:
        issues.append("Authentication failed")
        suggestions.append("Verify API key is valid and properly formatted")
    elif trace.response_status == 429:
        issues.append("Rate limit exceeded")
        suggestions.append("Implement exponential backoff")
    elif trace.response_status >= 500:
        issues.append("Server error")
        suggestions.append("Retry with backoff, check status page")

    # Check error
    if trace.error:
        if "timeout" in trace.error.lower():
            issues.append("Request timed out")
            suggestions.append("Increase timeout or reduce complexity")

    return {
        "trace_id": trace.trace_id,
        "issues": issues,
        "suggestions": suggestions,
        "severity": "high" if trace.response_status >= 500 else "medium" if issues else "low"
    }
```

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.