cloud-functions_skill

This skill helps you develop, deploy, and manage CloudBase cloud functions by guiding runtime selection, deployment, logging, and HTTP access configuration.
  • TypeScript

975

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill tencentcloudbase/cloudbase-mcp --skill cloud-functions

  • SKILL.md18.5 KB

Overview

This skill is a complete guide for developing, deploying, and managing CloudBase cloud functions using Node.js. It covers runtime selection, function structure, deployment commands, logging, invocation methods, HTTP access configuration, and environment variable handling. Use it to reliably create and operate serverless functions on CloudBase.

How this skill works

The skill explains the lifecycle of a cloud function: choose a runtime at creation, organize function folders and entry points, deploy code, and configure runtime options like timeouts, VPC, and triggers. It describes how to query logs and log details, invoke functions from web, mini program, Node.js, or via HTTP, and how to create direct HTTP endpoints or use the CloudBase API. It emphasizes constraints such as immutable runtime and environment variable merge requirements.

When to use it

  • Creating or deploying new Node.js CloudBase functions
  • Updating function code or configuration without changing runtime
  • Debugging and monitoring function executions via logs
  • Exposing functions as HTTP endpoints for REST access
  • Configuring scheduled triggers, VPC access, or environment variables

Best practices

  • Always specify runtime explicitly at creation; prefer Nodejs18.15 for new projects
  • Use absolute functionRootPath and do not include the function folder name
  • Do not upload node_modules; let CloudBase install dependencies
  • When updating env vars, first fetch current config and merge to avoid accidental deletion
  • Query logs in 1-day windows and use RequestId for detailed debugging
  • Keep functions single-purpose, add meaningful logs, and use environment variables for secrets

Example use cases

  • Deploy a webhook handler with direct HTTP access and custom path
  • Create a scheduled cleanup job using a timer trigger and cron expression
  • Invoke backend logic from a mini program using wx.cloud.callFunction
  • Debug a failing invocation by retrieving logs list and requesting log detail by RequestId
  • Migrate code updates via updateFunctionCode while preserving runtime and config

FAQ

No. Runtime is immutable. Delete and recreate the function with the desired runtime.

How do I update environment variables without losing existing ones?

First fetch function details (action=detail), merge existing envVariables with new ones, then call updateFunctionConfig with the merged set.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
cloud-functions skill by tencentcloudbase/cloudbase-mcp | VeilStrat