klingai-prod-checklist
Essential pre-launch checklist for Kling AI integrations, covering error handling, budget controls, and reliable deployment practices.
Install
mkdir -p .claude/skills/klingai-prod-checklist && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/6859" && unzip -o skill.zip -d .claude/skills/klingai-prod-checklist && rm skill.zipInstalls to .claude/skills/klingai-prod-checklist
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Production readiness checklist for Kling AI integrations. Use beforeKey capabilities
- →Validate authentication and API key storage
- →Configure exponential backoff and retry logic
- →Monitor credit consumption and budget alerts
- →Implement stuck task detection and error handling
- →Verify production deployment configurations
How it works
The skill provides a checklist and code patterns to ensure Kling AI integrations handle errors, manage costs, and maintain service stability under production load.
Inputs & outputs
When to use klingai-prod-checklist
- →Implementing credit budget alerts
- →Configuring retry logic for API stability
- →Setting up production monitoring
- →Validating deployment configurations
About this skill
Kling AI Production Checklist
Overview
Checklist covering authentication, error handling, cost controls, monitoring, security, and content policy before deploying Kling AI video generation to production.
Authentication
- AK/SK stored in secrets manager (not
.envin repo) - JWT auto-refresh with 5-min buffer before 30-min expiry
- Separate API keys per environment (dev/staging/prod)
- Key rotation schedule (quarterly minimum)
-
Authorization: Bearer <token>format verified
Error Handling
- HTTP 400/401/402/403/429/5xx all handled
- Exponential backoff with jitter for 429/5xx retries
- Max retry limit set (3-5, not infinite)
-
task_status: "failed"logstask_status_msg - 30s timeout on all HTTP calls
-
durationsent as string"5"not integer5
Cost Controls
- Daily credit budget enforced in code
- Alert at 80% daily budget consumption
-
standardmode used for non-final renders - Max poll attempts cap (no infinite loops)
- Credit estimate before batch submission
# Pre-batch credit check
credits_needed = len(prompts) * 10 # 10 credits per 5s standard
if credits_needed > DAILY_BUDGET:
raise RuntimeError(f"Batch needs {credits_needed}, budget is {DAILY_BUDGET}")
Task Management
- All task_ids logged with timestamp
- Stuck task detection (>10 min in processing)
-
callback_urlused instead of polling in production - Failed tasks queued for retry
- Video URLs downloaded promptly (Kling CDN URLs expire)
Content Safety
- Prompts validated before API submission
- User-generated prompts sanitized
- Default negative prompt includes safety terms
- Content moderation on user-facing apps
- Policy violation errors handled gracefully
Security
- API keys never logged (redacted in debug output)
- Video URLs treated as temporary (store on own CDN)
- Webhook endpoints HTTPS-only
- Rate limiting on your API layer
- No sensitive data in prompt strings
Monitoring
- API latency tracked per endpoint
- Success/failure rate dashboard
- Credit consumption metrics
- Alert on >5% failure rate
- Structured JSON logs for all API calls
Performance
- Connection pooling via
requests.Session() - Concurrent tasks within API tier limit
- Video downloads async/background
- Generated videos CDN-cached
# Connection pooling
session = requests.Session()
adapter = requests.adapters.HTTPAdapter(pool_connections=5, pool_maxsize=10)
session.mount("https://", adapter)
Pre-Launch Smoke Test
from kling_client import KlingClient
c = KlingClient()
result = c.text_to_video("test: blue sky with clouds", duration=5, mode="standard")
assert result["videos"][0]["url"], "No video URL"
print("READY FOR PRODUCTION")
Resources
When not to use it
- →Development environments without production constraints
- →Non-Kling AI video generation integrations
Prerequisites
Limitations
- →Requires manual verification of checklist items
- →CDN URLs for videos are temporary and require local storage
How it compares
It provides a structured, domain-specific checklist for Kling AI rather than generic deployment best practices.
Compared to similar skills
klingai-prod-checklist side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| klingai-prod-checklist (this skill) | 1 | 27d | Review | Intermediate |
| mlflow | 3 | 7mo | Review | Intermediate |
| sentry-rate-limits | 1 | 27d | Caution | Intermediate |
| optimizing-performance | 1 | 2mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by jeremylongshore
View all by jeremylongshore →You might also like
mlflow
davila7
Track ML experiments, manage model registry with versioning, deploy models to production, and reproduce experiments with MLflow - framework-agnostic ML lifecycle platform
sentry-rate-limits
jeremylongshore
Manage Sentry rate limits and quota optimization. Use when hitting rate limits, optimizing event volume, or managing Sentry costs. Trigger with phrases like "sentry rate limit", "sentry quota", "reduce sentry events", "sentry 429".
optimizing-performance
CloudAI-X
Analyzes and optimizes application performance across frontend, backend, and database layers. Use when diagnosing slowness, improving load times, optimizing queries, reducing bundle size, or when asked about performance issues.
openrouter-performance-tuning
jeremylongshore
Optimize OpenRouter performance and latency. Use when reducing response times or improving throughput. Trigger with phrases like 'openrouter performance', 'openrouter latency', 'speed up openrouter', 'openrouter optimization'.
azure-monitor-opentelemetry-py
microsoft
Azure Monitor OpenTelemetry Distro for Python. Use for one-line Application Insights setup with auto-instrumentation. Triggers: "azure-monitor-opentelemetry", "configure_azure_monitor", "Application Insights", "OpenTelemetry distro", "auto-instrumentation".
genkit-production-expert
jeremylongshore
Build production Firebase Genkit applications including RAG systems, multi-step flows, and tool calling for Node.js/Python/Go. Deploy to Firebase Functions or Cloud Run with AI monitoring. Use when asked to "create genkit flow" or "implement RAG". Trigger with relevant phrases based on skill purpose.