cloud-functions

Create, deploy, and inspect CloudBase Event and HTTP Functions.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/mrpersimmon/xiao-han-studio --skill cloud-functions-mrpersimmon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloud-functions
Source: https://github.com/mrpersimmon/xiao-han-studio/tree/main/.agents/skills/cloudbase/references/cloud-functions
Command: npx skills add https://github.com/mrpersimmon/xiao-han-studio --skill cloud-functions-mrpersimmon

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you develop, deploy, and troubleshoot CloudBase Event Functions and HTTP Functions so your application runtime logic runs correctly in the CloudBase environment.

Core Features & Use Cases

  • Event vs HTTP Function authoring: Choose the correct programming model for SDK/timer-driven code (exports.main(event, context)) or for web endpoints (web server on port 9000).
  • HTTP Function runtime correctness: Ensure scf_bootstrap is present and matches the configured Node.js runtime, with explicit response handling and CORS support.
  • Operational workflows: Create/update function code and configuration using the preferred MCP tools, inspect logs, and set gateway exposure and security rules when needed.

Use Cases

  • Implement event-driven backend logic using Event Functions (e.g., processing messages or scheduled jobs).
  • Create browser-facing APIs or SSE/WebSocket-like services using HTTP Functions with correct server runtime behavior.
  • Diagnose production issues by checking function logs and adjusting environment variables and gateway/security configuration safely.

Quick Start

Ask: create a CloudBase HTTP Function endpoint that listens on port 9000, includes CORS, returns a JSON health response at /health, and show how to deploy it and then verify it with a test request.

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 that listens on port 9000?

To create a CloudBase HTTP Function, you must build a web server listening on port 9000, include an scf_bootstrap file matching your Node.js runtime, and configure explicit response handling with CORS support before deploying.

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

CloudBase Event Functions use the `exports.main(event, context)` model for SDK or timer-driven backend logic, whereas HTTP Functions expose web endpoints by running a dedicated server runtime on port 9000.

How do I deploy serverless functions and inspect logs in CloudBase?

You can deploy serverless functions and inspect logs by using preferred MCP function management tools to create, update, and configure code, then retrieving operational logs to diagnose production issues.

Why does my CloudBase HTTP Function fail to start correctly?

Your CloudBase HTTP Function may fail if the scf_bootstrap file is missing or does not match the configured Node.js runtime, or if the web server is not explicitly bound to port 9000.

Can I expose browser-facing APIs using CloudBase serverless functions?

Yes, you can expose browser-facing APIs by creating HTTP Functions with correct server runtime behavior, then setting gateway exposure and configuring security rules for web access.

How do I implement scheduled jobs or message processing with CloudBase?

You implement scheduled jobs or message processing by authoring Event Functions using the `exports.main(event, context)` programming model to handle event-driven backend logic.