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…
CloudBase declarative deployment from a cloudbaserc config (声明式部署, 配置式部署, cloudbaserc 部署) through the deployBuild / deployPlan / deployApply MCP tools. Use when deploying database, functions, app, hosting, or gateway resources described in cloudbaserc.json/yaml as a single
$ npx -y skills add TencentCloudBase/CloudBase-AI-Toolkit --skill cloudbase-declarative-deploy --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/cloudbase-declarative-deployContext preview
The summary Claude sees to decide when to auto-load this skill.
CloudBase declarative deployment from a cloudbaserc config (声明式部署, 配置式部署, cloudbaserc 部署) through the deployBuild / deployPlan / deployApply MCP tools. Use when deploying database, functions, app, hosting, or gateway resources described in cloudbaserc.json/yaml as a single
name: cloudbase-declarative-deploy description: CloudBase declarative deployment from a cloudbaserc config (声明式部署, 配置式部署, cloudbaserc 部署) through the deployBuild / deployPlan / deployApply MCP tools. Use when deploying database, functions, app, hosting, or gateway resources described in cloudbaserc.json/yaml as a single desired-state config, when a user wants to build static hosting artifacts locally first (deployBuild), or wants a dry-run plan before applying (deployPlan), or when handling multi-environment deploys via mode / envOverrides. Covers build-plan-apply flow (deployBuild local build → deployPlan dry-run → deployApply confirm=true), hosting build-output neutralization, envId resolution priority, only/skip filtering, concurrency, and continueOnError. Prefer deployBuild (when hosting declares a buildCommand) and deployPlan before deployApply; do not confuse with per-resource tcb CLI deploy or single-function deploy. version: 2.34.3 alwaysApply: false
Deploy a whole CloudBase project from one `cloudbaserc` config as **desired state**, using the `deployBuild` (local hosting build), `deployPlan` (dry-run) and `deployApply` (apply) MCP tools. The orchestrator applies resources in a fixed dependency order:
database → functions → app → hosting → gateway
Sibling CloudBase skills ship beside this skill. Use local relative paths such as `../cloudbase-cli/SKILL.md`.
Cloud-hosted MCP mode does not guarantee access to a local workspace filesystem or stable relative paths. If a referenced sibling file is not available in cloud mode, use this skill's embedded guidance as source of truth and ask the user for any missing constraints (or to install the missing skill). Do **not** HTTP-fetch remote skill or protocol markdown into the agent context.
**Cross-cutting protocols** (required before applying any deploy):
resources, and the user wants to deploy them together as one config.
hosting deploys no longer build implicitly — see `deployBuild`).
`deployBuild` / `deployPlan` / `deployApply` in this skill are the **local-form declarative executor**. In cloud-hosted MCP mode these tools are intentionally not registered (filtered at tool registration), because that runtime has no local `cwd` / filesystem-bound execution path.
If you are in cloud mode and do not see `deployBuild` / `deployPlan` / `deployApply` in the tool list, this is expected behavior.
Use the cloud upload-channel path instead:
1. `queryApps(action=getUploadUrl)` to get `uploadUrl`, `uploadHeaders`, `unixTimestamp` 2. Upload source/build zip to `uploadUrl` with returned headers
3. `manageApps(action=deployApp, cosTimestamp=<unixTimestamp>, installCmd?, buildCmd?, deployCmd?)`
Planned cloud declarative path (incremental roadmap): upload `cloudbaserc` as a data artifact, then run server-side plan/apply orchestration. `deployApply` remains the local-form executor of the same declarative spec.
For parameter details, see `references/plan-and-apply.md` (`Cloud-hosted upload pipeline path`).
1. **Plan before apply — always.** Run `deployPlan` first (dry-run, zero side effects). Read the per-resource action classification and show it to the user before calling `deployApply`.
2. **Apply requires explicit confirm.** `deployApply` will refuse unless `confirm=true` is passed. This is the destructive-write guard.
3. **Deployment Gate.** Before any apply, complete `cloudbase-platform/references/protocols/deployment-gate.md` and present the mandatory declaration.
4. **Conservative on existing resources by default.** `yes` defaults to `false` → existing resources are skipped, not overwritten. Only pass `yes=true` when the user explicitly wants to overwrite/update existing resources.
5. **database failure always aborts.** Even with `continueOnError=true`, a database-stage failure stops the whole deploy, because later resources depend on it.
6. **Resolve envId explicitly.** Never rely on implicit defaults silently — know which environment is targeted (see the priority table below) and confirm it with the user before applying.
`deployPlan` returns a list of resource entries. Each `status` means:
| status | meaning | |--------|---------| | `create` | new resource, will be created | | `update` | exists, will be overwritten/updated | | `skip` | no change needed | | `conflict` | conflict detected — deploy will abort, must resolve first | | `deploy` | direct overwrite upload |
If any entry is `conflict`, stop and resolve it before applying.
explicit envId param > cloudbaserc `envId` > logged-in / bound environment
If none can be reso
AI writes the code. CloudBase runs the backend. The CloudBase integration layer for AI coding tools: Plugin installs the stack, Skills steer how code is written, MCP operates databases, functions, storage, and deploys from chat.
Repo: TencentCloudBase/CloudBase-AI-Toolkit
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…
Use this skill when a browser/Web app (React, Vue, Next, Nuxt, static sites, SPAs, dashboards, AI chat UI, 页面, 前端, 网页) needs AI models via @cloudbase/js-sdk.…
Use this skill for WeChat Mini Program AI via wx.cloud.extend.AI (小程序, wx.cloud apps). Covers generateText and streamText with callbacks (onText, onEvent,…
CloudBase Node SDK auth guide for server-side identity, user lookup, and custom login tickets. This skill should be used when Node.js code must read caller…
CloudBase auth provider configuration and login-readiness guide. This skill should be used when users need to inspect, enable, disable, or configure auth…
CloudBase Web Authentication Quick Guide for frontend integration after auth-tool has already been checked. Provides concise and practical Web authentication…