Agent skill

Klingai Video Extension

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

Extend video duration using Kling AI continuation. An agent skill from jeremylongshore/tons-of-skills-marketplace.

MITAuto-check passedMedia & Creative

Install Klingai Video Extension

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

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

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace klingai-video-extension --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-video-extension .claude/skills/klingai-video-extension && 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-video-extension
GitHub stars
2.8k
Token cost
~1.8k tokens
SKILL.md length
319 words
Files
6 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Extend video duration using Kling AI continuation. An agent skill from jeremylongshore/tons-of-skills-marketplace.

  • Works in 4 steps: Confirm source ownership, completion… → Submit one watermarked draft canary… → Halt on continuity, policy, rights, or… → …
  • Creating longer videos from shorter clips
  • SKILL.md covers Overview, Request Parameters, Basic Extension and Chain Multiple Extensions, plus 8 more sections
  • Reaches api.klingai.com; needs KLING_ACCESS_KEY and KLING_SECRET_KEY

What it does

Klingai Video Extension is an agent skill from jeremylongshore/tons-of-skills-marketplace. Extend video duration using Kling AI continuation. Use when creating longer videos from shorter clips or building sequences. Trigger with phrases like 'klingai extend video', 'kling ai video continuation', 'klingai longer video', 'extend klingai clip'.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `references/errors.md`, `references/examples.md` and `references/seamless-loop-creation.md`). Compatibility notes: Designed for Claude Code

It sits in Media & Creative, covering AI video generation. 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

  • Creating longer videos from shorter clips
  • Building sequences
  • With phrases like klingai extend video
  • Kling ai video continuation

Example prompts

  • “klingai extend video”
  • “kling ai video continuation”
  • “klingai longer video”
  • “/klingai-video-extension”

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. Confirm source ownership, completion state, and approved continuity brief before creating an extension; do not use private, unlicensed, or…
  2. Submit one watermarked draft canary within the approved duration and credit cap, then verify policy, rights, quality, and destination…
  3. Halt on continuity, policy, rights, or budget drift and delete the extension task instead of publishing it.
  4. Promote only after owner approval; retain a redacted receipt and remove temporary assets at the agreed retention boundary.

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 Video Extension loads about 1.8k tokens when it runs, and up to ~4k if it reads all its reference files. Until then it costs about 69 tokens; SKILL.md has 319 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~69
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
~4k

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). 319 words, ~1,791 tokens.

Download SKILL.mdSave it as .claude/skills/klingai-video-extension/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
klingai-video-extension
description
Extend video duration using Kling AI continuation. Use when creating longer videos from shorter clips or building sequences. Trigger with phrases like 'klingai extend video', 'kling ai video continuation', 'klingai longer video', 'extend klingai clip'.
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, video-extension, continuation

Kling AI Video Extension

Overview

Extend an existing video by appending additional seconds. The extension endpoint takes the task_id of a completed video and generates a seamless continuation.

Endpoint: POST https://api.klingai.com/v1/videos/video-extend

Request Parameters

ParameterTypeRequiredDescription
task_idstringYesTask ID of the completed source video
promptstringNoMotion/scene description for extension
durationstringNoExtension length: "5" (default)
modestringNo"standard" or "professional"
model_namestringNoDefault: "kling-v2-master"
callback_urlstringNoWebhook for completion

Basic Extension

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"}

# Step 1: Generate the initial 5s video
initial = requests.post(f"{BASE}/videos/text2video", headers=get_headers(), json={
    "model_name": "kling-v2-master",
    "prompt": "A rocket launching from a desert landscape, cinematic",
    "duration": "5",
    "mode": "standard",
}).json()
initial_task_id = initial["data"]["task_id"]

# Wait for completion...
# (poll until task_status == "succeed")

# Step 2: Extend by 5 more seconds
extension = requests.post(f"{BASE}/videos/video-extend", headers=get_headers(), json={
    "task_id": initial_task_id,
    "prompt": "The rocket ascends through clouds into the stratosphere",
    "duration": "5",
    "mode": "standard",
}).json()
ext_task_id = extension["data"]["task_id"]

