Agent skill

Klingai Job Monitoring

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Track and monitor Kling AI video generation task status. An agent skill from jeremylongshore/tons-of-skills-marketplace.

MITAuto-check passedMedia & Creative

Install Klingai Job Monitoring

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill klingai-job-monitoring -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace klingai-job-monitoring --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/klingai-job-monitoring .claude/skills/klingai-job-monitoring && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
klingai-job-monitoring
GitHub stars
2.8k
Token cost
~1.8k tokens
SKILL.md length
265 words
Files
7 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Track and monitor Kling AI video generation task status. An agent skill from jeremylongshore/tons-of-skills-marketplace.

  • Works in 4 steps: Monitor only approved sandbox or… → Verify task ownership, policy/rights… → Pause and cancel queued tasks on stuck… → …
  • Building dashboards
  • SKILL.md covers Overview, Task Lifecycle, Polling a Single Task and Batch Job Tracker, plus 8 more sections
  • Reaches api.klingai.com; needs KLING_ACCESS_KEY and KLING_SECRET_KEY

What it does

Klingai Job Monitoring is an agent skill from jeremylongshore/tons-of-skills-marketplace. Track and monitor Kling AI video generation task status. Use when building dashboards, tracking batch jobs, or debugging stuck tasks. Trigger with phrases like 'klingai job status', 'kling ai monitor', 'track klingai task', 'klingai progress'.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including reference files (for example `references/batch-job-monitoring.md`, `references/dashboard-view.md` and `references/errors.md`). Compatibility notes: Designed for Claude Code

It sits in Media & Creative, covering AI video generation and Background jobs. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Building dashboards
  • Tracking batch jobs
  • Debugging stuck tasks
  • With phrases like klingai job status

Example prompts

  • “klingai job status”
  • “kling ai monitor”
  • “track klingai task”
  • “/klingai-job-monitoring”

Requirements

  • Python 3
  • A credential in KLING_ACCESS_KEY
  • A credential in KLING_SECRET_KEY
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Bash(npm:*), Grep

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Monitor only approved sandbox or production-canary tasks; store task references and aggregate state counts, not prompts, asset URLs, or…
  2. Verify task ownership, policy/rights status, credit consumption, retention, and draft-only routing before any downstream publication step.
  3. Pause and cancel queued tasks on stuck jobs, unexpected cost, policy, rights, scope, or retention drift; remove associated temporary drafts.
  4. Keep a redacted monitoring receipt for the approved window and ensure a named owner can restore the prior queue configuration.

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Bash(npm:*)
    • Grep

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • api.klingai.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • KLING_ACCESS_KEY
    • KLING_SECRET_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Klingai Job Monitoring loads about 1.8k tokens when it runs, and up to ~4.1k if it reads all its reference files. Until then it costs about 67 tokens; SKILL.md has 265 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~67
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 265 words, ~1,784 tokens.

Download SKILL.mdSave it as .claude/skills/klingai-job-monitoring/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
klingai-job-monitoring
description
Track and monitor Kling AI video generation task status. Use when building dashboards, tracking batch jobs, or debugging stuck tasks. Trigger with phrases like 'klingai job status', 'kling ai monitor', 'track klingai task', 'klingai progress'.
allowed-tools
Read, Write, Edit, Bash(npm:*), Grep
compatibility
Designed for Claude Code
version
1.18.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, kling-ai, monitoring, jobs

Kling AI Job Monitoring

Overview

Every Kling AI generation returns a task_id. This skill covers polling strategies, batch tracking, timeout handling, and callback-based monitoring for the /v1/videos/text2video, /v1/videos/image2video, and /v1/videos/video-extend endpoints.

Task Lifecycle

StatusMeaningTypical Duration
submittedQueued for processing0-30s
processingGeneration in progress30-120s (standard), 60-300s (professional)
succeedComplete, video URL availableTerminal
failedGeneration failedTerminal

Polling a Single Task

python
import jwt, time, os, requests

BASE = "https://api.klingai.com/v1"

def get_headers():
    ak, sk = os.environ["KLING_ACCESS_KEY"], os.environ["KLING_SECRET_KEY"]
    token = jwt.encode(
        {"iss": ak, "exp": int(time.time()) + 1800, "nbf": int(time.time()) - 5},
        sk, algorithm="HS256", headers={"alg": "HS256", "typ": "JWT"}
    )
    return {"Authorization": f"Bearer {token}", "Content-Type": "application/json"}

def poll_task(endpoint: str, task_id: str, interval: int = 10, timeout: int = 600):
    """Poll with adaptive interval and timeout."""
    start = time.monotonic()
    attempts = 0
    while time.monotonic() - start < timeout:
        time.sleep(interval)
        attempts += 1
        r = requests.get(f"{BASE}{endpoint}/{task_id}", headers=get_headers(), timeout=30)
        data = r.json()["data"]
        status = data["task_status"]
        elapsed = int(time.monotonic() - start)
        print(f"[{elapsed}s] Poll #{attempts}: {status}")

        if status == "succeed":
            return data["task_result"]
        elif status == "failed":
            raise RuntimeError(f"Task failed: {data.get('task_status_msg', 'unknown')}")

        if attempts > 5:
            interval = min(interval * 1.2, 30)
    raise TimeoutError(f"Task {task_id} timed out after {timeout}s")

