[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79237NHT6SGTSSTP0PYWJ41":3,"skill-same:01M79237NHT6SGTSSTP0PYWJ41":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},"01M79237NHT6SGTSSTP0PYWJ41","klingai-performance-tuning",null,"Optimize Kling AI for speed, quality, and cost efficiency. Use when improving generation times\nor finding optimal settings. Trigger with phrases like 'klingai performance', 'kling ai optimize',\n'faster klingai', 'klingai quality settings'.","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-performance-tuning\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: klingai-performance-tuning\ndescription: |\n  Optimize Kling AI for speed, quality, and cost efficiency. Use when improving generation times\n  or finding optimal settings. Trigger with phrases like 'klingai performance', 'kling ai optimize',\n  'faster klingai', 'klingai quality settings'.\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, performance, optimization]\n---\n# Kling AI Performance Tuning\n\n## Overview\n\nOptimize video generation for your use case by choosing the right model, mode, and parameters. Covers benchmarking, speed vs. quality trade-offs, connection pooling, and caching strategies.\n\n## Speed vs. Quality Matrix\n\n| Config | ~Gen Time | Quality | Credits (5s) | Best For |\n|--------|-----------|---------|-------------|----------|\n| v2.5-turbo + standard | 30-60s | Good | 10 | Drafts, iteration |\n| v2-master + standard | 60-90s | High | 10 | Production previews |\n| v2.6 + standard | 60-120s | Highest | 10 | Quality-sensitive |\n| v2.6 + professional | 120-300s | Highest+ | 35 | Final output |\n| v2.6 + prof + audio | 180-400s | Highest+ | 200 | Full production |\n\n## Benchmarking Tool\n\n```python\nimport time, requests, json\n\ndef benchmark_model(prompt: str, model: str, mode: str = \"standard\",\n                    runs: int = 3) -> dict:\n    \"\"\"Benchmark generation time for a model\u002Fmode combination.\"\"\"\n    times = []\n\n    for i in range(runs):\n        start = time.monotonic()\n\n        # Submit\n        r = requests.post(f\"{BASE}\u002Fvideos\u002Ftext2video\", headers=get_headers(), json={\n            \"model_name\": model, \"prompt\": prompt, \"duration\": \"5\", \"mode\": mode,\n        }).json()\n        task_id = r[\"data\"][\"task_id\"]\n\n        # Poll\n        while True:\n            time.sleep(10)\n            result = requests.get(\n                f\"{BASE}\u002Fvideos\u002Ftext2video\u002F{task_id}\", headers=get_headers()\n            ).json()\n            if result[\"data\"][\"task_status\"] in (\"succeed\", \"failed\"):\n                break\n\n        elapsed = time.monotonic() - start\n        times.append(elapsed)\n        print(f\"  Run {i+1}\u002F{runs}: {elapsed:.1f}s ({result['data']['task_status']})\")\n\n    return {\n        \"model\": model,\n        \"mode\": mode,\n        \"avg_sec\": round(sum(times) \u002F len(times), 1),\n        \"min_sec\": round(min(times), 1),\n        \"max_sec\": round(max(times), 1),\n        \"runs\": runs,\n    }\n\n# Compare models\nprompt = \"A waterfall in a tropical forest, cinematic\"\nfor model in [\"kling-v2-5-turbo\", \"kling-v2-master\", \"kling-v2-6\"]:\n    result = benchmark_model(prompt, model, runs=2)\n    print(f\"{model}: avg={result['avg_sec']}s, min={result['min_sec']}s\")\n```\n\n## Connection Pooling\n\n```python\nimport requests\n\n# Without pooling: new TCP connection per request (slow)\n# With pooling: reuse connections (fast)\n\nsession = requests.Session()\nadapter = requests.adapters.HTTPAdapter(\n    pool_connections=5,     # number of connection pools\n    pool_maxsize=10,        # max connections per pool\n    max_retries=3,          # auto-retry on connection errors\n)\nsession.mount(\"https:\u002F\u002F\", adapter)\n\n# Use session instead of requests directly\nresponse = session.post(f\"{BASE}\u002Fvideos\u002Ftext2video\", headers=get_headers(), json=body)\n```\n\n## Prompt Optimization\n\nPrompts that generate faster:\n\n| Technique | Why It Helps |\n|-----------|-------------|\n| Clear single subject | Less complexity to resolve |\n| Specify camera angle | Reduces ambiguity |\n| Avoid conflicting styles | \"realistic anime\" confuses the model |\n| Keep under 200 words | Shorter prompts process faster |\n| Use negative prompts | Removes processing of unwanted elements |\n\n```python\n# Slow prompt (vague, conflicting)\nslow = \"A scene with many things happening, realistic but also artistic\"\n\n# Fast prompt (specific, clear)\nfast = \"A single red fox walking through snow, side view, natural lighting, 4K\"\n```\n\n## Caching Strategy\n\n```python\nimport hashlib\n\nclass PromptCache:\n    \"\"\"Cache results to avoid regenerating identical videos.\"\"\"\n\n    def __init__(self):\n        self._cache = {}\n\n    def _key(self, prompt: str, model: str, duration: int, mode: str) -> str:\n        raw = f\"{prompt}|{model}|{duration}|{mode}\"\n        return hashlib.sha256(raw.encode()).hexdigest()[:16]\n\n    def get(self, prompt, model, duration, mode):\n        key = self._key(prompt, model, duration, mode)\n        return self._cache.get(key)\n\n    def set(self, prompt, model, duration, mode, video_url):\n        key = self._key(prompt, model, duration, mode)\n        self._cache[key] = {\n            \"url\": video_url,\n            \"cached_at\": time.time(),\n        }\n\ncache = PromptCache()\n\ndef generate_with_cache(prompt, model=\"kling-v2-master\", duration=5, mode=\"standard\"):\n    cached = cache.get(prompt, model, duration, mode)\n    if cached:\n        print(f\"Cache hit: {cached['url']}\")\n        return cached[\"url\"]\n\n    # Generate\n    result = client.text_to_video(prompt, model=model, duration=duration, mode=mode)\n    url = result[\"videos\"][0][\"url\"]\n    cache.set(prompt, model, duration, mode, url)\n    return url\n```\n\n## Optimization Checklist\n\n- [ ] Use `kling-v2-5-turbo` for iteration, `v2-6` for final\n- [ ] Use `standard` mode until final render\n- [ ] Connection pooling via `requests.Session()`\n- [ ] Cache identical prompt+param combinations\n- [ ] Prompt: specific, single subject, \u003C 200 words\n- [ ] Batch submissions paced at 2-3s intervals\n- [ ] Use `callback_url` instead of polling\n- [ ] Download videos async (don't block on CDN download)\n\n## Resources\n\n- [Model Catalog](https:\u002F\u002Fapp.klingai.com\u002Fglobal\u002Fdev\u002Fdocument-api\u002FapiReference\u002Fmodel\u002FskillsMap)\n- [Developer Portal](https:\u002F\u002Fapp.klingai.com\u002Fglobal\u002Fdev)\n","# Kling AI Performance Tuning\n\n## Overview\n\nOptimize video generation for your use case by choosing the right model, mode, and parameters. Covers benchmarking, speed vs. quality trade-offs, connection pooling, and caching strategies.\n\n## Speed vs. Quality Matrix\n\n| Config | ~Gen Time | Quality | Credits (5s) | Best For |\n|--------|-----------|---------|-------------|----------|\n| v2.5-turbo + standard | 30-60s | Good | 10 | Drafts, iteration |\n| v2-master + standard | 60-90s | High | 10 | Production previews |\n| v2.6 + standard | 60-120s | Highest | 10 | Quality-sensitive |\n| v2.6 + professional | 120-300s | Highest+ | 35 | Final output |\n| v2.6 + prof + audio | 180-400s | Highest+ | 200 | Full production |\n\n## Benchmarking Tool\n\n```python\nimport time, requests, json\n\ndef benchmark_model(prompt: str, model: str, mode: str = \"standard\",\n                    runs: int = 3) -> dict:\n    \"\"\"Benchmark generation time for a model\u002Fmode combination.\"\"\"\n    times = []\n\n    for i in range(runs):\n        start = time.monotonic()\n\n        # Submit\n        r = requests.post(f\"{BASE}\u002Fvideos\u002Ftext2video\", headers=get_headers(), json={\n            \"model_name\": model, \"prompt\": prompt, \"duration\": \"5\", \"mode\": mode,\n        }).json()\n        task_id = r[\"data\"][\"task_id\"]\n\n        # Poll\n        while True:\n            time.sleep(10)\n            result = requests.get(\n                f\"{BASE}\u002Fvideos\u002Ftext2video\u002F{task_id}\", headers=get_headers()\n            ).json()\n            if result[\"data\"][\"task_status\"] in (\"succeed\", \"failed\"):\n                break\n\n        elapsed = time.monotonic() - start\n        times.append(elapsed)\n        print(f\"  Run {i+1}\u002F{runs}: {elapsed:.1f}s ({result['data']['task_status']})\")\n\n    return {\n        \"model\": model,\n        \"mode\": mode,\n        \"avg_sec\": round(sum(times) \u002F len(times), 1),\n        \"min_sec\": round(min(times), 1),\n        \"max_sec\": round(max(times), 1),\n        \"runs\": runs,\n    }\n\n# Compare models\nprompt = \"A waterfall in a tropical forest, cinematic\"\nfor model in [\"kling-v2-5-turbo\", \"kling-v2-master\", \"kling-v2-6\"]:\n    result = benchmark_model(prompt, model, runs=2)\n    print(f\"{model}: avg={result['avg_sec']}s, min={result['min_sec']}s\")\n```\n\n## Connection Pooling\n\n```python\nimport requests\n\n# Without pooling: new TCP connection per request (slow)\n# With pooling: reuse connections (fast)\n\nsession = requests.Session()\nadapter = requests.adapters.HTTPAdapter(\n    pool_connections=5,     # number of connection pools\n    pool_maxsize=10,        # max connections per pool\n    max_retries=3,          # auto-retry on connection errors\n)\nsession.mount(\"https:\u002F\u002F\", adapter)\n\n# Use session instead of requests directly\nresponse = session.post(f\"{BASE}\u002Fvideos\u002Ftext2video\", headers=get_headers(), json=body)\n```\n\n## Prompt Optimization\n\nPrompts that generate faster:\n\n| Technique | Why It Helps |\n|-----------|-------------|\n| Clear single subject | Less complexity to resolve |\n| Specify camera angle | Reduces ambiguity |\n| Avoid conflicting styles | \"realistic anime\" confuses the model |\n| Keep under 200 words | Shorter prompts process faster |\n| Use negative prompts | Removes processing of unwanted elements |\n\n```python\n# Slow prompt (vague, conflicting)\nslow = \"A scene with many things happening, realistic but also artistic\"\n\n# Fast prompt (specific, clear)\nfast = \"A single red fox walking through snow, side view, natural lighting, 4K\"\n```\n\n## Caching Strategy\n\n```python\nimport hashlib\n\nclass PromptCache:\n    \"\"\"Cache results to avoid regenerating identical videos.\"\"\"\n\n    def __init__(self):\n        self._cache = {}\n\n    def _key(self, prompt: str, model: str, duration: int, mode: str) -> str:\n        raw = f\"{prompt}|{model}|{duration}|{mode}\"\n        return hashlib.sha256(raw.encode()).hexdigest()[:16]\n\n    def get(self, prompt, model, duration, mode):\n        key = self._key(prompt, model, duration, mode)\n        return self._cache.get(key)\n\n    def set(self, prompt, model, duration, mode, video_url):\n        key = self._key(prompt, model, duration, mode)\n        self._cache[key] = {\n            \"url\": video_url,\n            \"cached_at\": time.time(),\n        }\n\ncache = PromptCache()\n\ndef generate_with_cache(prompt, model=\"kling-v2-master\", duration=5, mode=\"standard\"):\n    cached = cache.get(prompt, model, duration, mode)\n    if cached:\n        print(f\"Cache hit: {cached['url']}\")\n        return cached[\"url\"]\n\n    # Generate\n    result = client.text_to_video(prompt, model=model, duration=duration, mode=mode)\n    url = result[\"videos\"][0][\"url\"]\n    cache.set(prompt, model, duration, mode, url)\n    return url\n```\n\n## Optimization Checklist\n\n- [ ] Use `kling-v2-5-turbo` for iteration, `v2-6` for final\n- [ ] Use `standard` mode until final render\n- [ ] Connection pooling via `requests.Session()`\n- [ ] Cache identical prompt+param combinations\n- [ ] Prompt: specific, single subject, \u003C 200 words\n- [ ] Batch submissions paced at 2-3s intervals\n- [ ] Use `callback_url` instead of polling\n- [ ] Download videos async (don't block on CDN download)\n\n## Resources\n\n- [Model Catalog](https:\u002F\u002Fapp.klingai.com\u002Fglobal\u002Fdev\u002Fdocument-api\u002FapiReference\u002Fmodel\u002FskillsMap)\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","performance","optimization","Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Optimize Kling AI for speed, quality, and cost efficiency. Use when improving generation times\nor finding optimal settings. Trigger with phrases like 'klingai performance', 'kling ai optimize',\n'faster klingai', 'klingai quality settings'.\n","Read, Write, Edit, Bash(npm:*), Grep","claude-code, codex, openclaw","main","99825ad3f3bcc6597ddcc7294a14e6e922f2b67b","skills\u002Fsaas-packs--klingai-pack--klingai-performance-tuning",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-performance-tuning",{"tool":49,"command":50},"bunx","bunx skills add jukeyman\u002Fjukeyman-skills --skill klingai-performance-tuning",{"tool":52,"command":53},"pnpm","pnpm dlx skills add jukeyman\u002Fjukeyman-skills --skill klingai-performance-tuning","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsaas-packs--klingai-pack--klingai-performance-tuning\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",[],[]]