# Step 3: Poll extension task
while True:
    time.sleep(15)
    result = requests.get(
        f"{BASE}/videos/video-extend/{ext_task_id}", headers=get_headers()
    ).json()
    if result["data"]["task_status"] == "succeed":
        extended_url = result["data"]["task_result"]["videos"][0]["url"]
        print(f"Extended video: {extended_url}")
        break
    elif result["data"]["task_status"] == "failed":
        print(f"Failed: {result['data']['task_status_msg']}")
        break

Chain Multiple Extensions

python
def chain_extensions(initial_task_id: str, prompts: list[str],
                     duration: str = "5", mode: str = "standard") -> list[str]:
    """Chain multiple extensions to build a longer video."""
    current_task_id = initial_task_id
    video_urls = []

    for i, prompt in enumerate(prompts):
        print(f"Extension {i + 1}/{len(prompts)}: submitting...")

        # Submit extension
        r = requests.post(f"{BASE}/videos/video-extend", headers=get_headers(), json={
            "task_id": current_task_id,
            "prompt": prompt,
            "duration": duration,
            "mode": mode,
        }).json()
        ext_task_id = r["data"]["task_id"]

        # Poll for completion
        while True:
            time.sleep(15)
            result = requests.get(
                f"{BASE}/videos/video-extend/{ext_task_id}", headers=get_headers()
            ).json()
            status = result["data"]["task_status"]

            if status == "succeed":
                url = result["data"]["task_result"]["videos"][0]["url"]
                video_urls.append(url)
                current_task_id = ext_task_id  # next extension chains from this
                print(f"Extension {i + 1} complete: {url}")
                break
            elif status == "failed":
                raise RuntimeError(f"Extension {i + 1} failed: {result['data']['task_status_msg']}")

    return video_urls

Usage: Build a 20-Second Video

python
# Generate initial 5s
initial_r = requests.post(f"{BASE}/videos/text2video", headers=get_headers(), json={
    "model_name": "kling-v2-master",
    "prompt": "Morning sunrise over a mountain lake, mist rising",
    "duration": "5",
    "mode": "standard",
}).json()
initial_id = initial_r["data"]["task_id"]
# ... poll until complete ...

# Chain 3 more extensions = 5 + 5 + 5 + 5 = 20 seconds total
extensions = chain_extensions(initial_id, [
    "Sun rises higher, birds begin flying across the lake",
    "A deer approaches the water's edge to drink",
    "Wide shot pulling back to reveal the full mountain range",
])

Cost

Each extension costs the same as a new generation:

Extension DurationStandardProfessional
5 seconds10 credits35 credits

A 20-second video (initial + 3 extensions) costs 40 credits in standard mode.

Error Handling

ErrorCauseFix
Invalid task_idSource task doesn't existVerify task_id is from a completed generation
Source not completeExtending a task still processingWait for source task to reach succeed status
Extension failedPrompt conflict with sourceAlign extension prompt with original scene

Prerequisites

  • A completed, rights-cleared or synthetic source draft, approved extension brief, authorized workspace and credit budget, policy review, draft-only destination, and a rollback/removal owner.

Instructions

  1. Confirm source ownership, completion state, and approved continuity brief before creating an extension; do not use private, unlicensed, or policy-restricted material.
  2. Submit one watermarked draft canary within the approved duration and credit cap, then verify policy, rights, quality, and destination controls.
  3. Halt on continuity, policy, rights, or budget drift and delete the extension task instead of publishing it.
  4. Promote only after owner approval; retain a redacted receipt and remove temporary assets at the agreed retention boundary.

Output

Produce an extension receipt with source task reference, rights classification, mode/duration, credit estimate, policy review, draft destination, approver, retention/removal reference, and task ID. Exclude prompts, identities, and asset URLs.

Examples

source=synthetic-task-42; rights=cleared; duration=5s; mode=standard; policy=pass; destination=draft-only; cleanup=24h is safe for review.

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 5 other files (references) in skills/.curated/klingai-video-extension of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/errors.md
  • references/examples.md
  • references/seamless-loop-creation.md
  • references/video-concatenation.md
  • references/video-extension-implementation.md

