Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

ai-model-nodejs

БесплатноБез исполняемых скриптовНе проверен

Use this skill for Node.js backend AI via @cloudbase/node-sdk (>=3.16.0) — cloud functions, CloudRun, Express/Koa/NestJS, serverless APIs, scheduled jobs, LLM…

TencentCloudBaseот TencentCloudBase★ 83 звезды на GitHub28 установок в других каталогах

Об этом скилле

Sibling skills (local only)

Sibling CloudBase skills ship beside this skill. Use local relative paths such as ../auth-tool-cloudbase/SKILL.md.

If a referenced sibling skill file is missing from this environment, ask the user to install the full CloudBase plugin (or the missing skill). Do not HTTP-fetch remote skill or protocol markdown into the agent context.

When to use this skill

Use this skill for calling AI models from Node.js backends, cloud functions, or CloudRun services via @cloudbase/node-sdk.

🧭 Runtime-plane fit. This is the right skill when the AI call truly belongs on the server: image generation (the only SDK that supports it), long-running agent jobs, orchestration across multiple tools, scheduled tasks, or flows that must keep secrets server-side. If the user is building a Web page / frontend AI chat UI, do NOT wrap this SDK behind a backend proxy — route to ai-model-web and call the model directly from the browser. For WeChat Mini Programs use ai-model-wechat. Routing is decided by runtime plane first; the concrete model (deepseek-*, glm-*, hunyuan-*, kimi-*, …) only affects the model field.

Use it when you need to:

  • Integrate AI text generation into a backend service
  • Generate images with the Hunyuan Image model
  • Call AI models from CloudBase cloud functions or CloudRun
  • Do server-side AI processing (agent orchestration, batch jobs, scheduled tasks)

Do NOT use for:

  • Browser/Web apps → use the ai-model-web skill
  • WeChat Mini Program → use the ai-model-wechat skill
  • Runtimes without a CloudBase SDK (Python, Go, PHP, curl, etc.) → use the http-api-cloudbase skill (it now includes the ai_model OpenAPI spec for direct HTTP calls to the AI model endpoint; do NOT wrap this SDK behind an HTTP proxy)

⛔ STOP — ai.createModel(...) argument is not a vendor / model name

Read this before writing any createModel(...) line. Agents frequently hallucinate this argument. There are exactly four legal shapes. Anything else is a bug.

✅ Legal ai.createModel(...) argument When to use it
"cloudbase" The main managed group for server-side projects (TokenHub-backed, multi-vendor pool). Vendor + concrete model go into the model field of generateText / streamText, e.g. { model: "deepseek-v4.1-flash" }. No model is enabled by default — always check DescribeAIModels first and, if the target model is missing, enable it with UpdateAIModel before calling the SDK.
"hunyuan-v3" Legacy plan group, being retired. Only hy3 is available and the platform adds no new models to it. Existing code that already uses it keeps working — new code should use cloudbase + { model: "hy3" }.
"hunyuan-exp" Only if DescribeAIModels explicitly returns this older legacy builtin group for the current env. Its original default model hunyuan-2.0-instruct-20251111 is offline (2026-05-31) — never target that id.
"custom-<your-name>" A user-defined GroupName you onboarded via CreateAIModel. Must start with custom- (e.g. custom-kimi, custom-openai-compat).

Image generation is a separate entry point: ai.createImageModel("hunyuan-image"). Do not mix it with createModel(...).

❌ Wrong argument patterns

Anything that is not one of the four legal values above: vendor names ("deepseek", "glm", "kimi", "openai", "moonshot", …), concrete model ids ("deepseek-v4.1-flash", "hunyuan-2.0-instruct-20251111"), the bare placeholder "custom", or a variable holding the model id. All of these are bugs in createModel(...).

✅ Correct pattern — GroupName vs Model are two different fields

const model = ai.createModel("cloudbase");          // ← GroupName
await model.generateText({
  model: "deepseek-v4.1-flash",                     // ← concrete model id
  messages: [...]
});

Decision procedure (when the user names a specific model)

  1. The user says "use DeepSeek v3.2" / "use hunyuan instruct" / "use Kimi k2.6" / "use GLM-5" / …
  2. createModel("cloudbase") stays the same.
  3. Put the model id into the model field: { model: "deepseek-v4.1-flash" }, { model: "hy3" }, { model: "kimi-k2.6" }, { model: "glm-5.3" }, …
  4. Never assume the model is already enabled. Before calling the SDK, verify it is present in DescribeAIModels({ GroupName: "cloudbase" }).Models[]. If missing, call DescribeManagedAIModelList to confirm the exact Model name the platform supports (case-sensitive — do not guess the spelling) and then enable it via UpdateAIModel with Status: 1 (remember Models is a full replacement).

If you are about to type ai.createModel( and the thing inside the parentheses is a vendor name, a model name, or a guess — stop. It is almost certainly one of the four legal values above.


Mandatory Two-Step Preflight (before any SDK code)

Полный SKILL.md на GitHub

Установить ai-model-nodejs в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

LICENSE.mdreferences/api-reference.mdreferences/custom-onboarding.md

FAQ

Что делает скилл ai-model-nodejs?

Use this skill for Node.js backend AI via @cloudbase/node-sdk (>=3.16.0) — cloud functions, CloudRun, Express/Koa/NestJS, serverless APIs, scheduled jobs, LLM proxies, agent orchestration. The only SDK supporting image generation (ai.createImageModel + generateImage). Text via ai.createModel with groups cloudbase, the legacy hunyuan-v3 / hunyuan-exp, or custom-*; model ids (e.g. deepseek-v4.1-flash, glm-5.3, kimi-k2.6) go in the `model` field of generateText/streamText. MUST run two-step preflight before code — see body. NOT for browser/Web (use ai-model-web) or Mini Program (use ai-model-wechat).

Как установить скилл ai-model-nodejs?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл ai-model-nodejs запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить ai-model-nodejs с