Batch Job Tracker

python
from dataclasses import dataclass, field
from datetime import datetime
from typing import Optional

@dataclass
class TrackedTask:
    task_id: str
    endpoint: str
    prompt: str
    status: str = "submitted"
    created_at: float = field(default_factory=time.time)
    result_url: Optional[str] = None
    error_msg: Optional[str] = None

class BatchTracker:
    def __init__(self):
        self.tasks: dict[str, TrackedTask] = {}

    def add(self, task_id, endpoint, prompt):
        self.tasks[task_id] = TrackedTask(task_id=task_id, endpoint=endpoint, prompt=prompt)

    def update_all(self):
        active = [t for t in self.tasks.values() if t.status in ("submitted", "processing")]
        for task in active:
            try:
                r = requests.get(
                    f"{BASE}{task.endpoint}/{task.task_id}",
                    headers=get_headers(), timeout=30
                ).json()
                data = r["data"]
                task.status = data["task_status"]
                if task.status == "succeed":
                    task.result_url = data["task_result"]["videos"][0]["url"]
                elif task.status == "failed":
                    task.error_msg = data.get("task_status_msg")
            except Exception as e:
                print(f"Error polling {task.task_id}: {e}")

    def print_report(self):
        by_status = {}
        for t in self.tasks.values():
            by_status.setdefault(t.status, 0)
            by_status[t.status] += 1
        active = sum(v for k, v in by_status.items() if k in ("submitted", "processing"))
        print(f"\n=== Batch: {len(self.tasks)} tasks, {active} active ===")
        for status, count in sorted(by_status.items()):
            print(f"  {status}: {count}")

Stuck Task Detection

python
def detect_stuck(tracker: BatchTracker, threshold_sec: int = 600):
    """Flag tasks processing longer than threshold."""
    now = time.time()
    stuck = []
    for t in tracker.tasks.values():
        if t.status in ("submitted", "processing"):
            elapsed = now - t.created_at
            if elapsed > threshold_sec:
                stuck.append((t.task_id, int(elapsed)))
    if stuck:
        print(f"WARNING: {len(stuck)} stuck tasks:")
        for tid, secs in stuck:
            print(f"  {tid}: {secs}s")
    return stuck

Batch Monitor Loop

python
tracker = BatchTracker()

# Submit batch
for prompt in prompts:
    r = requests.post(f"{BASE}/videos/text2video", headers=get_headers(), json={
        "model_name": "kling-v2-master", "prompt": prompt, "duration": "5"
    }).json()
    tracker.add(r["data"]["task_id"], "/videos/text2video", prompt)

# Monitor until all complete
while any(t.status in ("submitted", "processing") for t in tracker.tasks.values()):
    time.sleep(15)
    tracker.update_all()
    tracker.print_report()
    detect_stuck(tracker)

Prerequisites

  • An approved job queue, synthetic or rights-cleared briefs, an authorized workspace and credit cap, draft-only destination, policy review, and cancellation/removal owner.

Instructions

  1. Monitor only approved sandbox or production-canary tasks; store task references and aggregate state counts, not prompts, asset URLs, or identities.
  2. Verify task ownership, policy/rights status, credit consumption, retention, and draft-only routing before any downstream publication step.
  3. Pause and cancel queued tasks on stuck jobs, unexpected cost, policy, rights, scope, or retention drift; remove associated temporary drafts.
  4. Keep a redacted monitoring receipt for the approved window and ensure a named owner can restore the prior queue configuration.

Output

Produce a monitoring receipt with environment, aggregate task states, queue limits, credit use, policy/rights/draft-only checks, cancellation outcome, owner, retention/removal proof, and rollback reference. Exclude prompts, assets, and credentials.

Error Handling

ConditionResponse
Stuck or duplicate taskPause the queue, cancel or deduplicate the task, and investigate using redacted metadata only.
Policy, rights, budget, or retention driftCancel affected drafts, remove temporary assets, and require owner review before resuming.

Examples

env=staging; queued=3; completed=2; cancelled=1; budget=within-cap; policy=pass; destination=draft-only; cleanup=verified is a safe queue receipt.

Resources

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (references) in skills/.curated/klingai-job-monitoring of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/batch-job-monitoring.md
  • references/dashboard-view.md
  • references/errors.md
  • references/examples.md
  • references/job-tracker-class.md
  • references/polling-monitor.md

Open the folder on GitHubat commit cfae287

Compare with similar skills

