cloudbase-deploy

A deployment command for Tencent CloudBase, a cloud platform for hosting websites, running cloud functions, and running container-based services. It can deploy functions, static files, or CloudRun services.

In plain words
What is it for?
Use it to deploy cloud functions, static websites, or Docker-based CloudRun services and verify the deployment afterward.
Why use it?
It checks the project and deployment environment before sending files, helping catch missing builds, configuration problems, and unsafe production deployments.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/tencentcloudbase/cloudbase-ai-toolkit/cloudbase-deploy
Clone the repo
git clone --depth 1 https://github.com/TencentCloudBase/CloudBase-AI-Toolkit
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,971 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00036 $0.01971
Opus 5 $0.00018 $0.00986
Sonnet 5 $0.00007 $0.00394
Haiku 4.5 $0.00004 $0.00197

Measured yesterday against content hash 8a64156abfd9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cloudbase-deploy scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugin/cloudbase/commands/cloudbase-deploy.md · 209 lines

How it starts

The opening of the file, as written. The whole thing — 209 lines — stays where its author put it; the contents beside it link to each section on GitHub.

部署 CloudBase 资源

将当前项目的云函数、静态托管或云托管服务部署到 CloudBase 环境。包含项目类型自动检测、生产环境门控确认和部署后验证。

Preflight

运行以下检查,失败时停止并给出可执行指引。

  1. MCP 连接检查 — 确认 cloudbase-mcp server 已连接。

    • 调用 envQuery({action:"info"}) 验证连接和登录状态。若失败,提示用户完成授权。
  2. 环境选择 — 确认当前操作的 EnvId(CLOUDBASE_ENV_ID 或会话中已选定)。若未设置,先调用 envQuery({action:"list"}) 让用户选择。

  3. 项目类型检测 — 扫描当前目录结构,判断部署目标:

    目录/文件标记 部署目标 说明
    cloudfunctions/ 目录存在 function 云函数项目,目录下每个子目录为一个云函数
    dist/public/build/ 存在 hosting 静态托管项目,需先构建再部署
    Dockerfile 存在 cloudrun 云托管项目,基于容器镜像部署
    project.config.json 存在 小程序 提示使用微信开发者工具上传,非 MCP 部署

    若 "$ARGUMENTS" 指定了子命令(function/hosting/cloudrun),以参数为准;否则根据检测结果提示用户确认。

  4. Git 状态检查 — 运行 git status --porcelain

    • 若输出非空:提示用户未提交的改动不会进入部署产物(MCP 直接读取本地文件,不经过 git)。询问是否先提交再部署。
    • 若非 git 仓库,跳过此检查。
  5. 构建产物检查(hosting 部署时)— 检测 dist/public/build/ 是否存在且非空。

    • 若不存在:提示用户先运行构建命令(npm run build / pnpm build 等)。

Plan

根据项目类型确定部署策略:

子命令 MCP 工具 说明
function manageFunctions({action:"deploy", ...}) 部署 cloudfunctions/ 目录下的云函数
hosting manageHosting({action:"uploadFiles", ...}) 上传静态文件到静态托管
cloudrun manageCloudRun({action:"deploy", ...}) 部署云托管服务

生产环境门控

若当前 EnvId 为生产环境(通过 envQuery({action:"info"}) 的 Alias 或 Source 判断,或用户明确声明),必须获得显式确认:

⚠️ 生产环境部署请求。 当前环境 <EnvId><Alias>)为生产环境,此次部署将影响线上服务。 请用户明确回复 "yes" 确认部署。 未获确认前不得执行。

Commands

function — 云函数部署

cloudfunctions/ 目录下的云函数部署到 CloudBase:

manageFunctions({
  action: "deploy",
  functionRootPath: "<cloudfunctions 目录的绝对路径>",
  envId: "<current-env-id>"
})
  • functionRootPath 指向云函数目录的父目录(例如 cloudfunctions 目录的绝对路径)
  • 工具会自动读取 functionRootPath 下每个同名子目录的文件并部署
  • 无需手动压缩代码,工具自动处理

部署后,若需要更新单个函数代码:

manageFunctions({
  action: "updateFunctionCode",
  functionName: "<function-name>",
  functionRootPath: "<path-to-single-function-dir>",
  envId: "<current-env-id>"
})

Read the full file on GitHub · 209 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 209 lines · 36 tokens per session scan A 8a64156abfd9

Subscribe to this mod's changes

cloudbase-deploy is a command published in the GitHub repository TencentCloudBase/CloudBase-AI-Toolkit (1,087 stars, last pushed yesterday), licensed MIT. It adds 36 tokens to every session and 1,971 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.