Agent skill

Klingai CI Integration

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

Integrate Kling AI video generation into CI/CD pipelines. An agent skill from jeremylongshore/tons-of-skills-marketplace.

MITAuto-check passedDevOps & Cloud

Install Klingai CI Integration

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

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

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

At a glance

Integrate Kling AI video generation into CI/CD pipelines. An agent skill from jeremylongshore/tons-of-skills-marketplace.

  • Works in 5 steps: Validate the workflow and prompt… → Load credentials only from masked CI… → Submit a single sandbox canary first.… → …
  • Automating video content in GitHub Actions
  • SKILL.md covers Overview, GitHub Actions Workflow, CI Generation Script and Batch from YAML Config, plus 8 more sections
  • Reaches api.klingai.com; needs KLING_ACCESS_KEY and KLING_SECRET_KEY

What it does

Klingai CI Integration is an agent skill from jeremylongshore/tons-of-skills-marketplace. Integrate Kling AI video generation into CI/CD pipelines. Use when automating video content in GitHub Actions or GitLab CI. Trigger with phrases like 'klingai ci', 'kling ai github actions', 'klingai automation', 'automated video generation'.

Its SKILL.md is about 2.1k 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-generation-from-file.md`, `references/errors.md` and `references/examples.md`). Compatibility notes: Designed for Claude Code

It sits in DevOps & Cloud, covering CI/CD and AI video generation. It works with GitHub Actions and GitLab. 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

  • Automating video content in GitHub Actions
  • With phrases like klingai ci
  • Kling ai github actions
  • Klingai automation

Example prompts

  • “klingai ci”
  • “kling ai github actions”
  • “klingai automation”
  • “/klingai-ci-integration”

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

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

  1. Validate the workflow and prompt manifest before any API call: require a synthetic/rights-cleared fixture identifier, approved model and…
  2. Load credentials only from masked CI secrets, run a policy and consent check, and use a stable manifest hash to prevent duplicate…
  3. Submit a single sandbox canary first. Assert that output remains private and watermarked, that no source or prompt is echoed into logs…
  4. Require an owner approval artifact before promotion. Publish by immutable output digest to the allowlisted bucket; do not publish directly…
  5. On cancellation, policy rejection, budget breach, or failed verification, fail the job closed, revoke temporary access, delete staged…

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 yaml and 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

    Also links to:

    • docs.github.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 CI Integration loads about 2.1k tokens when it runs, and up to ~4.6k if it reads all its reference files. Until then it costs about 66 tokens; SKILL.md has 466 words of instructions outside code blocks.

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

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). 466 words, ~2,131 tokens.

Download SKILL.mdSave it as .claude/skills/klingai-ci-integration/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
klingai-ci-integration
description
Integrate Kling AI video generation into CI/CD pipelines. Use when automating video content in GitHub Actions or GitLab CI. Trigger with phrases like 'klingai ci', 'kling ai github actions', 'klingai automation', 'automated video generation'.
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, ci-cd, automation

Kling AI CI Integration

Overview

Automate video generation in CI/CD pipelines. Common use cases: generate product demos on release, create marketing videos from prompts in a YAML file, regression-test video quality across model versions.

GitHub Actions Workflow

yaml
# .github/workflows/generate-videos.yml
name: Generate Videos
on:
  workflow_dispatch:
    inputs:
      prompt:
        description: "Video prompt"
        required: true
      model:
        description: "Model version"
        default: "kling-v2-master"

jobs:
  generate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: actions/setup-python@v5
        with:
          python-version: "3.11"

      - name: Install dependencies
        run: pip install PyJWT requests

      - name: Generate video
        env:
          KLING_ACCESS_KEY: ${{ secrets.KLING_ACCESS_KEY }}
          KLING_SECRET_KEY: ${{ secrets.KLING_SECRET_KEY }}
        run: |
          python3 scripts/generate-video.py \
            --prompt "${{ inputs.prompt }}" \
            --model "${{ inputs.model }}" \
            --output output/

      - name: Upload artifact
        uses: actions/upload-artifact@v4
        with:
          name: generated-video
          path: output/*.mp4
          retention-days: 7

CI Generation Script

python
#!/usr/bin/env python3
"""scripts/generate-video.py -- CI-friendly video generation."""
import argparse
import jwt
import time
import os
import requests
import sys

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 main():
    parser = argparse.ArgumentParser()
    parser.add_argument("--prompt", required=True)
    parser.add_argument("--model", default="kling-v2-master")
    parser.add_argument("--duration", default="5")
    parser.add_argument("--mode", default="standard")
    parser.add_argument("--output", default="output/")
    parser.add_argument("--timeout", type=int, default=600)
    args = parser.parse_args()

    os.makedirs(args.output, exist_ok=True)

    # Submit
    r = requests.post(f"{BASE}/videos/text2video", headers=get_headers(), json={
        "model_name": args.model,
        "prompt": args.prompt,
        "duration": args.duration,
        "mode": args.mode,
    })
    r.raise_for_status()
    task_id = r.json()["data"]["task_id"]
    print(f"Task submitted: {task_id}")

    # Poll
    start = time.monotonic()
    while time.monotonic() - start < args.timeout:
        time.sleep(15)
        result = requests.get(
            f"{BASE}/videos/text2video/{task_id}", headers=get_headers()
        ).json()
        status = result["data"]["task_status"]
        elapsed = int(time.monotonic() - start)
        print(f"[{elapsed}s] Status: {status}")

        if status == "succeed":
            video_url = result["data"]["task_result"]["videos"][0]["url"]
            filepath = os.path.join(args.output, f"{task_id}.mp4")
            with open(filepath, "wb") as f:
                f.write(requests.get(video_url).content)
            print(f"Saved: {filepath}")
            return

        if status == "failed":
            print(f"FAILED: {result['data'].get('task_status_msg')}", file=sys.stderr)
            sys.exit(1)

    print("TIMEOUT: generation did not complete", file=sys.stderr)
    sys.exit(1)

if __name__ == "__main__":
    main()

Batch from YAML Config

yaml
# video-prompts.yml
videos:
  - name: product-hero
    prompt: "Sleek laptop floating in space with particle effects"
    model: kling-v2-6
    mode: professional
  - name: feature-demo
    prompt: "Dashboard interface morphing between screens"
    model: kling-v2-5-turbo
    mode: standard
python
import yaml

with open("video-prompts.yml") as f:
    config = yaml.safe_load(f)

for video in config["videos"]:
    task_id = submit_async(video["prompt"], model=video["model"])
    print(f"{video['name']}: {task_id}")

GitLab CI

yaml
# .gitlab-ci.yml
generate-video:
  image: python:3.11-slim
  stage: build
  script:
    - pip install PyJWT requests
    - python3 scripts/generate-video.py --prompt "$VIDEO_PROMPT" --output output/
  artifacts:
    paths:
      - output/*.mp4
    expire_in: 7 days
  variables:
    KLING_ACCESS_KEY: $KLING_ACCESS_KEY
    KLING_SECRET_KEY: $KLING_SECRET_KEY

Secret Management

PlatformStore AK/SK in
GitHub ActionsRepository Secrets
GitLab CICI/CD Variables (masked)
AWS CodeBuildParameter Store / Secrets Manager
GCP Cloud BuildSecret Manager

Never put API keys in the workflow YAML or commit them to the repo.

Prerequisites

  • A CI environment with Python 3.11+, pinned dependencies, a secret-manager-backed Kling credential, and an explicit per-run credit and concurrency budget.
  • A repository-controlled model, duration, destination, and content-policy allowlist. CI fixtures must be synthetic or rights-cleared; never use customer media or real-person likenesses in unattended jobs.
  • A private artifact bucket, short retention period, and an approval gate. Automated jobs produce draft, watermarked media only until a named owner approves promotion.

Instructions

  1. Validate the workflow and prompt manifest before any API call: require a synthetic/rights-cleared fixture identifier, approved model and duration, permitted destination, and a nonzero but bounded budget.
  2. Load credentials only from masked CI secrets, run a policy and consent check, and use a stable manifest hash to prevent duplicate submissions on retries.
  3. Submit a single sandbox canary first. Assert that output remains private and watermarked, that no source or prompt is echoed into logs, and that the run has not exceeded its credit or concurrency budget.
  4. Require an owner approval artifact before promotion. Publish by immutable output digest to the allowlisted bucket; do not publish directly from a provider URL.
  5. On cancellation, policy rejection, budget breach, or failed verification, fail the job closed, revoke temporary access, delete staged artifacts, and restore the prior release manifest. Retain only a redacted receipt.
Show full SKILL.md (164 more words)Show less

Output

The job should emit a machine-readable receipt with the run and manifest digests, model, environment, canary status, policy and rights checks, budget usage, approval status, artifact digest, retention deadline, and rollback reference. CI logs may contain task status and timings, but must exclude credentials, source URLs, prompts, face or contact data, and raw provider responses.

Error Handling

Treat authentication failures, policy rejections, unavailable source fixtures, quota or budget errors, and provider timeouts as non-publish failures. Retry only bounded, idempotent polling or transient transport errors; never retry a rejected prompt or blindly resubmit a billable generation. Mark the run for owner review when the provider returns an unknown status, quarantine all artifacts, and use the previous approved manifest for rollback.

Examples

A safe dispatch manifest can be represented as:

yaml
fixture: synthetic-product-v4
rights: cleared-for-internal-test
model: kling-v2-6
duration: 5
environment: staging
canary: watermarked-private
budget_credits: 10
publish: false
approval: required

The promotion job should require approval: recorded and an immutable artifact digest; a pull request or scheduled run must never turn an unreviewed live photograph into a public video.

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-ci-integration of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/batch-generation-from-file.md
  • references/errors.md
  • references/examples.md
  • references/github-actions-workflow.md
  • references/gitlab-ci-configuration.md
  • references/video-generation-script.md

Open the folder on GitHubat commit cfae287

Compare with similar skills

Klingai CI Integration 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 CI Integration compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Klingai CI Integration this skilljeremylongshore/tons-of-skills-marketplace2.8k—~2.1kAutomated safety check: PassMIT
Mirrord CImetalbear-co/mirrord5.4k1 repos~3.2kAutomated safety check: WarnMIT
Megalinter Checknvuillam/npm-groovy-lint2481 repos~3.9kAutomated safety check: NotesMIT
CI CDEliasOulkadi/shokunin114—~3.4kAutomated safety check: NotesMIT
CI CDahmedasmar/devops-claude-skills203—~3.5kAutomated safety check: PassNone
Tirith PoliciesStackGuardian/tirith170—~1.8kAutomated safety check: PassApache-2.0

Similar skills

  • Mirrord CI

    metalbear-co/mirrord

    Help users set up mirrord in CI pipelines for testing against real Kubernetes environments.

    5.4k GitHub starsUsed in 1 repo~3.2k tokens
    DevOps & CloudAuto-check: warnings
  • Megalinter Check

    nvuillam/npm-groovy-lint

    Collect MegaLinter lint errors for the current repository. An agent skill from nvuillam/npm-groovy-lint.

    248 GitHub starsUsed in 1 repo~3.9k tokens
    DevOps & CloudAuto-check: notes
  • CI CD

    EliasOulkadi/shokunin

    Design CI/CD pipelines for GitHub Actions, GitLab CI, and CircleCI with matrix builds, test sharding, caching, Docker layer caching, OIDC auth, deployment strategies (rolling, blue-green, canary)…

    114 GitHub stars~3.4k tokensUpdated 6 days ago
    DevOps & CloudAuto-check: notes
  • CI CD

    ahmedasmar/devops-claude-skills

    CI/CD pipeline design, optimization, DevSecOps security scanning, and troubleshooting.

    203 GitHub stars~3.5k tokensUpdated 6 mo ago
    DevOps & CloudAuto-check passed
  • Tirith Policies

    StackGuardian/tirith

    Write, validate, run and debug Tirith IaC governance policies, install Tirith, and add it to a CI pipeline (GitHub Actions, GitLab CI, Bitbucket Pipelines, Jenkins, Azure DevOps, CircleCI or any…

    170 GitHub stars~1.8k tokensUpdated 4 days ago
    DevOps & CloudAuto-check passed
  • Fingerprint CI Gate

    liarjsdev/liarjs-skills

    Gate a build on browser fingerprint regressions with liarjs - save a baseline scan as JSON, diff later runs against it, and fail the job when the consistency score falls below a floor.

    4 GitHub starsUsed in 1 repo~986 tokens
    DevOps & CloudAuto-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 CI Integration

What does Klingai CI Integration do?

Integrate Kling AI video generation into CI/CD pipelines. An agent skill from jeremylongshore/tons-of-skills-marketplace. Klingai CI Integration is an agent skill from jeremylongshore/tons-of-skills-marketplace. Integrate Kling AI video generation into CI/CD pipelines.

When should I use Klingai CI Integration?

Klingai CI Integration fits situations like: automating video content in GitHub Actions; with phrases like klingai ci; kling ai github actions; klingai automation.

How do I install Klingai CI Integration in Claude Code?

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

How do I install Klingai CI Integration in Codex?

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

Can I use Klingai CI Integration 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-ci-integration -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-ci-integration, .gemini/skills/klingai-ci-integration, .github/skills/klingai-ci-integration and .opencode/skills/klingai-ci-integration in your project.

What does Klingai CI Integration need to run?

Going by SKILL.md and its folder, Klingai CI Integration 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 CI Integration access the network?

SKILL.md names 2 domains. In commands or code: api.klingai.com; the agent is likely to contact it when it follows the instructions. As links in the text: docs.github.com. This is read from the text; nothing was executed.

Is Klingai CI Integration 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 CI Integration use?

Klingai CI Integration 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 CI Integration use?

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

What are the alternatives to Klingai CI Integration?

Skills that share tags, products or a category with Klingai CI Integration: Mirrord CI (metalbear-co/mirrord, 5.4k stars), Megalinter Check (nvuillam/npm-groovy-lint, 248 stars), CI CD (EliasOulkadi/shokunin, 114 stars) and CI CD (ahmedasmar/devops-claude-skills, 203 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Klingai CI Integration?

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.