Agent skill · Audited from source
Klingai Common Errors
skill · jeremylongshore/claude-code-plugins-plus-skillsMIT licenceAudited 9 Oct 2026 · source 4f83675ca38a
Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit 4f83675ca38a and found no filesystem, network or shell access and no hard-coded secrets. What it does: Diagnose and fix common Kling AI API errors. Use when troubleshooting
Cite
Cite this page
ModelsAtlas. “Klingai Common Errors (jeremylongshore/claude-code-plugins-plus-skills)”. Retrieved 9 Oct 2026. https://modelsatlas.com/skills/jeremylongshore/klingai-common-errors
Trust audit
Audit 0.4.1 · source read 9 Oct 2026
SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 17,406 of 18,389 audited skills.
What the source does
- FilesystemNone observedNo reads or writes in the source
- NetworkNone observedNo outbound calls in the source
- ShellNone observedNo commands run in the source
- DependenciesPinnedNothing floats
- SecretsNone foundNo keys in source
Five audit layers
| Layer | What we check | Result | Findings |
|---|---|---|---|
L0 Provenance | Repo owner, licence, archive status, activity | PASS | 0 |
L1 Static source | Secrets, path traversal, supply chain, hidden code | PASS | 0 |
L2 Instructions | Prompt injection, authority framing, hidden directives | PASS | 0 |
L3 Inventory | The files and declarations match the source | PASS | 0 |
L4 Sandbox | Run in isolation and watch behaviour | SKIPPED why | 0 |
Gates applied: no behavioural pass.
Findings (0)
No findings at any severity. We re-audit when the source changes.
Audit 0.4.1 · source sha 4f83675ca38a · 9 Oct 2026Report an issue or request a re-scan
Provenance
Who published it, and what the verdict is pinned to
- Publisherjeremylongshore GitHub userOwner of the repository this skill is read from
- Source folderjeremylongshore/claude-code-plugins-plus-skills/plugins/saas-packs/klingai-pack/skills/klingai-common-errorsThe exact folder we audited
- LicenceMITAs the repository states it
- Commit pinned for this verdict4f83675ca38aA new audit runs when the source changes
- Repository statusNot archivedPushed today
- Sandboxed runNot runSkills are read, not executed; layer L4 is skipped
What it tells the agent
Full source on GitHub ↗Its description: Diagnose and fix common Kling AI API errors. Use when troubleshooting
--- name: klingai-common-errors description: 'Diagnose and fix common Kling AI API errors. Use when troubleshooting failed video generation or API issues. Trigger with phrases like ''kling ai error'', ''klingai not working'', ''fix klingai'', ''klingai failed''. ' allowed-tools: Read, Write, Edit, Bash(npm:*), Grep version: 1.18.0 license: MIT author: Jeremy Longshore <[email protected]> tags: - saas - kling-ai - debugging - errors compatibility: Designed for Claude Code --- # Kling AI Common Errors ## Overview Complete error reference for the Kling AI API. Covers HTTP status codes, task-level failures, JWT issues, and generation-specific problems with tested solutions. ## HTTP Error Codes | Code | Error | Cause | Solution | |------|-------|-------|----------| | `400` | Bad Request | Invalid parameters, malformed JSON | Validate all required fields; check `model_name` is valid | | `401` | Unauthorized | Invalid/expired JWT token | Regenerate JWT; verify AK/SK; check `exp` claim | | `402` | Payment Required | Insufficient credits | Top up API resource pack or subscription | | `403` | Forbidden | Content policy violation or API disabled | Review prompt against content policy; enable API access | | `404` | Not Found | Invalid task_id or wrong endpoint | Verify task_id; check endpoint path spelling | | `429` | Too Many Requests | Rate limit exceeded | Implement exponential backoff (see pattern below) | | `500` | Internal Server Error | Kling platform issue | Retry after 30s; if persistent, check status page | | `502` | Bad Gateway | Upstream service unavailable | Retry with backoff; typically transient | | `503` | Service Unavailable | System maintenance | Wait and retry; check announcements | ## Task-Level Failures When HTTP returns `200` but `task_status` is `"failed"`: | `task_status_msg` | Cause | Solution | |-------------------|-------|----------| | Content policy violation | Prompt contains restricted content | Remove violent, adult, or copyrighted references | | Image quality too low | Source image is blurry or too small | Use image >= 300x300px, clear and sharp | | Prompt too complex | Too many scene elements | Simplify to 1-2 subjects, clear action | | Generation timeout | Internal processing exceeded limit | Retry; reduce duration from 10s to 5s | | Invalid image format | Unsupported file type | Use JPG, PNG, or WebP | | Mask dimension mismatch | Mask size differs from source | Ensure mask matches source image dimensions exactly | ## JWT Authentication Errors ### Problem: `401` on every request ```python # WRONG — missing headers parameter token = jwt.encode(payload, sk, algorithm="HS256") # CORRECT — include explicit headers token = jwt.encode(payload, sk, algorithm="HS256", headers={"alg": "HS256", "typ": "JWT"}) ``` ### Problem: Token works then fails after 30 min ```python # WRONG — token generated once at import time TOKEN = generate_token() # CORRECT — refresh before expiry class TokenManager: def __init__(self, ak, sk): self.ak, self.sk = ak, sk self._token = None self._exp = 0 @property def token(self): if time.time() >= self._exp - 300: # 5 min buffer payload = {"iss": self.ak, "exp": int(time.time()) + 1800, "nbf": int(time.time()) - 5} self._token = jwt.encode(payload, self.sk, algorithm="HS256", headers={"alg": "HS256", "typ": "JWT"}) self._exp = int(time.time()) + 1800 return self._token ``` ## Rate Limit Handling ```python import time import requests def request_with_backoff(method, url, headers, json=None, max_retries=5): """Retry with exponential backoff on 429 and 5xx errors.""" for attempt in range(max_retries): response = method(url, headers=headers, json=json) if response.status_code == 429: retry_after = int(response.headers.get("Retry-After", 2 ** attempt)) print(f"Rate limited. Retrying in {retry_after}s...") time.sleep(retry_after) continue elif response.status_code >= 500: wait = 2 ** attempt print(f"Server error {response.status_code}. Retrying in {wait}s...") time.sleep(wait) continue response.raise_for_status() return response raise RuntimeError(f"Max retries ({max_retries}) exceeded") ``` ## Diagnostic Checklist When a generation fails, check in order: 1. **Auth valid?** — Test with a simple GET request first 2. **Credits available?** — Check balance in developer console 3. **Model valid?** — Verify `model_name` matches catalog exactly 4. **Parameters valid?** — `duration` must be `"5"` or `"10"` (string, not int) 5. **Prompt clean?** — Remove special characters, keep under 2500 chars 6. **Image accessible?** — For I2V, verify image URL is publicly accessible 7. **Feature exclusivity?** — `image_tail`, `dynamic_masks`, and `camera_control` are mutually exclusive ## Debug Logging ```python import logging logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger("kling") def debug_request(method, url, headers, json=None): """Log request/response for debugging.""" logger.debug(f"→ {method.__name__.upper()} {url}") logger.debug(f"→ Body: {json}") r = method(url, headers=headers, json=json) logger.debug(f"← Status: {r.status_code}") logger.debug(f"← Body: {r.text[:500]}") return r ``` ## Prerequisites - A sandbox workspace, synthetic or rights-cleared diagnostic brief, secret references, approved scope, redaction rules, draft-only destination, and incident owner. ## Instructions 1. Reproduce errors with sandbox fixtures only; do not log authorization headers, prompts, source assets, response bodies, or generated asset URLs. 2. Capture aggregate status, error class, credit use, policy/rights outcome, and task state while verifying redaction and retention contr
Excerpt, first 6,000 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.
Install
Pinned to the audited commit 4f83675
git clone https://github.com/jeremylongshore/claude-code-plugins-plus-skills git -C claude-code-plugins-plus-skills checkout 4f83675ca38a
The author documents no install command, so this uses the repository directly. Our verdict covers commit 4f83675ca38a only.
Works in which agents?
What its own text says, not a test
| Agent | Status | More |
|---|---|---|
| Claude Code | Mentioned in its text, not tested | Skills for Claude Code · About Claude Code |
Audit history
Every audit, every source change
- ✓SAFE B 89 / 100
first audit · source
4f83675ca38a
README badge
For maintainers · shows the latest audit
[](https://modelsatlas.com/skills/jeremylongshore/klingai-common-errors/)
The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.
Similar skills
jeremylongshore/claude-code-plugins-plus
Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.
jeremylongshore/claude-code-plugins-plus
Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.
jeremylongshore/claude-code-plugins-plus
Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.
jeremylongshore/claude-code-plugins-plus
Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.
jeremylongshore/claude-code-plugins-plus
Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.
jeremylongshore/claude-code-plugins-plus
Deploy and orchestrate Vertex AI ADK agents using A2A protocol. Manages
Add this badge to your README
[](https://modelsatlas.com/skills/jeremylongshore/klingai-common-errors/)
<a href="https://modelsatlas.com/skills/jeremylongshore/klingai-common-errors/"><img src="https://modelsatlas.com/skills/jeremylongshore/klingai-common-errors/badge.svg" alt="ModelsAtlas: SAFE B"></a>
Questions about Klingai Common Errors
What does the Klingai Common Errors skill do?
Is Klingai Common Errors safe to install?
What can Klingai Common Errors access on my machine?
Which assistants does Klingai Common Errors work with?
How current is this page?
Sources
- github.com/jeremylongshore/claude-code-plugins-plus-skills/tree/ — the audited source at commit 4f83675ca38a and every finding aboveObserved · 9 Oct 2026
Spotted something wrong? Report a correction · Methodology
Keep going in your AI
Opens with this page as the source. We add nothing else to the prompt.
- What does the Klingai Common Errors skill do?
- Is Klingai Common Errors safe to install?
- What can Klingai Common Errors access on my machine?