[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7922789PR8DADGPEBRM3ZSS":3,"skill-same:01M7922789PR8DADGPEBRM3ZSS":57},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":34,"commitSha":35,"skillDirectory":36,"forksCount":37,"repositoryHtmlUrl":38,"repositoryHomepageUrl":6,"ownerHtmlUrl":39,"ownerBlogUrl":40,"ownerDescription":41,"updatedAt":42,"install":43,"resources":56},"01M7922789PR8DADGPEBRM3ZSS","klingai-cost-controls",null,"Implement budget limits, usage alerts, and spending controls for Kling AI. Use when managing\ncosts or preventing overruns. Trigger with phrases like 'klingai cost', 'kling ai budget',\n'klingai spending limit', 'video generation costs'.","jukeyman\u002Fjukeyman-skills","jukeyman","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F142960420?v=4","01M78FR4Y3DHMMCBCC0GXXNB3F","RICK JEFFERSON","01M78FR4Z8RVQRAD31Y5J7V6EB",1,"MIT","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsaas-packs--klingai-pack--klingai-cost-controls\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: klingai-cost-controls\ndescription: |\n  Implement budget limits, usage alerts, and spending controls for Kling AI. Use when managing\n  costs or preventing overruns. Trigger with phrases like 'klingai cost', 'kling ai budget',\n  'klingai spending limit', 'video generation costs'.\nallowed-tools: Read, Write, Edit, Bash(npm:*), Grep\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\ncompatible-with: claude-code, codex, openclaw\ntags: [saas, kling-ai, cost-controls, budget]\n---\n# Kling AI Cost Controls\n\n## Overview\n\nPrevent unexpected spending with per-request cost estimation, daily budget enforcement, threshold alerts, and usage dashboards. Credits are consumed per task based on duration, mode, and audio.\n\n## Credit Cost Reference\n\n| Config | Credits |\n|--------|---------|\n| 5s standard | 10 |\n| 5s professional | 35 |\n| 10s standard | 20 |\n| 10s professional | 70 |\n| 5s standard + audio (v2.6) | 50 |\n| 10s professional + audio (v2.6) | 200 |\n| Image generation (Kolors) | 1 |\n| Virtual try-on | 5 |\n\n## Budget Guard\n\n```python\nimport time\nfrom dataclasses import dataclass, field\n\n@dataclass\nclass BudgetGuard:\n    \"\"\"Enforce daily credit budget with alerting.\"\"\"\n    daily_limit: int = 1000\n    alert_threshold: float = 0.8  # alert at 80%\n    _used: int = 0\n    _reset_time: float = field(default_factory=time.time)\n    _alerts_sent: set = field(default_factory=set)\n\n    def _check_reset(self):\n        if time.time() - self._reset_time > 86400:\n            self._used = 0\n            self._reset_time = time.time()\n            self._alerts_sent.clear()\n\n    def estimate_credits(self, duration: int = 5, mode: str = \"standard\",\n                         audio: bool = False) -> int:\n        base = {(5, \"standard\"): 10, (5, \"professional\"): 35,\n                (10, \"standard\"): 20, (10, \"professional\"): 70}\n        credits = base.get((duration, mode), 10)\n        if audio:\n            credits *= 5\n        return credits\n\n    def check(self, credits_needed: int) -> bool:\n        self._check_reset()\n\n        # Check alert threshold\n        usage_pct = (self._used + credits_needed) \u002F self.daily_limit\n        if usage_pct >= self.alert_threshold and \"80pct\" not in self._alerts_sent:\n            self._alerts_sent.add(\"80pct\")\n            self._on_alert(f\"Budget at {usage_pct:.0%} ({self._used + credits_needed}\u002F{self.daily_limit})\")\n\n        if self._used + credits_needed > self.daily_limit:\n            raise RuntimeError(\n                f\"Daily budget exceeded: {self._used} + {credits_needed} > {self.daily_limit} credits\"\n            )\n        return True\n\n    def record(self, credits: int):\n        self._used += credits\n\n    def _on_alert(self, message: str):\n        \"\"\"Override for custom alerting (Slack, email, PagerDuty).\"\"\"\n        print(f\"ALERT: {message}\")\n\n    @property\n    def remaining(self) -> int:\n        self._check_reset()\n        return max(0, self.daily_limit - self._used)\n\n    @property\n    def usage_report(self) -> dict:\n        self._check_reset()\n        return {\n            \"used\": self._used,\n            \"limit\": self.daily_limit,\n            \"remaining\": self.remaining,\n            \"usage_pct\": f\"{(self._used \u002F self.daily_limit) * 100:.1f}%\",\n        }\n```\n\n## Pre-Batch Cost Check\n\n```python\ndef pre_batch_check(prompts: list, budget: BudgetGuard,\n                    duration: int = 5, mode: str = \"standard\"):\n    \"\"\"Estimate and validate batch cost before submission.\"\"\"\n    per_video = budget.estimate_credits(duration, mode)\n    total = len(prompts) * per_video\n\n    print(f\"Batch estimate: {len(prompts)} videos x {per_video} credits = {total} credits\")\n    print(f\"Budget remaining: {budget.remaining}\")\n\n    if total > budget.remaining:\n        raise RuntimeError(\n            f\"Batch needs {total} credits but only {budget.remaining} remaining. \"\n            f\"Reduce to {budget.remaining \u002F\u002F per_video} videos or lower mode.\"\n        )\n    return total\n```\n\n## Cost-Aware Client\n\n```python\nclass CostAwareKlingClient:\n    \"\"\"Kling client that enforces budget on every request.\"\"\"\n\n    def __init__(self, base_client, budget: BudgetGuard):\n        self.client = base_client\n        self.budget = budget\n\n    def text_to_video(self, prompt: str, **kwargs):\n        credits = self.budget.estimate_credits(\n            kwargs.get(\"duration\", 5),\n            kwargs.get(\"mode\", \"standard\"),\n            kwargs.get(\"audio\", False),\n        )\n        self.budget.check(credits)\n\n        result = self.client.text_to_video(prompt, **kwargs)\n        self.budget.record(credits)\n        return result\n```\n\n## Optimization Strategies\n\n| Strategy | Savings | Implementation |\n|----------|---------|---------------|\n| Standard for drafts | 3.5x cheaper | `mode: \"standard\"` for iterations |\n| 5s clips, extend later | 50% per clip | Generate 5s, use `video-extend` selectively |\n| v2.5 Turbo over v2.6 | Faster (less queue cost) | `model: \"kling-v2-5-turbo\"` |\n| Skip audio, add in post | 5x cheaper | `motion_has_audio: false` |\n| Batch off-peak | Faster processing | Schedule overnight |\n| Cache prompts | Avoid duplicates | Hash prompt + params, check before submitting |\n\n## Usage Tracking\n\n```python\nimport json\nfrom datetime import datetime\n\nclass UsageTracker:\n    \"\"\"Log every generation for cost analysis.\"\"\"\n\n    def __init__(self, log_file: str = \"kling_usage.jsonl\"):\n        self.log_file = log_file\n\n    def log(self, task_id: str, credits: int, model: str,\n            duration: int, mode: str, prompt: str):\n        entry = {\n            \"timestamp\": datetime.utcnow().isoformat(),\n            \"task_id\": task_id,\n            \"credits\": credits,\n            \"model\": model,\n            \"duration\": duration,\n            \"mode\": mode,\n            \"prompt_preview\": prompt[:100],\n        }\n        with open(self.log_file, \"a\") as f:\n            f.write(json.dumps(entry) + \"\\n\")\n```\n\n## Resources\n\n- [Pricing](https:\u002F\u002Fapp.klingai.com\u002Fglobal\u002Fdev\u002Fdocument-api\u002FproductBilling\u002FprePaidResourcePackage)\n- [Developer Portal](https:\u002F\u002Fapp.klingai.com\u002Fglobal\u002Fdev)\n","# Kling AI Cost Controls\n\n## Overview\n\nPrevent unexpected spending with per-request cost estimation, daily budget enforcement, threshold alerts, and usage dashboards. Credits are consumed per task based on duration, mode, and audio.\n\n## Credit Cost Reference\n\n| Config | Credits |\n|--------|---------|\n| 5s standard | 10 |\n| 5s professional | 35 |\n| 10s standard | 20 |\n| 10s professional | 70 |\n| 5s standard + audio (v2.6) | 50 |\n| 10s professional + audio (v2.6) | 200 |\n| Image generation (Kolors) | 1 |\n| Virtual try-on | 5 |\n\n## Budget Guard\n\n```python\nimport time\nfrom dataclasses import dataclass, field\n\n@dataclass\nclass BudgetGuard:\n    \"\"\"Enforce daily credit budget with alerting.\"\"\"\n    daily_limit: int = 1000\n    alert_threshold: float = 0.8  # alert at 80%\n    _used: int = 0\n    _reset_time: float = field(default_factory=time.time)\n    _alerts_sent: set = field(default_factory=set)\n\n    def _check_reset(self):\n        if time.time() - self._reset_time > 86400:\n            self._used = 0\n            self._reset_time = time.time()\n            self._alerts_sent.clear()\n\n    def estimate_credits(self, duration: int = 5, mode: str = \"standard\",\n                         audio: bool = False) -> int:\n        base = {(5, \"standard\"): 10, (5, \"professional\"): 35,\n                (10, \"standard\"): 20, (10, \"professional\"): 70}\n        credits = base.get((duration, mode), 10)\n        if audio:\n            credits *= 5\n        return credits\n\n    def check(self, credits_needed: int) -> bool:\n        self._check_reset()\n\n        # Check alert threshold\n        usage_pct = (self._used + credits_needed) \u002F self.daily_limit\n        if usage_pct >= self.alert_threshold and \"80pct\" not in self._alerts_sent:\n            self._alerts_sent.add(\"80pct\")\n            self._on_alert(f\"Budget at {usage_pct:.0%} ({self._used + credits_needed}\u002F{self.daily_limit})\")\n\n        if self._used + credits_needed > self.daily_limit:\n            raise RuntimeError(\n                f\"Daily budget exceeded: {self._used} + {credits_needed} > {self.daily_limit} credits\"\n            )\n        return True\n\n    def record(self, credits: int):\n        self._used += credits\n\n    def _on_alert(self, message: str):\n        \"\"\"Override for custom alerting (Slack, email, PagerDuty).\"\"\"\n        print(f\"ALERT: {message}\")\n\n    @property\n    def remaining(self) -> int:\n        self._check_reset()\n        return max(0, self.daily_limit - self._used)\n\n    @property\n    def usage_report(self) -> dict:\n        self._check_reset()\n        return {\n            \"used\": self._used,\n            \"limit\": self.daily_limit,\n            \"remaining\": self.remaining,\n            \"usage_pct\": f\"{(self._used \u002F self.daily_limit) * 100:.1f}%\",\n        }\n```\n\n## Pre-Batch Cost Check\n\n```python\ndef pre_batch_check(prompts: list, budget: BudgetGuard,\n                    duration: int = 5, mode: str = \"standard\"):\n    \"\"\"Estimate and validate batch cost before submission.\"\"\"\n    per_video = budget.estimate_credits(duration, mode)\n    total = len(prompts) * per_video\n\n    print(f\"Batch estimate: {len(prompts)} videos x {per_video} credits = {total} credits\")\n    print(f\"Budget remaining: {budget.remaining}\")\n\n    if total > budget.remaining:\n        raise RuntimeError(\n            f\"Batch needs {total} credits but only {budget.remaining} remaining. \"\n            f\"Reduce to {budget.remaining \u002F\u002F per_video} videos or lower mode.\"\n        )\n    return total\n```\n\n## Cost-Aware Client\n\n```python\nclass CostAwareKlingClient:\n    \"\"\"Kling client that enforces budget on every request.\"\"\"\n\n    def __init__(self, base_client, budget: BudgetGuard):\n        self.client = base_client\n        self.budget = budget\n\n    def text_to_video(self, prompt: str, **kwargs):\n        credits = self.budget.estimate_credits(\n            kwargs.get(\"duration\", 5),\n            kwargs.get(\"mode\", \"standard\"),\n            kwargs.get(\"audio\", False),\n        )\n        self.budget.check(credits)\n\n        result = self.client.text_to_video(prompt, **kwargs)\n        self.budget.record(credits)\n        return result\n```\n\n## Optimization Strategies\n\n| Strategy | Savings | Implementation |\n|----------|---------|---------------|\n| Standard for drafts | 3.5x cheaper | `mode: \"standard\"` for iterations |\n| 5s clips, extend later | 50% per clip | Generate 5s, use `video-extend` selectively |\n| v2.5 Turbo over v2.6 | Faster (less queue cost) | `model: \"kling-v2-5-turbo\"` |\n| Skip audio, add in post | 5x cheaper | `motion_has_audio: false` |\n| Batch off-peak | Faster processing | Schedule overnight |\n| Cache prompts | Avoid duplicates | Hash prompt + params, check before submitting |\n\n## Usage Tracking\n\n```python\nimport json\nfrom datetime import datetime\n\nclass UsageTracker:\n    \"\"\"Log every generation for cost analysis.\"\"\"\n\n    def __init__(self, log_file: str = \"kling_usage.jsonl\"):\n        self.log_file = log_file\n\n    def log(self, task_id: str, credits: int, model: str,\n            duration: int, mode: str, prompt: str):\n        entry = {\n            \"timestamp\": datetime.utcnow().isoformat(),\n            \"task_id\": task_id,\n            \"credits\": credits,\n            \"model\": model,\n            \"duration\": duration,\n            \"mode\": mode,\n            \"prompt_preview\": prompt[:100],\n        }\n        with open(self.log_file, \"a\") as f:\n            f.write(json.dumps(entry) + \"\\n\")\n```\n\n## Resources\n\n- [Pricing](https:\u002F\u002Fapp.klingai.com\u002Fglobal\u002Fdev\u002Fdocument-api\u002FproductBilling\u002FprePaidResourcePackage)\n- [Developer Portal](https:\u002F\u002Fapp.klingai.com\u002Fglobal\u002Fdev)\n",{"name":5,"tags":24,"author":29,"license":15,"version":30,"description":31,"allowed-tools":32,"compatible-with":33},[25,26,27,28],"saas","kling-ai","cost-controls","budget","Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Implement budget limits, usage alerts, and spending controls for Kling AI. Use when managing\ncosts or preventing overruns. Trigger with phrases like 'klingai cost', 'kling ai budget',\n'klingai spending limit', 'video generation costs'.\n","Read, Write, Edit, Bash(npm:*), Grep","claude-code, codex, openclaw","main","99825ad3f3bcc6597ddcc7294a14e6e922f2b67b","skills\u002Fsaas-packs--klingai-pack--klingai-cost-controls",0,"https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills","https:\u002F\u002Fgithub.com\u002Fjukeyman","https:\u002F\u002FRJBUSINESSSOLUTIONS.ORG","Credit and Finance Expert | Developer\r\n\r\nI'm Rick Jefferson, a seasoned credit and finance expert with over a decade of experience in financial literacy,","2026-07-13 07:03:29",{"source":8,"skillName":5,"commands":44,"prompt":54,"zipAvailable":55},[45,48,51],{"tool":46,"command":47},"npx","npx skills add jukeyman\u002Fjukeyman-skills --skill klingai-cost-controls",{"tool":49,"command":50},"bunx","bunx skills add jukeyman\u002Fjukeyman-skills --skill klingai-cost-controls",{"tool":52,"command":53},"pnpm","pnpm dlx skills add jukeyman\u002Fjukeyman-skills --skill klingai-cost-controls","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsaas-packs--klingai-pack--klingai-cost-controls\u002FSKILL.md",true,[],[58,65,72,79,86,94],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M79ANS2SM329NEP5ZCX106RR","zustand-store-creator","Create zustand store creator operations. Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category. Use when working with zustand store creator functionality. Trigger with phrases like \"zustand store creator\", \"zustand creator\", \"zustand\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M79AMZKP4YDEZ7EHG1Y7PP74","zero-trust-config-helper","Configure with zero trust config helper operations. Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category. Use when configuring systems or services. Trigger with phrases like \"zero trust config helper\", \"zero helper\", \"zero\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M79AMJSBCEJQNBTYNAHYN5HM","zapier-integration-helper","Assist with zapier integration helper operations. Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category. Use when working with APIs or building integrations. Trigger with phrases like \"zapier integration helper\", \"zapier helper\", \"zapier\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M79AHJZGVMARS13VFQYRR1MP","yaml-config-validator","Validate yaml config validator operations. Auto-activating skill for DevOps Basics.\nTriggers on: yaml config validator, yaml config validator\nPart of the DevOps Basics skill category. Use when configuring systems or services. Trigger with phrases like \"yaml config validator\", \"yaml validator\", \"yaml\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fyaml-config-validator\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":90,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M79AHGDZRN0020RDQSQDPAM8","xvary-stock-research","Thesis-driven equity analysis from public SEC EDGAR and market data; \u002Fanalyze, \u002Fscore, \u002Fcompare workflows with bundled Python tools (Claude Code, Cursor, Codex).","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":19},"01M79AHCYJ9FV9RMHQ24HDRN33","xss-vulnerability-scanner","Scan xss vulnerability scanner operations. Auto-activating skill for Security Fundamentals.\nTriggers on: xss vulnerability scanner, xss vulnerability scanner\nPart of the Security Fundamentals skill category. Use when working with xss vulnerability scanner functionality. Trigger with phrases like \"xss vulnerability scanner\", \"xss scanner\", \"xss\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxss-vulnerability-scanner\u002FSKILL.md",[],[]]