[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6HSBVBV1XM03W45FXM3PD7Z":3,"skill-same:01M6HSBVBV1XM03W45FXM3PD7Z":74},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":25,"publishedAt":48,"linkOnly":49,"markdownContent":50,"markdownBody":51,"frontMatter":52,"refName":53,"commitSha":54,"skillDirectory":55,"forksCount":56,"repositoryHtmlUrl":57,"repositoryHomepageUrl":6,"ownerHtmlUrl":58,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":59,"install":60,"resources":73},"01M6HSBVBV1XM03W45FXM3PD7Z","cloudrun-development",null,"CloudBase Run backend development rules (Function mode\u002FContainer mode). Use this skill when deploying backend services that require long connections, multi-language support, custom environments, or AI agent development.","welflau\u002Fai-dev-system","welflau","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F7010385?v=4","01M6HPTDGF18RFY07M229P8CTM","01M6HPTDMRMZCJPYBFEA9XVVYT",3,"MIT","https:\u002F\u002Fgithub.com\u002Fwelflau\u002Fai-dev-system\u002Fblob\u002Fmain\u002Fbackend\u002Fskills\u002Fmarketplace\u002Fcodebuddy-plugins-official\u002Fplugins\u002Fcloudbase\u002Fskills\u002Fcloudbase\u002Freferences\u002Fcloudrun-development\u002FSKILL.md",[17,22],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":23,"categoryName":24,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发",[26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47],"development","cloudrun development","connections","when","custom","cloudbase","mode","environments","multi","long","false","backend services","ai agent","ai agent development","container","backend","use","Rules","agent development","services","run","support","2026-11-10 10:12:30",false,"---\nname: cloudrun-development\ndescription: CloudBase Run backend development rules (Function mode\u002FContainer mode). Use this skill when deploying backend services that require long connections, multi-language support, custom environments, or AI agent development.\nalwaysApply: false\n---\n\n## When to use this skill\n\nUse this skill for **CloudBase Run backend service development** when you need:\n\n- Long connection capabilities: WebSocket \u002F SSE \u002F server push\n- Long-running or persistent processes: tasks that are not suitable for cloud functions, background jobs\n- Custom runtime environments\u002Fsystem dependencies: custom images, specific system libraries\n- Multi-language\u002Farbitrary frameworks: Java, Go, PHP, .NET, Python, Node.js, etc.\n- Stable external services with elastic scaling: pay-as-you-go, can scale down to 0\n- Private\u002Finternal network access: VPC\u002FPRIVATE access, mini-program `callContainer` internal direct connection\n- AI agent development: develop personalized AI applications based on Function mode CloudRun\n\n**Do NOT use for:**\n- Simple cloud functions (use cloud function development instead)\n- Frontend-only applications\n- Database schema design (use data-model-creation skill)\n\n---\n\n## How to use this skill (for a coding agent)\n\n1. **Choose the right mode**\n   - **Function mode**: Fastest to get started, built-in HTTP\u002FWebSocket\u002FSSE, fixed port 3000, local running supported\n   - **Container mode**: Any language and runtime, requires Dockerfile, local running not supported by tools\n\n2. **Follow mandatory requirements**\n   - Must listen on `PORT` environment variable (real port in container)\n   - Stateless service: write data externally (DB\u002Fstorage\u002Fcache)\n   - No background persistent threads\u002Fprocesses outside requests\n   - Minimize dependencies, slim images; reduce cold start and deployment time\n   - Resource constraints: `Mem = 2 × CPU` (e.g., 0.25 vCPU → 0.5 GB)\n   - Access control: Only enable public network for Web scenarios; mini-programs prioritize internal direct connection, recommend closing public network\n\n3. **Use tools correctly**\n   - **Read operations**: `queryCloudRun` (list, detail, templates)\n   - **Write operations**: `manageCloudRun` (init, download, run, deploy, delete, createAgent)\n   - Always use absolute paths for `targetPath`\n   - Use `force: true` for delete operations\n\n4. **Follow the workflow**\n   - Initialize project → Check\u002Fgenerate Dockerfile (for container mode) → Local run (function mode only) → Configure access → Deploy → Verify\n\n---\n\n# CloudBase Run AI Development Rules\n\nA concise guide for AI assistants and engineering collaboration, providing \"when to use, how to use\" rules and tool workflows.\n\n## 1. When to use CloudBase Run (Use Cases)\n\n- Need long connection capabilities: WebSocket \u002F SSE \u002F server push\n- Need long-running or persistent processes: tasks that are not suitable for cloud functions, background jobs\n- Need custom runtime environments\u002Fsystem dependencies: custom images, specific system libraries\n- Use multi-language\u002Farbitrary frameworks: Java, Go, PHP, .NET, Python, Node.js, etc.\n- Need stable external services with elastic scaling: pay-as-you-go, can scale down to 0\n- Need private\u002Finternal network access: VPC\u002FPRIVATE access, mini-program `callContainer` internal direct connection\n- Need to develop AI agents: develop personalized AI applications based on Function mode CloudRun\n\n## 2. Mode Selection (Quick Comparison)\n\n- **Function mode**: Fastest to get started, built-in HTTP\u002FWebSocket\u002FSSE, fixed port 3000; local running supported by tools\n- **Container mode**: Any language and runtime, requires Dockerfile; local running not supported by tools\n\n### Mode Comparison Checklist\n\n| Dimension | Function Mode | Container Mode |\n| --- | --- | --- |\n| Language\u002FFramework | Node.js (via `@cloudbase\u002Ffunctions-framework`) | Any language\u002Fruntime (Java\u002FGo\u002FPHP\u002F.NET\u002FPython\u002FNode.js, etc.) |\n| Runtime | Function framework loads functions (Runtime) | Docker image starts process |\n| Port | Fixed 3000 | Application listens on `PORT` (injected by platform during deployment) |\n| Dockerfile | Not required | Required (and must pass local build) |\n| Local Running | Supported (built-in tools) | Not supported (recommend using Docker for debugging) |\n| Typical Scenarios | WebSocket\u002FSSE\u002Fstreaming responses, forms\u002Ffiles, low latency, multiple functions per instance, shared memory | Arbitrary system dependencies\u002Flanguages, migrating existing containerized applications |\n\n## 3. Development Requirements (Must Meet)\n\n- Must listen on `PORT` environment variable (real port in container)\n- Stateless service: write data externally (DB\u002Fstorage\u002Fcache)\n- No background persistent threads\u002Fprocesses outside requests\n- Minimize dependencies, slim images; reduce cold start and deployment time\n- Resource constraints: `Mem = 2 × CPU` (e.g., 0.25 vCPU → 0.5 GB)\n- Access control: Only enable public network for Web scenarios; mini-programs prioritize internal direct connection, recommend closing public network\n\n## 4. Tools (Plain Language & Read\u002FWrite Separation)\n\n- **Read operations** (`queryCloudRun`):\n  - `list`: What services do I have? Can filter by name\u002Ftype\n  - `detail`: Current configuration, version, access address of a service\n  - `templates`: Ready-to-use starter templates\n- **Write operations** (`manageCloudRun`):\n  - `init`: Create local project (optional template)\n  - `download`: Pull existing service code to local\n  - `run`: Run locally (Function mode only, supports normal function and Agent mode)\n  - `deploy`: Deploy local code to CloudRun\n  - `delete`: Delete service (requires explicit confirmation)\n  - `createAgent`: Create AI agent (based on Function mode CloudRun)\n- **Important parameters** (remember these):\n  - `targetPath`: Local directory (must be absolute path)\n  - `serverConfig`: Deployment parameters (CPU\u002FMem\u002Finstance count\u002Faccess type\u002Fenvironment variables, etc.)\n  - `runOptions`: Local running port and temporary environment variables (Function mode), supports `runMode: 'normal' | 'agent'`\n  - `agentConfig`: Agent configuration (agentName, botTag, description, template)\n  - Delete must include `force: true`, otherwise it won't execute\n\n## 5. Core Workflow (Understand Steps First, Then Examples)\n\n1) **Choose mode**\n   - Need multi-language\u002Fexisting container\u002FDocker: choose \"Container mode\"\n   - Need long connection\u002Fstreaming\u002Flow latency\u002Fmultiple functions coexisting: prioritize \"Function mode\"\n\n2) **Initialize local project**\n   - General: Use template `init` (both Function mode and Container mode can start from templates)\n   - Container mode must \"check or generate Dockerfile\":\n     - Node.js minimal example:\n       ```dockerfile\n       FROM node:18-alpine\n       WORKDIR \u002Fapp\n       COPY package*.json .\u002F\n       RUN npm ci --omit=dev\n       COPY . .\n       ENV NODE_ENV=production\n       EXPOSE 3000\n       CMD [\"node\",\"server.js\"]\n       ```\n     - Python minimal example:\n       ```dockerfile\n       FROM python:3.11-slim\n       WORKDIR \u002Fapp\n       COPY requirements.txt .\u002F\n       RUN pip install -r requirements.txt --no-cache-dir\n       COPY . .\n       ENV PORT=3000\n       EXPOSE 3000\n       CMD [\"python\",\"app.py\"]\n       ```\n\n3) **Local running** (Function mode only)\n   - Automatically use `npm run dev\u002Fstart` or entry file via `run`\n\n4) **Configure access**\n   - Set `OpenAccessTypes` (WEB\u002FVPC\u002FPRIVATE) as needed; configure security domain and authentication for Web scenarios\n\n5) **Deploy**\n   - Specify CPU\u002FMem\u002Finstance count\u002Fenvironment variables, etc. during `deploy`\n\n6) **Verify**\n   - Use `detail` to confirm access address and configuration meet expectations\n\n### Example Tool Calls\n\n1) **View templates\u002Fservices**\n```json\n{ \"name\": \"queryCloudRun\", \"arguments\": { \"action\": \"templates\" } }\n```\n```json\n{ \"name\": \"queryCloudRun\", \"arguments\": { \"action\": \"detail\", \"detailServerName\": \"my-svc\" } }\n```\n\n2) **Initialize project**\n```json\n{ \"name\": \"manageCloudRun\", \"arguments\": { \"action\": \"init\", \"serverName\": \"my-svc\", \"targetPath\": \"\u002Fabs\u002Fws\u002Fmy-svc\", \"template\": \"helloworld\" } }\n```\n\n3) **Download code** (optional)\n```json\n{ \"name\": \"manageCloudRun\", \"arguments\": { \"action\": \"download\", \"serverName\": \"my-svc\", \"targetPath\": \"\u002Fabs\u002Fws\u002Fmy-svc\" } }\n```\n\n4) **Local running** (Function mode only)\n```json\n{ \"name\": \"manageCloudRun\", \"arguments\": { \"action\": \"run\", \"serverName\": \"my-svc\", \"targetPath\": \"\u002Fabs\u002Fws\u002Fmy-svc\", \"runOptions\": { \"port\": 3000 } } }\n```\n\n5) **Deploy**\n```json\n{ \"name\": \"manageCloudRun\", \"arguments\": { \"action\": \"deploy\", \"serverName\": \"my-svc\", \"targetPath\": \"\u002Fabs\u002Fws\u002Fmy-svc\", \"serverConfig\": { \"OpenAccessTypes\": [\"WEB\"], \"Cpu\": 0.5, \"Mem\": 1, \"MinNum\": 0, \"MaxNum\": 5 } } }\n```\n\n6) **Create AI agent** (optional)\n```json\n{ \"name\": \"manageCloudRun\", \"arguments\": { \"action\": \"createAgent\", \"serverName\": \"my-agent\", \"targetPath\": \"\u002Fabs\u002Fws\u002Fagents\", \"agentConfig\": { \"agentName\": \"MyAgent\", \"botTag\": \"demo\", \"description\": \"My agent\", \"template\": \"blank\" } } }\n```\n\n7) **Run agent** (optional)\n```json\n{ \"name\": \"manageCloudRun\", \"arguments\": { \"action\": \"run\", \"serverName\": \"my-agent\", \"targetPath\": \"\u002Fabs\u002Fws\u002Fagents\u002Fmy-agent\", \"runOptions\": { \"port\": 3000, \"runMode\": \"agent\" } } }\n```\n\n## 6. Best Practices (Strongly Recommended)\n\n- Prioritize PRIVATE\u002FVPC or mini-program internal `callContainer`, reduce public network exposure\n- Web must use CloudBase Web SDK authentication; mini-programs authenticated by platform\n- Secrets via environment variables; separate configuration for multiple environments (dev\u002Fstg\u002Fprod)\n- Use `queryCloudRun.detail` to verify configuration and accessibility before and after deployment\n- Image layers reusable, small volume; monitor startup latency and memory usage\n- Agent development: Use `@cloudbase\u002Faiagent-framework`, supports SSE streaming responses, BotId format is `ibot-{name}-{tag}`\n\n## 7. Quick Troubleshooting\n\n- **Access failure**: Check OpenAccessTypes\u002Fdomain\u002Fport, whether instance scaled down to 0\n- **Deployment failure**: Verify Dockerfile\u002Fbuild logs\u002Fimage volume and CPU\u002FMem ratio\n- **Local running failure**: Only Function mode supported; requires `package.json` `dev`\u002F`start` or entry `index.js|app.js|server.js`\n- **Performance jitter**: Reduce dependencies and initialization; appropriately increase MinNum; optimize cold start\n- **Agent running failure**: Check `@cloudbase\u002Faiagent-framework` dependency, BotId format, SSE response format\n\n## 8. Function Mode CloudRun (Function Mode) Key Points (Concise)\n\n- **Definition**: CloudRun + function framework (`@cloudbase\u002Ffunctions-framework`) + function code, making container service development as simple as writing cloud functions\n- **When to choose**: Need WebSocket\u002FSSE\u002Ffile upload\u002Fstreaming responses; need long tasks or connect to DB\u002Fmessage queue; need multiple functions per instance and shared memory, low latency and better logs\u002Fdebugging\n- **Agent mode**: Develop AI agents based on Function mode CloudRun, use `@cloudbase\u002Faiagent-framework`, supports SSE streaming responses and personalized AI applications\n- **Tool support**: Local running only supports Function mode (`manageCloudRun` → `run`); deploy using `manageCloudRun` → `deploy`; query using `queryCloudRun`\n- **Migration tips**: Different from cloud function call chain\u002Fruntime, migration requires minor modifications (including client calling methods)\n- **Portability**: Based on function framework, can run locally\u002Fhost\u002FDocker, non-CloudRun requires self-managed build and deployment\n\n## 9. Service Invocation Methods (Concise Examples)\n\n### HTTP Direct Access (when WEB public network enabled)\n```bash\ncurl -L \"https:\u002F\u002F\u003Cyour-service-domain>\"\n```\n\n### WeChat Mini Program (internal direct connection, recommend closing public network)\n```js\n\u002F\u002F app.js (ensure wx.cloud.init() is called)\nconst res = await wx.cloud.callContainer({\n  config: { env: \"\u003CenvId>\" },\n  path: \"\u002F\",\n  method: \"GET\",\n  header: { \"X-WX-SERVICE\": \"\u003CserviceName>\" }\n});\n```\n\n### Web (JS SDK, need to configure security domain and authentication)\n```js\nimport cloudbase from \"@cloudbase\u002Fjs-sdk\";\n\nconst app = cloudbase.init({ env: \"\u003CenvId>\" });  \u002F\u002F Collect user's phone number into variable `phoneNum` by providing a input UI\n\nconst auth = app.auth();\n\n\u002F\u002F Send SMS code\nconst verificationInfo = await auth.getVerification({\n  phone_number: `+86 ${phoneNum}`,\n});\n\n\u002F\u002F Collect user's phone number into variable `verificationCode` by providing a input UI \n\n\u002F\u002F Sign in\nawait auth.signInWithSms({\n  verificationInfo,\n  verificationCode,\n  phoneNum,\n});\n\nconst res = await app.callContainer({\n  name: \"\u003CserviceName>\", method: \"POST\", path: \"\u002Fapi\",\n  header: { \"Content-Type\": \"application\u002Fjson\" },\n  data: { key: \"value\" }\n});\n```\n\n\u002F\u002F Web JS SDK initialization MUST be synchronous:\n\u002F\u002F - Always use top-level `import cloudbase from \"@cloudbase\u002Fjs-sdk\";`\n\u002F\u002F - Do NOT use dynamic imports like `import(\"@cloudbase\u002Fjs-sdk\")` or async wrappers such as `initCloudBase()` with internal `initPromise`\n\n### Node.js (server-side\u002Fcloud function internal call)\n```js\nimport tcb from \"@cloudbase\u002Fnode-sdk\";\nconst app = tcb.init({});\nconst res = await app.callContainer({\n  name: \"\u003CserviceName>\", method: \"GET\", path: \"\u002Fhealth\",\n  timeout: 5000\n});\n```\n\n### Recommendations\n- Mini Program\u002FServer side prioritize internal network (VPC\u002FPRIVATE) calls, reduce exposure surface\n- Web scenarios need to enable WEB, public domain and security domain, and use SDK authentication\n","## When to use this skill\n\nUse this skill for **CloudBase Run backend service development** when you need:\n\n- Long connection capabilities: WebSocket \u002F SSE \u002F server push\n- Long-running or persistent processes: tasks that are not suitable for cloud functions, background jobs\n- Custom runtime environments\u002Fsystem dependencies: custom images, specific system libraries\n- Multi-language\u002Farbitrary frameworks: Java, Go, PHP, .NET, Python, Node.js, etc.\n- Stable external services with elastic scaling: pay-as-you-go, can scale down to 0\n- Private\u002Finternal network access: VPC\u002FPRIVATE access, mini-program `callContainer` internal direct connection\n- AI agent development: develop personalized AI applications based on Function mode CloudRun\n\n**Do NOT use for:**\n- Simple cloud functions (use cloud function development instead)\n- Frontend-only applications\n- Database schema design (use data-model-creation skill)\n\n---\n\n## How to use this skill (for a coding agent)\n\n1. **Choose the right mode**\n   - **Function mode**: Fastest to get started, built-in HTTP\u002FWebSocket\u002FSSE, fixed port 3000, local running supported\n   - **Container mode**: Any language and runtime, requires Dockerfile, local running not supported by tools\n\n2. **Follow mandatory requirements**\n   - Must listen on `PORT` environment variable (real port in container)\n   - Stateless service: write data externally (DB\u002Fstorage\u002Fcache)\n   - No background persistent threads\u002Fprocesses outside requests\n   - Minimize dependencies, slim images; reduce cold start and deployment time\n   - Resource constraints: `Mem = 2 × CPU` (e.g., 0.25 vCPU → 0.5 GB)\n   - Access control: Only enable public network for Web scenarios; mini-programs prioritize internal direct connection, recommend closing public network\n\n3. **Use tools correctly**\n   - **Read operations**: `queryCloudRun` (list, detail, templates)\n   - **Write operations**: `manageCloudRun` (init, download, run, deploy, delete, createAgent)\n   - Always use absolute paths for `targetPath`\n   - Use `force: true` for delete operations\n\n4. **Follow the workflow**\n   - Initialize project → Check\u002Fgenerate Dockerfile (for container mode) → Local run (function mode only) → Configure access → Deploy → Verify\n\n---\n\n# CloudBase Run AI Development Rules\n\nA concise guide for AI assistants and engineering collaboration, providing \"when to use, how to use\" rules and tool workflows.\n\n## 1. When to use CloudBase Run (Use Cases)\n\n- Need long connection capabilities: WebSocket \u002F SSE \u002F server push\n- Need long-running or persistent processes: tasks that are not suitable for cloud functions, background jobs\n- Need custom runtime environments\u002Fsystem dependencies: custom images, specific system libraries\n- Use multi-language\u002Farbitrary frameworks: Java, Go, PHP, .NET, Python, Node.js, etc.\n- Need stable external services with elastic scaling: pay-as-you-go, can scale down to 0\n- Need private\u002Finternal network access: VPC\u002FPRIVATE access, mini-program `callContainer` internal direct connection\n- Need to develop AI agents: develop personalized AI applications based on Function mode CloudRun\n\n## 2. Mode Selection (Quick Comparison)\n\n- **Function mode**: Fastest to get started, built-in HTTP\u002FWebSocket\u002FSSE, fixed port 3000; local running supported by tools\n- **Container mode**: Any language and runtime, requires Dockerfile; local running not supported by tools\n\n### Mode Comparison Checklist\n\n| Dimension | Function Mode | Container Mode |\n| --- | --- | --- |\n| Language\u002FFramework | Node.js (via `@cloudbase\u002Ffunctions-framework`) | Any language\u002Fruntime (Java\u002FGo\u002FPHP\u002F.NET\u002FPython\u002FNode.js, etc.) |\n| Runtime | Function framework loads functions (Runtime) | Docker image starts process |\n| Port | Fixed 3000 | Application listens on `PORT` (injected by platform during deployment) |\n| Dockerfile | Not required | Required (and must pass local build) |\n| Local Running | Supported (built-in tools) | Not supported (recommend using Docker for debugging) |\n| Typical Scenarios | WebSocket\u002FSSE\u002Fstreaming responses, forms\u002Ffiles, low latency, multiple functions per instance, shared memory | Arbitrary system dependencies\u002Flanguages, migrating existing containerized applications |\n\n## 3. Development Requirements (Must Meet)\n\n- Must listen on `PORT` environment variable (real port in container)\n- Stateless service: write data externally (DB\u002Fstorage\u002Fcache)\n- No background persistent threads\u002Fprocesses outside requests\n- Minimize dependencies, slim images; reduce cold start and deployment time\n- Resource constraints: `Mem = 2 × CPU` (e.g., 0.25 vCPU → 0.5 GB)\n- Access control: Only enable public network for Web scenarios; mini-programs prioritize internal direct connection, recommend closing public network\n\n## 4. Tools (Plain Language & Read\u002FWrite Separation)\n\n- **Read operations** (`queryCloudRun`):\n  - `list`: What services do I have? Can filter by name\u002Ftype\n  - `detail`: Current configuration, version, access address of a service\n  - `templates`: Ready-to-use starter templates\n- **Write operations** (`manageCloudRun`):\n  - `init`: Create local project (optional template)\n  - `download`: Pull existing service code to local\n  - `run`: Run locally (Function mode only, supports normal function and Agent mode)\n  - `deploy`: Deploy local code to CloudRun\n  - `delete`: Delete service (requires explicit confirmation)\n  - `createAgent`: Create AI agent (based on Function mode CloudRun)\n- **Important parameters** (remember these):\n  - `targetPath`: Local directory (must be absolute path)\n  - `serverConfig`: Deployment parameters (CPU\u002FMem\u002Finstance count\u002Faccess type\u002Fenvironment variables, etc.)\n  - `runOptions`: Local running port and temporary environment variables (Function mode), supports `runMode: 'normal' | 'agent'`\n  - `agentConfig`: Agent configuration (agentName, botTag, description, template)\n  - Delete must include `force: true`, otherwise it won't execute\n\n## 5. Core Workflow (Understand Steps First, Then Examples)\n\n1) **Choose mode**\n   - Need multi-language\u002Fexisting container\u002FDocker: choose \"Container mode\"\n   - Need long connection\u002Fstreaming\u002Flow latency\u002Fmultiple functions coexisting: prioritize \"Function mode\"\n\n2) **Initialize local project**\n   - General: Use template `init` (both Function mode and Container mode can start from templates)\n   - Container mode must \"check or generate Dockerfile\":\n     - Node.js minimal example:\n       ```dockerfile\n       FROM node:18-alpine\n       WORKDIR \u002Fapp\n       COPY package*.json .\u002F\n       RUN npm ci --omit=dev\n       COPY . .\n       ENV NODE_ENV=production\n       EXPOSE 3000\n       CMD [\"node\",\"server.js\"]\n       ```\n     - Python minimal example:\n       ```dockerfile\n       FROM python:3.11-slim\n       WORKDIR \u002Fapp\n       COPY requirements.txt .\u002F\n       RUN pip install -r requirements.txt --no-cache-dir\n       COPY . .\n       ENV PORT=3000\n       EXPOSE 3000\n       CMD [\"python\",\"app.py\"]\n       ```\n\n3) **Local running** (Function mode only)\n   - Automatically use `npm run dev\u002Fstart` or entry file via `run`\n\n4) **Configure access**\n   - Set `OpenAccessTypes` (WEB\u002FVPC\u002FPRIVATE) as needed; configure security domain and authentication for Web scenarios\n\n5) **Deploy**\n   - Specify CPU\u002FMem\u002Finstance count\u002Fenvironment variables, etc. during `deploy`\n\n6) **Verify**\n   - Use `detail` to confirm access address and configuration meet expectations\n\n### Example Tool Calls\n\n1) **View templates\u002Fservices**\n```json\n{ \"name\": \"queryCloudRun\", \"arguments\": { \"action\": \"templates\" } }\n```\n```json\n{ \"name\": \"queryCloudRun\", \"arguments\": { \"action\": \"detail\", \"detailServerName\": \"my-svc\" } }\n```\n\n2) **Initialize project**\n```json\n{ \"name\": \"manageCloudRun\", \"arguments\": { \"action\": \"init\", \"serverName\": \"my-svc\", \"targetPath\": \"\u002Fabs\u002Fws\u002Fmy-svc\", \"template\": \"helloworld\" } }\n```\n\n3) **Download code** (optional)\n```json\n{ \"name\": \"manageCloudRun\", \"arguments\": { \"action\": \"download\", \"serverName\": \"my-svc\", \"targetPath\": \"\u002Fabs\u002Fws\u002Fmy-svc\" } }\n```\n\n4) **Local running** (Function mode only)\n```json\n{ \"name\": \"manageCloudRun\", \"arguments\": { \"action\": \"run\", \"serverName\": \"my-svc\", \"targetPath\": \"\u002Fabs\u002Fws\u002Fmy-svc\", \"runOptions\": { \"port\": 3000 } } }\n```\n\n5) **Deploy**\n```json\n{ \"name\": \"manageCloudRun\", \"arguments\": { \"action\": \"deploy\", \"serverName\": \"my-svc\", \"targetPath\": \"\u002Fabs\u002Fws\u002Fmy-svc\", \"serverConfig\": { \"OpenAccessTypes\": [\"WEB\"], \"Cpu\": 0.5, \"Mem\": 1, \"MinNum\": 0, \"MaxNum\": 5 } } }\n```\n\n6) **Create AI agent** (optional)\n```json\n{ \"name\": \"manageCloudRun\", \"arguments\": { \"action\": \"createAgent\", \"serverName\": \"my-agent\", \"targetPath\": \"\u002Fabs\u002Fws\u002Fagents\", \"agentConfig\": { \"agentName\": \"MyAgent\", \"botTag\": \"demo\", \"description\": \"My agent\", \"template\": \"blank\" } } }\n```\n\n7) **Run agent** (optional)\n```json\n{ \"name\": \"manageCloudRun\", \"arguments\": { \"action\": \"run\", \"serverName\": \"my-agent\", \"targetPath\": \"\u002Fabs\u002Fws\u002Fagents\u002Fmy-agent\", \"runOptions\": { \"port\": 3000, \"runMode\": \"agent\" } } }\n```\n\n## 6. Best Practices (Strongly Recommended)\n\n- Prioritize PRIVATE\u002FVPC or mini-program internal `callContainer`, reduce public network exposure\n- Web must use CloudBase Web SDK authentication; mini-programs authenticated by platform\n- Secrets via environment variables; separate configuration for multiple environments (dev\u002Fstg\u002Fprod)\n- Use `queryCloudRun.detail` to verify configuration and accessibility before and after deployment\n- Image layers reusable, small volume; monitor startup latency and memory usage\n- Agent development: Use `@cloudbase\u002Faiagent-framework`, supports SSE streaming responses, BotId format is `ibot-{name}-{tag}`\n\n## 7. Quick Troubleshooting\n\n- **Access failure**: Check OpenAccessTypes\u002Fdomain\u002Fport, whether instance scaled down to 0\n- **Deployment failure**: Verify Dockerfile\u002Fbuild logs\u002Fimage volume and CPU\u002FMem ratio\n- **Local running failure**: Only Function mode supported; requires `package.json` `dev`\u002F`start` or entry `index.js|app.js|server.js`\n- **Performance jitter**: Reduce dependencies and initialization; appropriately increase MinNum; optimize cold start\n- **Agent running failure**: Check `@cloudbase\u002Faiagent-framework` dependency, BotId format, SSE response format\n\n## 8. Function Mode CloudRun (Function Mode) Key Points (Concise)\n\n- **Definition**: CloudRun + function framework (`@cloudbase\u002Ffunctions-framework`) + function code, making container service development as simple as writing cloud functions\n- **When to choose**: Need WebSocket\u002FSSE\u002Ffile upload\u002Fstreaming responses; need long tasks or connect to DB\u002Fmessage queue; need multiple functions per instance and shared memory, low latency and better logs\u002Fdebugging\n- **Agent mode**: Develop AI agents based on Function mode CloudRun, use `@cloudbase\u002Faiagent-framework`, supports SSE streaming responses and personalized AI applications\n- **Tool support**: Local running only supports Function mode (`manageCloudRun` → `run`); deploy using `manageCloudRun` → `deploy`; query using `queryCloudRun`\n- **Migration tips**: Different from cloud function call chain\u002Fruntime, migration requires minor modifications (including client calling methods)\n- **Portability**: Based on function framework, can run locally\u002Fhost\u002FDocker, non-CloudRun requires self-managed build and deployment\n\n## 9. Service Invocation Methods (Concise Examples)\n\n### HTTP Direct Access (when WEB public network enabled)\n```bash\ncurl -L \"https:\u002F\u002F\u003Cyour-service-domain>\"\n```\n\n### WeChat Mini Program (internal direct connection, recommend closing public network)\n```js\n\u002F\u002F app.js (ensure wx.cloud.init() is called)\nconst res = await wx.cloud.callContainer({\n  config: { env: \"\u003CenvId>\" },\n  path: \"\u002F\",\n  method: \"GET\",\n  header: { \"X-WX-SERVICE\": \"\u003CserviceName>\" }\n});\n```\n\n### Web (JS SDK, need to configure security domain and authentication)\n```js\nimport cloudbase from \"@cloudbase\u002Fjs-sdk\";\n\nconst app = cloudbase.init({ env: \"\u003CenvId>\" });  \u002F\u002F Collect user's phone number into variable `phoneNum` by providing a input UI\n\nconst auth = app.auth();\n\n\u002F\u002F Send SMS code\nconst verificationInfo = await auth.getVerification({\n  phone_number: `+86 ${phoneNum}`,\n});\n\n\u002F\u002F Collect user's phone number into variable `verificationCode` by providing a input UI \n\n\u002F\u002F Sign in\nawait auth.signInWithSms({\n  verificationInfo,\n  verificationCode,\n  phoneNum,\n});\n\nconst res = await app.callContainer({\n  name: \"\u003CserviceName>\", method: \"POST\", path: \"\u002Fapi\",\n  header: { \"Content-Type\": \"application\u002Fjson\" },\n  data: { key: \"value\" }\n});\n```\n\n\u002F\u002F Web JS SDK initialization MUST be synchronous:\n\u002F\u002F - Always use top-level `import cloudbase from \"@cloudbase\u002Fjs-sdk\";`\n\u002F\u002F - Do NOT use dynamic imports like `import(\"@cloudbase\u002Fjs-sdk\")` or async wrappers such as `initCloudBase()` with internal `initPromise`\n\n### Node.js (server-side\u002Fcloud function internal call)\n```js\nimport tcb from \"@cloudbase\u002Fnode-sdk\";\nconst app = tcb.init({});\nconst res = await app.callContainer({\n  name: \"\u003CserviceName>\", method: \"GET\", path: \"\u002Fhealth\",\n  timeout: 5000\n});\n```\n\n### Recommendations\n- Mini Program\u002FServer side prioritize internal network (VPC\u002FPRIVATE) calls, reduce exposure surface\n- Web scenarios need to enable WEB, public domain and security domain, and use SDK authentication\n",{"name":5,"alwaysApply":49,"description":7},"main","18d0e63d1313ca87098f614aa7c1e2dcf6de79c7","backend\u002Fskills\u002Fmarketplace\u002Fcodebuddy-plugins-official\u002Fplugins\u002Fcloudbase\u002Fskills\u002Fcloudbase\u002Freferences\u002Fcloudrun-development",1,"https:\u002F\u002Fgithub.com\u002Fwelflau\u002Fai-dev-system","https:\u002F\u002Fgithub.com\u002Fwelflau","2026-11-10 11:14:25",{"source":8,"skillName":5,"commands":61,"prompt":71,"zipAvailable":72},[62,65,68],{"tool":63,"command":64},"npx","npx skills add welflau\u002Fai-dev-system --skill cloudrun-development",{"tool":66,"command":67},"bunx","bunx skills add welflau\u002Fai-dev-system --skill cloudrun-development",{"tool":69,"command":70},"pnpm","pnpm dlx skills add welflau\u002Fai-dev-system --skill cloudrun-development","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fwelflau\u002Fai-dev-system\u002Fblob\u002Fmain\u002Fbackend\u002Fskills\u002Fmarketplace\u002Fcodebuddy-plugins-official\u002Fplugins\u002Fcloudbase\u002Fskills\u002Fcloudbase\u002Freferences\u002Fcloudrun-development\u002FSKILL.md",true,[],[75,106,137,162,188,210],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":79,"licenseFileUrl":80,"sourceHtmlUrl":81,"categories":82,"keywords":86,"publishedAt":48},"01M6HSTDP4M3JFXEBK91VFB4PA","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fwelflau\u002Fai-dev-system\u002Fblob\u002Fmain\u002Fbackend\u002Fskills\u002Fmarketplace\u002Fcodebuddy-plugins-official\u002Fplugins\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fwelflau\u002Fai-dev-system\u002Fblob\u002Fmain\u002Fbackend\u002Fskills\u002Fmarketplace\u002Fcodebuddy-plugins-official\u002Fplugins\u002Fweb-artifacts-builder\u002FSKILL.md",[83],{"categoryNo":84,"categoryName":85,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000009","前端开发",[87,88,89,90,91,92,93,94,95,96,97,98,99,100,42,101,102,103,34,104,105],"web artifacts builder","web","artifacts","artifacts builder","builder","frontend","css","components","react","routing","state management","state","file","Tailwind","single-file","simple","ui components","for","single",{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":79,"licenseFileUrl":110,"sourceHtmlUrl":111,"categories":112,"keywords":122,"publishedAt":48},"01M6HSDXH0JSP8R3QTNY9XZ8HN","frontend-design","Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML\u002FCSS layouts, or when styling\u002Fbeautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.","https:\u002F\u002Fgithub.com\u002Fwelflau\u002Fai-dev-system\u002Fblob\u002Fmain\u002Fbackend\u002Fskills\u002Fmarketplace\u002Fcodebuddy-plugins-official\u002Fplugins\u002Ffrontend-design\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fwelflau\u002Fai-dev-system\u002Fblob\u002Fmain\u002Fbackend\u002Fskills\u002Fmarketplace\u002Fcodebuddy-plugins-official\u002Fplugins\u002Ffrontend-design\u002FSKILL.md",[113,114,117],{"categoryNo":84,"categoryName":85,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":115,"categoryName":116,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":118,"categoryName":119,"taxonomyType":120,"taxonomyTypeDesc":121},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",[92,123,124,93,88,94,95,125,126,127,89,128,129,130,42,131,132,133,134,135,136,29],"design","frontend design","react components","create","code","examples","applications","landing","ui design","pages","aesthetics","web ui","with","generic",{"skillNo":138,"name":139,"nameZh":6,"description":140,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":79,"licenseFileUrl":141,"sourceHtmlUrl":142,"categories":143,"keywords":145,"publishedAt":48},"01M6HSA77QYVP7A72HREGTDN2C","algorithmic-art","Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.","https:\u002F\u002Fgithub.com\u002Fwelflau\u002Fai-dev-system\u002Fblob\u002Fmain\u002Fbackend\u002Fskills\u002Fmarketplace\u002Fcodebuddy-plugins-official\u002Fplugins\u002Falgorithmic-art\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fwelflau\u002Fai-dev-system\u002Fblob\u002Fmain\u002Fbackend\u002Fskills\u002Fmarketplace\u002Fcodebuddy-plugins-official\u002Fplugins\u002Falgorithmic-art\u002FSKILL.md",[144],{"categoryNo":115,"categoryName":116,"taxonomyType":20,"taxonomyTypeDesc":21},[146,147,148,126,127,149,150,151,152,42,153,154,155,156,135,157,158,159,160,161,29],"algorithmic art","Art","algorithmic","flow","js","work","interactive","generative art","exploration","systems","users","Existing","request","generative","copyright","fields",{"skillNo":163,"name":164,"nameZh":6,"description":165,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":79,"licenseFileUrl":166,"sourceHtmlUrl":167,"categories":168,"keywords":170,"publishedAt":48},"01M6HS9HE0X390Y6RQKTY1YNGJ","theme-factory","Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors\u002Ffonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.","https:\u002F\u002Fgithub.com\u002Fwelflau\u002Fai-dev-system\u002Fblob\u002Fmain\u002Fbackend\u002Fskills\u002Fmarketplace\u002Fcodebuddy-plugins-official\u002Fexternal_plugins\u002Ftheme-factory\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fwelflau\u002Fai-dev-system\u002Fblob\u002Fmain\u002Fbackend\u002Fskills\u002Fmarketplace\u002Fcodebuddy-plugins-official\u002Fexternal_plugins\u002Ftheme-factory\u002FSKILL.md",[169],{"categoryNo":115,"categoryName":116,"taxonomyType":20,"taxonomyTypeDesc":21},[171,172,173,174,175,176,89,177,178,179,130,180,181,132,182,135,183,184,185,104,186,187],"theme factory","factory","theme","docs","toolkit","generate","SET","fly","slides","styling","artifact","themes","you","fonts","can","apply","new",{"skillNo":189,"name":190,"nameZh":6,"description":191,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":192,"categories":193,"keywords":195,"publishedAt":48},"01M6HS74GASM6FJ77F83EY679E","browsing","Use when you need direct browser control - teaches Chrome DevTools Protocol for controlling existing browser sessions, multi-tab management, form automation, and content extraction via use_browser MCP tool","https:\u002F\u002Fgithub.com\u002Fwelflau\u002Fai-dev-system\u002Fblob\u002Fmain\u002Fbackend\u002Fskills\u002Fmarketplace\u002Fcodebuddy-plugins-official\u002Fexternal_plugins\u002Fsuperpowers-chrome\u002Fskills\u002Fbrowsing\u002FSKILL.md",[194],{"categoryNo":23,"categoryName":24,"taxonomyType":20,"taxonomyTypeDesc":21},[190,196,197,198,199,200,201,202,203,204,205,42,206,207,208,209,34,183,104,157],"MCP","automation","chrome","sessions","protocol","browser","devtools","chrome devtools","tool","direct","browser control","control","via","form",{"skillNo":211,"name":212,"nameZh":6,"description":213,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":79,"licenseFileUrl":214,"sourceHtmlUrl":215,"categories":216,"keywords":223,"publishedAt":48},"01M6HS6BZT2CKDNQ6YF20DXN4T","slack-gif-creator","Knowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like \"make me a GIF of X doing Y for Slack.\"","https:\u002F\u002Fgithub.com\u002Fwelflau\u002Fai-dev-system\u002Fblob\u002Fmain\u002Fbackend\u002Fskills\u002Fmarketplace\u002Fcodebuddy-plugins-official\u002Fexternal_plugins\u002Fslack-gif-creator\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fwelflau\u002Fai-dev-system\u002Fblob\u002Fmain\u002Fbackend\u002Fskills\u002Fmarketplace\u002Fcodebuddy-plugins-official\u002Fexternal_plugins\u002Fslack-gif-creator\u002FSKILL.md",[217,220],{"categoryNo":218,"categoryName":219,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000005","邮件与沟通",{"categoryNo":221,"categoryName":222,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000016","图像与多媒体",[224,225,226,227,228,229,230,231,232,42,233,156,234,235,236,104,158,29],"slack gif creator","slack","gif","creator","validation","Tools","constraints","Animation","knowledge","me","make","Utilities","concepts"]