Install any skill in seconds. Free to start, no credit card required.
Get Started Free →jeremylongshore/klingai-debug-bundle
Set up logging and debugging for Kling AI API integrations.
Passed 18 of 23 test cases with the skill, and 9 of 23 without it.
and 9 more in the full report
9 fixed9 passed either way5 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 9 test cases the skill fixed. Same model, same prompt, with and without the skill.
In the Kling AI task inspector helper, if a task status is failed but task_status_msg is missing from the server payload, what fallback error message string should be printed?
| Checked | Without skill | With skill |
|---|---|---|
| Prints fallback message No message when status message key is missing. | Missed | Passed |
The instructions your model reads when the skill loads.
Structured logging, request tracing, and diagnostic tools for Kling AI API integrations. Captures request/response pairs, task lifecycle events, and timing metrics for every call to https://api.klingai.com/v1.
import jwt, time, os, requests, logging, json
from datetime import datetime
logging.basicConfig(
level=logging.DEBUG,
format="%(asctime)s [%(levelname)s] %(name)s: %(message)s"
)
logger = logging.getLogger("kling.debug")
class KlingDebugClient:
"""Kling AI client with full request/response logging."""
BASE = "https://api.klingai.com/v1"
def __init__(self):
self.ak = os.environ["KLING_ACCESS_KEY"]
self.sk = os.environ["KLING_SECRET_KEY"]
self._request_log = []
def _get_headers(self):
token = jwt.encode(
{"iss": self.ak, "exp": int(time.time()) + 1800, "nbf": int(time.time()) - 5},
self.sk, algorithm="HS256", headers={"alg": "HS256", "typ": "JWT"}
)
return {"Authorization": f"Bearer {token}", "Content-Type": "application/json"}
def _traced_request(self, method, path, body=None):
"""Execute request with full tracing."""
url = f"{self.BASE}{path}"
start = time.monotonic()
trace = {
test cases passed, vs 9 / 23 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.