cloudrun-development
CloudBase Run backend development rules (Function mode/Container mode). Use this skill when deploying backend services that require long connections, multi-language support, custom environments, or AI agent development.
Install
mkdir -p .claude/skills/cloudrun-development && curl -L -o skill.zip "https://mcp.directory/api/skills/download/2417" && unzip -o skill.zip -d .claude/skills/cloudrun-development && rm skill.zipInstalls to .claude/skills/cloudrun-development
About this skill
When to use this skill
Use this skill for CloudBase Run backend service development when you need:
- Long connection capabilities: WebSocket / SSE / server push
- Long-running or persistent processes: tasks that are not suitable for cloud functions, background jobs
- Custom runtime environments/system dependencies: custom images, specific system libraries
- Multi-language/arbitrary frameworks: Java, Go, PHP, .NET, Python, Node.js, etc.
- Stable external services with elastic scaling: pay-as-you-go, can scale down to 0
- Private/internal network access: VPC/PRIVATE access, mini-program
callContainerinternal direct connection - AI agent development: develop personalized AI applications based on Function mode CloudRun
Do NOT use for:
- Simple cloud functions (use cloud function development instead)
- Frontend-only applications
- Database schema design (use data-model-creation skill)
How to use this skill (for a coding agent)
-
Choose the right mode
- Function mode: Fastest to get started, built-in HTTP/WebSocket/SSE, fixed port 3000, local running supported
- Container mode: Any language and runtime, requires Dockerfile, local running not supported by tools
-
Follow mandatory requirements
- Must listen on
PORTenvironment variable (real port in container) - Stateless service: write data externally (DB/storage/cache)
- No background persistent threads/processes outside requests
- Minimize dependencies, slim images; reduce cold start and deployment time
- Resource constraints:
Mem = 2 × CPU(e.g., 0.25 vCPU → 0.5 GB) - Access control: Only enable public network for Web scenarios; mini-programs prioritize internal direct connection, recommend closing public network
- Must listen on
-
Use tools correctly
- Read operations:
queryCloudRun(list, detail, templates) - Write operations:
manageCloudRun(init, download, run, deploy, delete, createAgent) - Always use absolute paths for
targetPath - Use
force: truefor delete operations
- Read operations:
-
Follow the workflow
- Initialize project → Check/generate Dockerfile (for container mode) → Local run (function mode only) → Configure access → Deploy → Verify
CloudBase Run AI Development Rules
A concise guide for AI assistants and engineering collaboration, providing "when to use, how to use" rules and tool workflows.
1. When to use CloudBase Run (Use Cases)
- Need long connection capabilities: WebSocket / SSE / server push
- Need long-running or persistent processes: tasks that are not suitable for cloud functions, background jobs
- Need custom runtime environments/system dependencies: custom images, specific system libraries
- Use multi-language/arbitrary frameworks: Java, Go, PHP, .NET, Python, Node.js, etc.
- Need stable external services with elastic scaling: pay-as-you-go, can scale down to 0
- Need private/internal network access: VPC/PRIVATE access, mini-program
callContainerinternal direct connection - Need to develop AI agents: develop personalized AI applications based on Function mode CloudRun
2. Mode Selection (Quick Comparison)
- Function mode: Fastest to get started, built-in HTTP/WebSocket/SSE, fixed port 3000; local running supported by tools
- Container mode: Any language and runtime, requires Dockerfile; local running not supported by tools
Mode Comparison Checklist
| Dimension | Function Mode | Container Mode |
|---|---|---|
| Language/Framework | Node.js (via @cloudbase/functions-framework) | Any language/runtime (Java/Go/PHP/.NET/Python/Node.js, etc.) |
| Runtime | Function framework loads functions (Runtime) | Docker image starts process |
| Port | Fixed 3000 | Application listens on PORT (injected by platform during deployment) |
| Dockerfile | Not required | Required (and must pass local build) |
| Local Running | Supported (built-in tools) | Not supported (recommend using Docker for debugging) |
| Typical Scenarios | WebSocket/SSE/streaming responses, forms/files, low latency, multiple functions per instance, shared memory | Arbitrary system dependencies/languages, migrating existing containerized applications |
3. Development Requirements (Must Meet)
- Must listen on
PORTenvironment variable (real port in container) - Stateless service: write data externally (DB/storage/cache)
- No background persistent threads/processes outside requests
- Minimize dependencies, slim images; reduce cold start and deployment time
- Resource constraints:
Mem = 2 × CPU(e.g., 0.25 vCPU → 0.5 GB) - Access control: Only enable public network for Web scenarios; mini-programs prioritize internal direct connection, recommend closing public network
4. Tools (Plain Language & Read/Write Separation)
- Read operations (
queryCloudRun):list: What services do I have? Can filter by name/typedetail: Current configuration, version, access address of a servicetemplates: Ready-to-use starter templates
- Write operations (
manageCloudRun):init: Create local project (optional template)download: Pull existing service code to localrun: Run locally (Function mode only, supports normal function and Agent mode)deploy: Deploy local code to CloudRundelete: Delete service (requires explicit confirmation)createAgent: Create AI agent (based on Function mode CloudRun)
- Important parameters (remember these):
targetPath: Local directory (must be absolute path)serverConfig: Deployment parameters (CPU/Mem/instance count/access type/environment variables, etc.)runOptions: Local running port and temporary environment variables (Function mode), supportsrunMode: 'normal' | 'agent'agentConfig: Agent configuration (agentName, botTag, description, template)- Delete must include
force: true, otherwise it won't execute
5. Core Workflow (Understand Steps First, Then Examples)
-
Choose mode
- Need multi-language/existing container/Docker: choose "Container mode"
- Need long connection/streaming/low latency/multiple functions coexisting: prioritize "Function mode"
-
Initialize local project
- General: Use template
init(both Function mode and Container mode can start from templates) - Container mode must "check or generate Dockerfile":
- Node.js minimal example:
FROM node:18-alpine WORKDIR /app COPY package*.json ./ RUN npm ci --omit=dev COPY . . ENV NODE_ENV=production EXPOSE 3000 CMD ["node","server.js"] - Python minimal example:
FROM python:3.11-slim WORKDIR /app COPY requirements.txt ./ RUN pip install -r requirements.txt --no-cache-dir COPY . . ENV PORT=3000 EXPOSE 3000 CMD ["python","app.py"]
- Node.js minimal example:
- General: Use template
-
Local running (Function mode only)
- Automatically use
npm run dev/startor entry file viarun
- Automatically use
-
Configure access
- Set
OpenAccessTypes(WEB/VPC/PRIVATE) as needed; configure security domain and authentication for Web scenarios
- Set
-
Deploy
- Specify CPU/Mem/instance count/environment variables, etc. during
deploy
- Specify CPU/Mem/instance count/environment variables, etc. during
-
Verify
- Use
detailto confirm access address and configuration meet expectations
- Use
Example Tool Calls
- View templates/services
{ "name": "queryCloudRun", "arguments": { "action": "templates" } }
{ "name": "queryCloudRun", "arguments": { "action": "detail", "detailServerName": "my-svc" } }
- Initialize project
{ "name": "manageCloudRun", "arguments": { "action": "init", "serverName": "my-svc", "targetPath": "/abs/ws/my-svc", "template": "helloworld" } }
- Download code (optional)
{ "name": "manageCloudRun", "arguments": { "action": "download", "serverName": "my-svc", "targetPath": "/abs/ws/my-svc" } }
- Local running (Function mode only)
{ "name": "manageCloudRun", "arguments": { "action": "run", "serverName": "my-svc", "targetPath": "/abs/ws/my-svc", "runOptions": { "port": 3000 } } }
- Deploy
{ "name": "manageCloudRun", "arguments": { "action": "deploy", "serverName": "my-svc", "targetPath": "/abs/ws/my-svc", "serverConfig": { "OpenAccessTypes": ["WEB"], "Cpu": 0.5, "Mem": 1, "MinNum": 0, "MaxNum": 5 } } }
- Create AI agent (optional)
{ "name": "manageCloudRun", "arguments": { "action": "createAgent", "serverName": "my-agent", "targetPath": "/abs/ws/agents", "agentConfig": { "agentName": "MyAgent", "botTag": "demo", "description": "My agent", "template": "blank" } } }
- Run agent (optional)
{ "name": "manageCloudRun", "arguments": { "action": "run", "serverName": "my-agent", "targetPath": "/abs/ws/agents/my-agent", "runOptions": { "port": 3000, "runMode": "agent" } } }
6. Best Practices (Strongly Recommended)
- Prioritize PRIVATE/VPC or mini-program internal
callContainer, reduce public network exposure - Web must use CloudBase Web SDK authentication; mini-programs authenticated by platform
- Secrets via environment variables; separate configuration for multiple environments (dev/stg/prod)
- Use
queryCloudRun.detailto verify configuration and accessibility before and after deployment - Image layers reusable, small volume; monitor startup latency and memory usage
- Agent development: Use
@cloudbase/aiagent-framework, supports SSE streaming responses, BotId format isibot-{name}-{tag}
7. Quick Troubleshooting
- Access failure: Check OpenAccessTypes/domain/port, whether instance scaled down to 0
- Deployment failure: Verify Dockerfile/build logs/image volume and CPU/Mem ratio
- Local running failure: Only Function mode supported; requires
package.jsondev/startor entryindex.js|app.js|server.js - Performance jitter: Reduce dependencies and initialization; appropriately increase MinNum; optimize cold start
- **Agent
Content truncated.
More by TencentCloudBase
View all skills by TencentCloudBase →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
Related MCP Servers
Browse all serversConnect Supabase projects to AI with Supabase MCP Server. Standardize LLM communication for secure, efficient developmen
Deploy, monitor, and manage cloud based DBMS and cloud database management tasks on Tencent CloudBase with AI-powered to
Deploy, monitor, and manage full-stack apps on Tencent CloudBase—tools for cloud environments, databases, functions, hos
Boost Payload CMS 3.0 development with validation, querying, and Redis-integrated code generation for efficient project
Claude Todo Emulator provides persistent task management with unique IDs, one in-progress task rule, and workspace-local
Magic-API is an advanced API documentation platform for managing, debugging, and exploring your swagger API and openapi
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.