Open the folder on GitHubat commit cfae287

Compare with similar skills

Klingai Video Extension 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 Video Extension compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Klingai Video Extension this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.8kAutomated safety check: PassMIT
Video Generationbytedance/deer-flow84k3 repos~1.4kAutomated safety check: PassMIT
Video Cover Imageitwanger/toBeBetterJavaer18k—~3.3kAutomated safety check: PassNone
Seedancesongguoxs/seedance-prompt-skill2.9k1 repos~2.5kAutomated safety check: PassNone
HyperFrames Video Entry Pointheygen-com/hyperframes60k3 repos~5.2kAutomated safety check: PassApache-2.0
Lanshu Create AI Presenter Videocclank/lanshu-create-ai-presenter-video2.6k—~3.6kAutomated safety check: PassMIT

Similar skills

  • Video Generation

    bytedance/deer-flow

    Generates short videos from a structured JSON prompt, optionally guided by a reference image used as the first or last frame.

    84k GitHub starsUsed in 3 repos~1.4k tokens
    Media & CreativeAuto-check passed
  • Video Cover Image

    itwanger/toBeBetterJavaer

    Generate matched 3:4, 16:9, and 4:3 short-video cover images from toBeBetterJavaer video scripts or AI/Java technical topics.

    18k GitHub stars~3.3k tokensUpdated yesterday
    Media & CreativeAuto-check passed
  • Seedance

    songguoxs/seedance-prompt-skill

    This skill should be used when the user asks to "generate video prompts", "create Seedance prompts", "write video descriptions", mentions "Seedance", "seedance", "即梦", "即梦平台", "视频提示词", "视频生成"…

    2.9k GitHub starsUsed in 1 repo~2.5k tokens
    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
  • Lanshu Create AI Presenter Video

    cclank/lanshu-create-ai-presenter-video

    Turn a topic or finished script into a complete, publish-ready explainer video — led by an AI presenter from an authorized adult presenter image, or performed in one of nine visual explainer styles…

    2.6k GitHub stars~3.6k tokensUpdated today
    Media & CreativeAuto-check passed
  • Video Shots

    eternityspring/reelbench-skills

    拉片:把一条成片拆成逐镜头的分析表——每个镜头的时长、景别、类别、运镜、画面. An agent skill from eternityspring/reelbench-skills.

    878 GitHub starsUsed in 1 repo~1.8k tokens
    Media & CreativeAuto-check: notes

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 Video Extension

What does Klingai Video Extension do?

Extend video duration using Kling AI continuation. An agent skill from jeremylongshore/tons-of-skills-marketplace. Klingai Video Extension is an agent skill from jeremylongshore/tons-of-skills-marketplace. Extend video duration using Kling AI continuation.

When should I use Klingai Video Extension?

Klingai Video Extension fits situations like: creating longer videos from shorter clips; building sequences; with phrases like klingai extend video; kling ai video continuation.

How do I install Klingai Video Extension in Claude Code?

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

How do I install Klingai Video Extension in Codex?

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

Can I use Klingai Video Extension 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-video-extension -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-video-extension, .gemini/skills/klingai-video-extension, .github/skills/klingai-video-extension and .opencode/skills/klingai-video-extension in your project.

What does Klingai Video Extension need to run?

Going by SKILL.md and its folder, Klingai Video Extension 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 Video Extension 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 Video Extension 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 Video Extension use?

Klingai Video Extension 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 Video Extension use?

About 1.8k tokens (SKILL.md is roughly 7.2k 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.3k tokens, read only when the agent opens those files.

What are the alternatives to Klingai Video Extension?

Skills that share tags, products or a category with Klingai Video Extension: Video Generation (bytedance/deer-flow, 84k stars), Video Cover Image (itwanger/toBeBetterJavaer, 18k stars), Seedance (songguoxs/seedance-prompt-skill, 2.9k stars) and HyperFrames Video Entry Point (heygen-com/hyperframes, 60k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Klingai Video Extension?

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.