Agent skill

Klingai Content Policy

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

Implement content policy compliance for Kling AI prompts and outputs.

MITAuto-check passedMedia & Creative

Install Klingai Content Policy

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

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

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

At a glance

Implement content policy compliance for Kling AI prompts and outputs.

  • Works in 5 steps: Filter before API call -- saves credits… → Explain rejections clearly -- tell users… → Log violations -- track patterns for… → …
  • Filtering user prompts
  • SKILL.md covers Overview, Restricted Content Categories, Pre-Submission Prompt Filter and Safe Negative Prompts, plus 9 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Klingai Content Policy is an agent skill from jeremylongshore/tons-of-skills-marketplace. Implement content policy compliance for Kling AI prompts and outputs. Use when filtering user prompts or handling moderation. Trigger with phrases like 'klingai content policy', 'kling ai moderation', 'safe video generation', 'klingai content filter'.

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `references/content-filter-implementation.md`, `references/content-moderation-service.md` and `references/errors.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

  • Filtering user prompts
  • Handling moderation
  • With phrases like klingai content policy
  • Kling ai moderation

Example prompts

  • “klingai content policy”
  • “kling ai moderation”
  • “safe video generation”
  • “/klingai-content-policy”

Requirements

  • Python 3
  • 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. Filter before API call -- saves credits on obvious violations
  2. Explain rejections clearly -- tell users what to change
  3. Log violations -- track patterns for filter improvement
  4. Rate limit prompt submissions -- prevent abuse
  5. Review flagged content -- human review for edge cases

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

    No URLs in SKILL.md.

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

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    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 Content Policy loads about 2.2k tokens when it runs, and up to ~5.3k if it reads all its reference files. Until then it costs about 69 tokens; SKILL.md has 559 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
~2.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.3k

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). 559 words, ~2,166 tokens.

Download SKILL.mdSave it as .claude/skills/klingai-content-policy/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
klingai-content-policy
description
Implement content policy compliance for Kling AI prompts and outputs. Use when filtering user prompts or handling moderation. Trigger with phrases like 'klingai content policy', 'kling ai moderation', 'safe video generation', 'klingai content filter'.
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, content-policy, moderation

Kling AI Content Policy

Overview

Kling AI enforces content policies server-side. Tasks with policy-violating prompts return task_status: "failed" with a content policy message. This skill covers pre-submission filtering to avoid wasted credits and API calls.

Restricted Content Categories

Kling AI prohibits prompts that generate:

CategoryExamples
Violence/goreGraphic injuries, torture, weapons used violently
Adult/sexualExplicit nudity, sexual acts, suggestive content
Hate/discriminationSlurs, targeted harassment, supremacist imagery
Illegal activityDrug manufacturing, terrorism, fraud instructions
Real peopleDeepfakes of identifiable individuals without consent
Copyrighted charactersTrademarked characters (Mickey Mouse, Spider-Man)
MisinformationFake news, fabricated events presented as real
Self-harmSuicide, eating disorders, self-injury instructions

Pre-Submission Prompt Filter

python
import re

class PromptFilter:
    """Filter prompts before sending to Kling AI to save credits."""

    BLOCKED_PATTERNS = [
        r"\b(nude|naked|explicit|nsfw|porn)\b",
        r"\b(gore|dismember|torture|mutilat)\b",
        r"\b(bomb|terroris|weapon|firearm)\b",
        r"\b(suicide|self.harm|kill.yourself)\b",
        r"\b(deepfake|impersonat)\b",
    ]

    BLOCKED_TERMS = {
        "blood splatter", "graphic violence", "child abuse",
        "drug manufacturing", "hate speech",
    }

    def __init__(self):
        self._patterns = [re.compile(p, re.IGNORECASE) for p in self.BLOCKED_PATTERNS]

    def check(self, prompt: str) -> tuple[bool, str]:
        """Returns (is_safe, reason)."""
        lower = prompt.lower()

        for term in self.BLOCKED_TERMS:
            if term in lower:
                return False, f"Blocked term: '{term}'"

        for pattern in self._patterns:
            match = pattern.search(prompt)
            if match:
                return False, f"Blocked pattern: '{match.group()}'"

        if len(prompt) > 2500:
            return False, "Prompt exceeds 2500 character limit"

        if len(prompt.strip()) < 5:
            return False, "Prompt too short"

        return True, "OK"

    def sanitize(self, prompt: str) -> str:
        """Remove problematic terms and return cleaned prompt."""
        for pattern in self._patterns:
            prompt = pattern.sub("[removed]", prompt)
        return prompt.strip()

Safe Negative Prompts

Always include safety-related negative prompts:

python
DEFAULT_NEGATIVE_PROMPT = (
    "violence, gore, blood, nudity, sexual content, "
    "weapons, drugs, hate symbols, distorted faces, "
    "watermark, text overlay, low quality, blurry"
)

def safe_request(prompt: str, negative_prompt: str = ""):
    """Build request with safety defaults."""
    combined_negative = f"{DEFAULT_NEGATIVE_PROMPT}, {negative_prompt}".strip(", ")
    return {
        "model_name": "kling-v2-master",
        "prompt": prompt,
        "negative_prompt": combined_negative,
        "duration": "5",
        "mode": "standard",
    }

Integration with Client

python
class SafeKlingClient:
    """Kling client with pre-submission content filtering."""

    def __init__(self, base_client):
        self.client = base_client
        self.filter = PromptFilter()

    def text_to_video(self, prompt: str, **kwargs):
        is_safe, reason = self.filter.check(prompt)
        if not is_safe:
            raise ValueError(f"Content policy violation: {reason}")

        # Add safety negative prompt
        kwargs.setdefault("negative_prompt", "")
        kwargs["negative_prompt"] = (
            f"{DEFAULT_NEGATIVE_PROMPT}, {kwargs['negative_prompt']}".strip(", ")
        )

        return self.client.text_to_video(prompt, **kwargs)

Handling Server-Side Rejections

python
def handle_policy_rejection(task_id: str, result: dict):
    """Handle content policy rejections gracefully."""
    status_msg = result["data"].get("task_status_msg", "")

    if "content policy" in status_msg.lower() or "policy violation" in status_msg.lower():
        return {
            "error": "content_policy_violation",
            "message": "Your prompt was rejected by Kling AI's content policy. "
                      "Please revise to remove restricted content.",
            "task_id": task_id,
            "credits_consumed": False,  # policy rejections typically don't consume credits
        }
    return {"error": "generation_failed", "message": status_msg, "task_id": task_id}

User-Facing Guidelines

When building apps with user-submitted prompts:

  1. Filter before API call -- saves credits on obvious violations
  2. Explain rejections clearly -- tell users what to change
  3. Log violations -- track patterns for filter improvement
  4. Rate limit prompt submissions -- prevent abuse
  5. Review flagged content -- human review for edge cases

Prerequisites

  • A versioned policy configuration, an owner for escalation, a review queue, and a documented retention/deletion schedule.
  • A synthetic or rights-cleared fixture set for tests. Likeness, voice, and other identifiable-person inputs require documented consent; do not rely on a prompt filter as proof of rights.
  • A bounded credit budget and a private, watermarked draft destination. Public distribution requires a separate approval record after policy and quality checks.

Instructions

  1. Normalize the prompt and provenance metadata, then run the local filter before creating a task. Preserve only a redacted reason code for rejected content.
  2. Check violence, sexual content, hate, illegal activity, self-harm, misinformation, likeness/deepfake, and copyrighted-character risk. Route ambiguous cases to human review rather than trying to evade the policy with sanitization.
  3. Confirm that every image, mask, tail frame, and reference asset is synthetic or rights-cleared and that the requested destination and audience are approved.
  4. Submit only a short, watermarked sandbox canary within the credit budget. Keep it private until the policy result, visual review, consent record, and owner approval are complete.
  5. If the provider rejects the task or a reviewer withdraws approval, do not retry the same request. Quarantine and remove staged media, revoke temporary links, and restore the previous approved version.
  6. Retain a redacted receipt with policy version, reason code, opaque task digest, approval state, budget state, retention deadline, and rollback reference; exclude prompts, images, identities, and credentials.
Show full SKILL.md (155 more words)Show less

Output

Return one of approved_for_draft, needs_human_review, or blocked, together with an opaque request digest, policy version, reason codes, rights/provenance result, canary state, budget result, and retention/rollback instructions. A blocked result must not create a public artifact or expose the submitted content in logs.

Error Handling

Reject locally when a known restricted pattern, missing consent, unknown provenance, disallowed destination, or budget breach is detected. Treat provider policy failures as final for that request and report a user-safe revision hint; do not claim that sanitization makes an unsafe request permissible. For classifier outages or ambiguous results, fail closed into human review. Quarantine any output that later receives a complaint, remove its distribution links, preserve only the redacted audit receipt, and record the rollback owner.

Examples

An internal canary decision can be recorded as:

text
fixture=synthetic-product-v4; rights=cleared; likeness=none;
policy=pass-v3; destination=staging-private; canary=watermarked;
budget=within-limit; approval=pending; decision=approved_for_draft

An identifiable-person image without a consent record must instead return blocked and create no generation task.

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-content-policy of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/content-filter-implementation.md
  • references/content-moderation-service.md
  • references/errors.md
  • references/examples.md
  • references/policy-violation-logger.md

Open the folder on GitHubat commit cfae287

Compare with similar skills

Klingai Content Policy 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 Content Policy compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Klingai Content Policy this skilljeremylongshore/tons-of-skills-marketplace2.8k—~2.2kAutomated 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 Content Policy

What does Klingai Content Policy do?

Implement content policy compliance for Kling AI prompts and outputs. Klingai Content Policy is an agent skill from jeremylongshore/tons-of-skills-marketplace. Implement content policy compliance for Kling AI prompts and outputs.

When should I use Klingai Content Policy?

Klingai Content Policy fits situations like: filtering user prompts; handling moderation; with phrases like klingai content policy; kling ai moderation.

How do I install Klingai Content Policy in Claude Code?

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

How do I install Klingai Content Policy in Codex?

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

Can I use Klingai Content Policy 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-content-policy -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-content-policy, .gemini/skills/klingai-content-policy, .github/skills/klingai-content-policy and .opencode/skills/klingai-content-policy in your project.

What does Klingai Content Policy need to run?

SKILL.md names no scripts, command-line tools or credentials: Klingai Content Policy is instructions for the agent only. Our summary lists: Python 3. Its frontmatter pre-approves these tools: Read, Write, Edit, Bash(npm:*), Grep. Compatibility (from SKILL.md): Designed for Claude Code.

Does Klingai Content Policy access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Klingai Content Policy 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 Content Policy use?

Klingai Content Policy 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 Content Policy use?

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

What are the alternatives to Klingai Content Policy?

Skills that share tags, products or a category with Klingai Content Policy: 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 Content Policy?

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.