- Home
- Skills
- Tencentcloudbase
- Cloudbase Mcp
- Cloudrun Development
cloudrun-development_skill
- 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 cloudrun-development- SKILL.md13.1 KB
Overview
This skill provides development rules and tooling guidance for CloudBase Run backend services in Function mode and Container mode. It helps engineers and AI agents choose the right mode, follow mandatory runtime constraints, and use CloudBase Run read/write tools to initialize, run, deploy, and manage services. Use it when you need long connections, custom runtimes, multi-language support, or to build AI agents.
How this skill works
The skill inspects mode requirements (Function vs Container), mandatory runtime constraints (listen on PORT, statelessness, resource ratios), and tool actions (queryCloudRun/manageCloudRun). It guides the developer through initializing a project, validating Dockerfile for container mode, running locally for Function mode, configuring access, deploying with serverConfig, and verifying with detail queries. It also provides recommended patterns for agent development and secure network configuration.
When to use it
- When you need WebSocket/SSE/server push or long-lived connections
- When tasks require long-running processes or background jobs unsuitable for cloud functions
- When you need custom system libraries or arbitrary language runtimes (Java, Go, Python, .NET, etc.)
- When building AI agents or personalized streaming-agent services using Function mode
- When you need private/VPC/internal network access for mini-programs or internal services
- When you need elastic services with pay-as-you-go scaling and scale-to-zero
Best practices
- Prefer Function mode for WebSocket/SSE, streaming responses, and local debugging; use Container mode for custom runtimes and existing Docker apps
- Always listen on the PORT environment variable and keep services stateless; persist data to DB/storage/cache
- Minimize dependencies and build slim images to reduce cold starts; follow Mem = 2 × CPU constraint
- Use PRIVATE/VPC or mini-program internal callContainer for internal traffic; enable public WEB access only when required
- Store secrets in environment variables and separate configs for dev/stg/prod; verify configuration with queryCloudRun.detail before and after deploy
- For agents, use @cloudbase/aiagent-framework and SSE streaming; follow BotId format and SSE response conventions
Example use cases
- Real-time chat service using WebSocket with Function mode for low latency
- AI assistant agent built with Function mode and @cloudbase/aiagent-framework streaming via SSE
- Existing enterprise app migrated to Container mode with custom OS libraries and Dockerfile
- Mini-program internal business logic call using callContainer with PRIVATE access
- Background worker requiring longer execution and persistent connections not supported by cloud functions
FAQ
Choose Function mode: it supports SSE streaming, WebSocket, local running, and integrates with the aiagent framework for streaming responses.
What port must my app listen on?
Always listen on the PORT environment variable injected by the platform; Function mode uses fixed port 3000 locally.
Can I run Container mode locally with the provided tools?
No. Local run is supported only for Function mode. Use Docker locally to build and debug Container mode applications.