cloud-functions
CloudBase function runtime guide for building, deploying, and debugging your own Event Functions or HTTP Functions. This skill should be used when users need application runtime code on CloudBase, not when they are merely calling CloudBase official platform APIs.
npx skills add TencentCloudBase/CloudBase-AI-Toolkit --skill cloud-functions --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
Guides development, deployment, and operation of CloudBase cloud functions (Event Functions and HTTP Functions) that run application runtime code, distinguishing when to use function runtime code vs. calling official platform APIs. It covers function types, runtime models, and references for code organization and deployment workflows.
How it works
- Advises choosing the correct runtime model: Event Function with exports.main(event, context) or HTTP Function serving on port 9000, and outlines when to use Custom Image HTTP Functions (Runtime: CustomImage) deployed from a TCR image.
- Describes using MCP entrances for reads and writes: reads via queryFunctions, queryGateway; writes via manageFunctions, manageGateway; and translating legacy names before action.
- Specifies deployment procedures: createFunction for creation, updateFunctionCode for code updates, and updateFunctionConfig for config updates (timeout, memorySize, envVariables).
- For Custom Image HTTP Functions, instructs creating the function with func.runtime="CustomImage" and imageConfig (imageUri with tag, registryId for enterprise TCR), then updating via updateFunctionCode with imageConfig; no functionRootPath is needed because code resides in the image.
- Recommends preferring MCP tools over CLI, and provides credential handling guidelines for HTTP Functions using @cloudbase/node-sdk or @cloudbase/manager-node, including server API Keys and SecretId/SecretKey handling.
- Emphasizes reading the appropriate reference files for deeper details (event-functions.md, http-functions.md, http-function-credentials.md, http-functions-custom-image.md, operations-and-config.md).
When to use it
- Use when tasks involve creating, updating, deploying, inspecting, or debugging CloudBase Event Functions or HTTP Functions that run runtime code, and when triggers or function gateway exposure are mentioned.
What it can touch
- Tools mentioned: claude-code, cursor. Actions include manageFunctions, queryFunctions, manageGateway, and read references for credentials and HTTP function deployment specifics. Credential handling may involve CLOUDBASE API keys or Tencent Cloud keys, depending on the SDK used.
Caveats
- Do not use for CloudRun, UI authentication UI, database schema design, or direct CloudBase platform API clients unrelated to function runtime development.
- Follow Change Safety Protocol and Deployment Gate before changes and deployments.
- The guidance distinguishes Event vs HTTP functions and warns against mixing code shapes (exports.main vs req/res) and against relying on HTTP Access as the implementation model for HTTP Functions.
- For HTTP Functions using CloudBase SDKs, explicit credentials must be provided; do not hardcode credentials in the function package.
## Standalone Install Note If this environment only installed the current skill, start from the CloudBase main entry and use the published `cloudbase/references/...` paths for sibling skills. - CloudBase main entry: `https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/SKILL.md` - Current skill raw source: `https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/cloud-functions/SKILL.md` Keep local `references/...` paths for files that ship with the current skill directory. When this file points to a sibling skill such as `auth-tool-cloudbase` or `web-development`, use the standalone fallback URL shown next to that reference. **Cross-cutting protocols** (required for public exposure and code changes): - Change Safety Protocol: `https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/cloudbase-platform/references/protocols/change-safety-protocol.md` - Deployment Gate: `https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/cloudbase-platform/references/protocols/deployment-gate.md` # Cloud Functions Development #
- Standalone Install Note
- Activation Contract
- Use this first when
- Read before writing code if
- Exception only (do not read by default)
- Then also read
- Do NOT use for
- Common mistakes / gotchas
- Minimal checklist
- Overview
- Writing mode at a glance
- HTTP Function authoring contract
- Quick decision table
- How to use this skill (for a coding agent)
What does the cloud-functions skill do?
CloudBase function runtime guide for building, deploying, and debugging your own Event Functions or HTTP Functions. This skill should be used when users need application runtime code on CloudBase, not when they are merely calling CloudBase official platform APIs.
How do I install it?
Run `npx skills add TencentCloudBase/CloudBase-AI-Toolkit --skill cloud-functions --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From TencentCloudBase/CloudBase-AI-Toolkit, a repository with 1,066 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
