cloud-functions

Build, deploy, and debug CloudBase Event Functions and HTTP Functions.

Updated May 14, 2026
One-click install
npx skills add https://github.com/study-yang/Vieb-Coding-- --skill cloud-functions-study-yang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloud-functions
Source: https://github.com/study-yang/Vieb-Coding--/tree/main/%E5%BE%AE%E4%BF%A1%E5%B0%8F%E7%A8%8B%E5%BA%8F-%E5%BF%AB%E8%AE%B0/.codebuddy/skills/cloud-functions
Command: npx skills add https://github.com/study-yang/Vieb-Coding-- --skill cloud-functions-study-yang

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Choosing the wrong CloudBase function model or misconfiguring deployment leads to broken runtimes, rejected requests, and wasted debugging time. This Skill guides you through creating, deploying, and operating CloudBase Event Functions and HTTP Functions with the correct code shape, packaging, and access configuration. ## Core Features & Use Cases - Function type routing: Decide between Event Functions (exports.main(event, context)) for SDK/timer triggers and HTTP Functions (web server on port 9000 with scf_bootstrap) for REST APIs, SSE, and WebSocket services. - Deployment via MCP tools: Create functions, update code, and manage configuration through manageFunctions and queryFunctions, with legacy tool-name translation and documented callCloudApi fallbacks. - Operations support: Query function logs, configure gateway access, merge environment variables safely, and set function security rules for public endpoints. - Use Case: You need a public REST endpoint for a mini program. The Skill walks you through writing a Node.js HTTP Function with the native http module, adding a matching scf_bootstrap, deploying with type: "HTTP", and updating the security rule so callers are not rejected with EXCEED_AUTHORITY. ## Quick Start Ask the agent to create and deploy a CloudBase HTTP Function named hello-http that listens on port 9000 and returns a JSON greeting.

Frequently Asked Questions about cloud-functions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a CloudBase HTTP Function in Node.js?

Write a web server with the native http module listening on port 9000, add an executable scf_bootstrap file pointing to the matching Node binary, and deploy with manageFunctions using type "HTTP" and protocolType "HTTP". Do not use the exports.main(event, context) handler shape.

What is the difference between CloudBase Event Functions and HTTP Functions?

Event Functions use exports.main(event, context), are triggered by SDK calls or timers, and auto-install dependencies from package.json. HTTP Functions are web servers on port 9000 requiring scf_bootstrap and bundled dependencies, suited for REST APIs, SSE, and WebSocket.

Why does my CloudBase HTTP Function return EXCEED_AUTHORITY?

HTTP Functions reject unauthenticated callers by default. Update the function security rule with managePermissions using resourceType "function" and rule "true" for public access, since anonymous login is disabled by default in new environments.

How do I query CloudBase function logs?

Use queryFunctions with action listFunctionLogs and a functionName to list execution logs, then getFunctionLogDetail with a requestId for a specific entry. For cross-service searches, use queryLogs with CLS query syntax.

Can I change the runtime of a CloudBase function after creation?

No, the runtime is fixed at creation time and cannot be changed later. If a different runtime is needed, you must recreate the function, and for HTTP Functions the scf_bootstrap Node binary path must match the new runtime.

When should I use CloudRun instead of CloudBase functions?

Use CloudRun when the workload needs a long-lived container service, custom system packages, or an Agent runtime. Cloud Functions fit event-driven handlers and standard HTTP endpoints, not broader container architectures.