Klingai Job Monitoring next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Klingai Job Monitoring compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Klingai Job Monitoring this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.8kAutomated safety check: PassMIT
Clipmivo VideoBarneyD66/clipmivo-tools142—~945Automated safety check: PassMIT
Generation Request Flowscragnog/HOT-Step-CPP174—~5.4kAutomated safety check: PassMIT
HyperFrames Video Entry Pointheygen-com/hyperframes60k3 repos~5.2kAutomated safety check: PassApache-2.0
Seedance 3D Cgibeshuaxian/higgsfield-seedance2-jineng952—~18kAutomated safety check: PassNone
Cinematic PromptLingyiChen-AI/image-prompts106—~920Automated safety check: PassNone

Similar skills

  • Clipmivo Video

    BarneyD66/clipmivo-tools

    Create and manage AI video tasks through ClipmivoAI using its MCP server, CLI or REST API.

    142 GitHub stars~945 tokensUpdated 25 days ago
    Media & CreativeAuto-check passed
  • Generation Request Flow

    scragnog/HOT-Step-CPP

    Traces the full life of a music generation request (UI form → Node job queue → engine LM → synth → SQLite song row) and every place params can silently drop, especially the LM echo sideband gotcha.

    174 GitHub stars~5.4k tokensUpdated 2 days ago
    Media & CreativeAuto-check passed
  • HyperFrames Video Entry Point

    heygen-com/hyperframes

    Entry point for making, editing and rendering videos from HTML compositions with HyperFrames, routing each request to the right workflow.

    60k GitHub starsUsed in 3 repos~5.2k tokens
    Media & CreativeAuto-check passed
  • Seedance 3D Cgi

    beshuaxian/higgsfield-seedance2-jineng

    Generate 3D CGI and rendered video prompts for Seedance 2.0 on Higgsfield.

    952 GitHub stars~18k tokensUpdated 6 mo ago
    Media & CreativeAuto-check passed
  • Cinematic Prompt

    LingyiChen-AI/image-prompts

    电影级全流程提示词生成。用户给出故事主题,一键生成完整 markdown 文件,包含:角色设定提示词、场景提示词、完整剧本、分镜表、每个分镜的视频生成提示词。支持 Seedance 2.0 / 即梦 / Midjourney / SD。触发词:分镜、提示词、prompt、镜头、脚本、剧本、视频生成、电影风格、Seedance、生成剧本。

    106 GitHub stars~920 tokensUpdated 6 mo ago
    Media & CreativeAuto-check passed
  • ComfyUI Local Driver

    SlavaSexton/ComfyUI-Agent-Kit

    Drives a local ComfyUI install over its HTTP API to generate and edit images, video and audio, with per-model prompt recipes and workflow guidance.

    105 GitHub stars~12k tokensUpdated 1 mo ago
    Media & CreativeAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Questions about Klingai Job Monitoring

What does Klingai Job Monitoring do?

Track and monitor Kling AI video generation task status. An agent skill from jeremylongshore/tons-of-skills-marketplace. Klingai Job Monitoring is an agent skill from jeremylongshore/tons-of-skills-marketplace. Track and monitor Kling AI video generation task status.

When should I use Klingai Job Monitoring?

Klingai Job Monitoring fits situations like: building dashboards; tracking batch jobs; debugging stuck tasks; with phrases like klingai job status.

How do I install Klingai Job Monitoring in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill klingai-job-monitoring -a claude-code`. Or copy the skill folder (skills/.curated/klingai-job-monitoring in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/klingai-job-monitoring in your project. Claude Code loads it when a task matches its description.

How do I install Klingai Job Monitoring in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill klingai-job-monitoring -a codex`. Or copy the skill folder (skills/.curated/klingai-job-monitoring in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/klingai-job-monitoring in your project. Codex loads it when a task matches its description.

Can I use Klingai Job Monitoring in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill klingai-job-monitoring -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/klingai-job-monitoring, .gemini/skills/klingai-job-monitoring, .github/skills/klingai-job-monitoring and .opencode/skills/klingai-job-monitoring in your project.

What does Klingai Job Monitoring need to run?

Going by SKILL.md and its folder, Klingai Job Monitoring needs credentials named KLING_ACCESS_KEY and KLING_SECRET_KEY. Our summary lists: Python 3; A credential in KLING_ACCESS_KEY; A credential in KLING_SECRET_KEY. Its frontmatter pre-approves these tools: Read, Write, Edit, Bash(npm:*), Grep. Compatibility (from SKILL.md): Designed for Claude Code.

Does Klingai Job Monitoring access the network?

SKILL.md names 1 domain. In commands or code: api.klingai.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Klingai Job Monitoring safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Klingai Job Monitoring use?

Klingai Job Monitoring is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Klingai Job Monitoring use?

About 1.8k tokens (SKILL.md is roughly 7.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.4k tokens, read only when the agent opens those files.

What are the alternatives to Klingai Job Monitoring?

Skills that share tags, products or a category with Klingai Job Monitoring: Clipmivo Video (BarneyD66/clipmivo-tools, 142 stars), Generation Request Flow (scragnog/HOT-Step-CPP, 174 stars), HyperFrames Video Entry Point (heygen-com/hyperframes, 60k stars) and Seedance 3D Cgi (beshuaxian/higgsfield-seedance2-jineng, 952 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Klingai Job Monitoring?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.