[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79GPHQPCJMK261RP18Q0RMW":3,"skill-same:01M79GPHQPCJMK261RP18Q0RMW":79},{"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":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M79GPHQPCJMK261RP18Q0RMW","cloud-functions",null,"CloudBase function runtime guide for building, deploying, and debugging your own Event Functions or HTTP Functions. This skill should be used when users need application runtime code on CloudBase, not when they are merely calling CloudBase official platform APIs.","infometa\u002Fworkbuddyskills","infometa","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F109397516?v=4","01M79FS3XQK361MJFWQ2GFK95C","01M79FS3YPWKZYW9EPAAP2BFBJ",447,"MIT","https:\u002F\u002Fgithub.com\u002Finfometa\u002Fworkbuddyskills\u002Fblob\u002Fmain\u002Fconnectors\u002Fcloudbase\u002Fskills\u002Freferences\u002Fcloud-functions\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: cloud-functions\ndescription: CloudBase function runtime guide for building, deploying, and debugging your own Event Functions or HTTP Functions. This skill should be used when users need application runtime code on CloudBase, not when they are merely calling CloudBase official platform APIs.\nversion: 2.36.2\nlicense: MIT\nalwaysApply: false\n---\n\n## Sibling skills (local only)\n\nSibling CloudBase skills ship beside this skill. Use local relative paths such as `..\u002Fauth-tool-cloudbase\u002FSKILL.md`.\n\nIf a referenced sibling skill file is missing from this environment, ask the user to install the full CloudBase plugin (or the missing skill). Do **not** HTTP-fetch remote skill or protocol markdown into the agent context.\n\n**Cross-cutting protocols** (required before code changes or deployments):\n- Change Safety Protocol: `..\u002Fcloudbase-platform\u002Freferences\u002Fprotocols\u002Fchange-safety-protocol.md`\n- Deployment Gate: `..\u002Fcloudbase-platform\u002Freferences\u002Fprotocols\u002Fdeployment-gate.md`\n- Sensitive Runtime Data Protection: `..\u002Fcloudbase-platform\u002Freferences\u002Fprotocols\u002Fsensitive-runtime-data-protection.md`\n\n# Cloud Functions Development\n\n## Activation Contract\n\n### Use this first when\n\n- The task is to create, update, deploy, inspect, or debug a CloudBase Event Function or HTTP Function that serves application runtime logic.\n- The request mentions function runtime, function logs, `scf_bootstrap`, function triggers, or function gateway exposure.\n\n### Read before writing code if\n\n- You still need to decide between Event Function and HTTP Function.\n- The task mentions `manageFunctions`, `queryFunctions`, `manageGateway`, or legacy function-tool names.\n- The task might require `callCloudApi` as a fallback for logs or gateway setup.\n- An HTTP Function will call CloudBase resources through `@cloudbase\u002Fnode-sdk` or `@cloudbase\u002Fmanager-node` -> read `.\u002Freferences\u002Fhttp-function-credentials.md`. HTTP Functions must use explicit credentials; do not rely on the Event Function passwordless runtime path.\n\n### Exception only (do not read by default)\n\n- Migrating an **existing** app that already uses classic TCP DB clients (`DATABASE_URL` \u002F Prisma \u002F `mysql2` \u002F `pg` \u002F Redis) → read `.\u002Freferences\u002Fvpc-and-tcp-database.md` via `.\u002Freferences.md`. New business CRUD must prefer CloudBase native SDK (`app.database()` \u002F `app.rdb()`) or MCP SQL tools instead of TCP.\n\n### Then also read\n\n- Detailed reference routing -> `.\u002Freferences.md`\n- Auth setup or provider-related backend work -> `..\u002Fauth-tool-cloudbase\u002FSKILL.md`\n- CloudBase Integration Center generated WeChat Pay or Official Account functions -> `..\u002Fcloudbase-wechat-integration\u002FSKILL.md` (official docs: `https:\u002F\u002Fdocs.cloudbase.net\u002Fintegration\u002Fintroduce.md`)\n- AI in functions -> `..\u002Fai-model-nodejs\u002FSKILL.md`\n- Long-lived container services or Agent runtimes -> `..\u002Fcloudrun-development\u002FSKILL.md`\n- Calling CloudBase official platform APIs from a client or script -> `..\u002Fhttp-api-cloudbase\u002FSKILL.md`\n\n### Do NOT use for\n\n- CloudRun container services.\n- Web authentication UI implementation.\n- Database-schema design or general data-model work.\n- CloudBase official platform API clients or raw HTTP integrations that only consume platform endpoints.\n- Creating Integration Center instances through guessed APIs. For WeChat Pay or Official Account generated functions, use `cloudbase-wechat-integration` for the business contract and this skill only for function operations.\n- **Tasks that the CloudBase JS SDK can handle directly** — simple data reads\u002Fwrites, leaderboards, file uploads, real-time queries. Reach for the matching SDK surface before writing a function: `db.collection(...).get\u002Fadd\u002Fupdate` only for confirmed NoSQL collections, and `app.rdb().from(...)` for CloudBase PG tables. Functions add deployment complexity, CORS configuration, and HTTP gateway binding that the SDK eliminates entirely.\n\n### Common mistakes \u002F gotchas\n\n- Picking the wrong function type and trying to compensate later.\n- Confusing official CloudBase API client work with building your own HTTP function.\n- Mixing Event Function code shape (`exports.main(event, context)`) with HTTP Function code shape (`req` \u002F `res` on port `9000`).\n- Treating HTTP Access as the implementation model for HTTP Functions. HTTP Access is a gateway configuration for Event Functions, not the HTTP Function runtime model.\n- Assuming `db.collection(\"name\").add(...)` will create a missing document-database collection automatically. Collection creation is a separate management step.\n- **Baking static content into the deployment package — media files, user uploads, or assets that change on their own cadence.** The package is uploaded on every deploy and a function package has a hard size ceiling, so large or independently-changing content makes every deploy slower and can push the package over the limit.\n  - **Media files** (`*.mp4`, large images, fonts) — go to cloud storage, referenced by URL, not into the package.\n  - **User uploads written to the function's local filesystem** — the function is ephemeral and `\u002Ftmp` is small and not shared. Uploads go to cloud storage.\n  - **Frequently-updated static resources bundled in** — every change forces a full function redeploy. Serve them from cloud storage so the function only redeploys when the *code* changes.\n- Forgetting that runtime cannot be changed after creation.\n- Using cloud functions as the first answer for Web login.\n- Forgetting that HTTP Functions must ship `scf_bootstrap`, listen on port `9000`, and include dependencies.\n- Assuming an HTTP Function can use CloudBase SDKs without explicit credentials. The default temporary credential path is not reliable for HTTP Functions and credential rotation can break a running service. Use a CloudBase server API Key or Tencent Cloud key pair for `@cloudbase\u002Fnode-sdk`; use a Tencent Cloud key pair for `@cloudbase\u002Fmanager-node`. See `references\u002Fhttp-function-credentials.md`.\n- Forgetting how an HTTP Function is meant to be reached. A call with no credential fails `401 MISSING_CREDENTIALS`; a call that carries one but is not allowed fails `403 EXCEED_AUTHORITY`. For browser, game or app clients, add a gateway route (`manageGateway(action=\"createRoute\", auth: false)`) instead of widening the function security rule — in PostgreSQL environments that rule lives in an environment-wide `authz.user.rego` document, so editing it overwrites the policy for the whole environment. See `references\u002Fhttp-functions.md`.\n- **Reading an `InsufficientBalance` invoke failure as an account problem.** A cloud function answers HTTP 410 with this code and the code reads as a short account balance, but what runs out is the environment's resource points — drawn down before any account balance and not restored by a top-up. The four causes (trial points exhausted \u002F plan points exhausted \u002F plan expired \u002F account in arrears) need four different answers, only the last of which involves topping up, so diagnose with `manageEnv(action=\"usage\")` plus the account balance before advising. See `..\u002Fcloud-api-operations\u002Freferences\u002Frecipes\u002Fcredits-exhaustion.md`.\n- Mismatching the `scf_bootstrap` Node.js binary path with the function runtime (e.g. using `\u002Fvar\u002Flang\u002Fnode18\u002Fbin\u002Fnode` but setting `runtime: \"Nodejs16.13\"`).\n- For Custom Image HTTP Functions: forgetting that TCR, the CloudApp build, and SCF must be in the same region; using `:latest` instead of a unique tag; or confusing the request-driven port-`9000` image model with a long-lived CloudRun container that listens on the injected `PORT`.\n- Assuming MCP covers the whole image pipeline. `manageFunctions` covers SCF image deploy (Stage B) via `runtime: \"CustomImage\"` + `imageConfig`, but the CloudApp custom build → TCR push (Stage A) is a raw Tencent Cloud API path — confirm action names and parameters from official docs before any `callCloudApi` fallback.\n- Making code or configuration changes without first following the Change Safety Protocol (`cloudbase-platform\u002Freferences\u002Fprotocols\u002Fchange-safety-protocol.md`).\n- Exposing functions publicly or deploying without first completing the checks in `cloudbase-platform\u002Freferences\u002Fprotocols\u002Fdeployment-gate.md`.\n- **Returning `req.headers`, `process.env`, `event`, or `context` wholesale** — gateways may inject `x-cloudbase-context` (base64 temporary credentials). Never echo that header or dump credential env vars to clients. Follow `..\u002Fcloudbase-platform\u002Freferences\u002Fprotocols\u002Fsensitive-runtime-data-protection.md`.\n- **Using a bare layer name (e.g. `common`) across environments.** SCF LayerName is an account-scoped shared namespace: same name → shared version sequence. Create new layers with fixed format `{layerName}_{当前envId}` (e.g. `common_cloud1-d9ghadgak3edf6b36`). Pass the full name as `layerName` — do not invent automatic suffixes. Treat MCP layer `warnings` as soft advisories (operation still succeeds). Details: `.\u002Freferences\u002Foperations-and-config.md`.\n- **Long-running MCP image deployments must complete the full workflow**: When using `manageFunctions` with `deployFunction` for a real `cloud` or `local` deployment, prefer `wait=false` to avoid blocking a single Tool Call for an extended period. If the tool returns a `taskId`, do not end the workflow, report success, or ask the user to wait while the status is `running`. Automatically call `queryFunctions(action=\"getFunctionDeployStatus\", taskId=\"...\")` and continue polling according to the reported progress until the status becomes `succeeded` or `failed`. Only after reaching a reasonable polling limit may you report that the deployment is still in progress; include the `taskId`, current stage, and latest progress. On success, report the image URI or build ID, function status, and Gateway URL. On failure, report the failed stage, error code, request ID, and diagnostic guidance. If the status is `expired`, explain that the local task record exceeded its retention window; the cloud deployment may still be running, so call `getFunctionDetail` to confirm the actual cloud-side status instead of treating it as a failure.\n\n### Minimal checklist\n\n- Read [Cloud Functions Execution Checklist](checklist.md) before deployment or runtime changes.\n- Decide whether the task is Event Function, HTTP Function, or actually CloudRun.\n- **Separate static from dynamic**: media, user uploads and frequently-updated assets live in cloud storage, not in the function package.\n- Pick the detailed reference file in [references.md](references.md) before writing implementation code.\n\n## MCP image deployment with polling\n\nFor real `cloud` or `local` custom-image deployments, prefer:\n\n```json\n{\n  \"action\": \"deployFunction\",\n  \"dryRun\": false,\n  \"confirm\": true,\n  \"wait\": false,\n  \"deployConfig\": {}\n}\n```\n\nThe `wait` field controls whether the current MCP Tool call waits for the complete deployment:\n\n- `wait=true`: wait for the manager deployment to reach a terminal result and return it.\n- `wait=false`: return a `taskId` promptly while the deployment continues in the MCP background.\n\nWhen `wait=false` returns a `taskId`, the deployment workflow is not complete. Automatically call `queryFunctions` with `action=\"getFunctionDeployStatus\"` and that `taskId`; continue while the status is `running`, then stop only at `succeeded` or `failed`. Wait about 5 seconds before the first follow-up query and use the returned progress\u002F`nextActions` to continue without aggressive polling. Do not tell the user to ask again or imply success before a terminal status is returned. An `expired` status means the task exceeded the maximum retention window and was force-terminated locally — the cloud deployment may still be in progress, so confirm the real state with `getFunctionDetail` instead of reporting failure.\n\nIf a reasonable polling limit is reached, report only that the task is still running, including the `taskId`, current status, current stage, and latest progress. For a terminal result, report the deployment strategy, action, image URI\u002Fdigest, build ID, function status, Gateway URL, or the failed stage, error code, request ID, and diagnostic next step.\n\n### Personal-tier TCR credentials — never put the password in tool arguments\n\nPersonal-tier image builds (`imageConfig.imageType=\"personal\"` with `local` \u002F `cloud`) need a TCR push credential. Read it from the MCP process environment, not from tool arguments:\n\n- Leave `func.imageConfig.build.registryCredential` **out of the request** when `TCB_TCR_USERNAME` and `TCB_TCR_PASSWORD` are set in the MCP server `env` block — the MCP fills them in automatically, the same way `TENCENTCLOUD_SECRETID` works.\n- **Never ask the user to paste the password into chat, and never write it into tool arguments.** Anything placed in arguments enters the model context and the tool-call history.\n- If deployment fails with `CLOUD_REGISTRY_CREDENTIAL_MISSING` or `CLOUD_REGISTRY_CREDENTIAL_INVALID`, instruct the user to add these two variables to the `env` block of their MCP configuration and restart the MCP server. Do not work around it by passing the credential inline.\n- The username is the Tencent Cloud account UIN and is not itself a secret; it may be passed explicitly if needed. Explicit arguments take precedence per field, so username-in-argument plus password-from-environment is a valid combination.\n\n**Know when that environment channel does not exist.** It works only for a local stdio MCP server whose client configuration exposes a custom `env` block. Some GUI clients do not inherit shell exports, and IDE-embedded MCP servers usually inject credentials from a hard-coded allowlist (often only `TENCENTCLOUD_*`), leaving the user no way to set arbitrary variables. Telling those users to \"set it in the MCP `env` block\" is an instruction they cannot act on. Route them to an enterprise registry (`imageType=\"enterprise\"`, which mints a short-lived TCR token instead of using a fixed password) or to `buildStrategy=\"image\"` with an already-pushed image.\n\n### Enterprise-tier builds require a login state with CAM permission\n\n`cloud` \u002F `local` builds against an enterprise registry mint a TCR token through CAM (as does `autoGrant`). Environment-level API Keys and OAuth-issued STS credentials carry no CAM policy, so those calls fail with `UnauthorizedOperation`. The MCP probes the login state before starting a real enterprise build and refuses up front rather than failing midway; treat that error as a routing signal, not a retryable fault:\n\n- Sign in with an account-level `TENCENTCLOUD_SECRETID` \u002F `TENCENTCLOUD_SECRETKEY` pair, **or**\n- Switch to `buildStrategy=\"image\"` and deploy an image that was pushed elsewhere, **or**\n- Use a personal-tier registry — its static password goes straight to `docker login` without touching CAM, which makes it the one build path that does work for API Key users.\n\n\n## Writing mode at a glance\n\n- If the request is for SDK calls, timers, or event-driven workflows, write an **Event Function** with `exports.main = async (event, context) => {}`.\n- If the request is for REST APIs, browser-facing endpoints, SSE, or WebSocket, write an **HTTP Function** with `req` \u002F `res` on port `9000`.\n- For Node.js HTTP Functions, default to the native `http` module unless the user explicitly asks for Express, Koa, NestJS, or another framework.\n- If the HTTP Function needs custom system libraries or an arbitrary runtime but should still be SCF request-driven and scale to zero, deploy it as a **Custom Image HTTP Function** (`Runtime: CustomImage`) from a TCR image. The container still listens on the fixed port `9000`. See `.\u002Freferences\u002Fhttp-functions-custom-image.md`. This is distinct from a CloudRun container, which listens on the injected `PORT` and runs long-lived.\n- **有 Dockerfile 的 HTTP 无状态服务可优先考虑 HTTP 云函数，不必上云托管** — a Dockerfile alone does not mean CloudRun. If the service is stateless, request-driven HTTP without long connections \u002F custom runtime \u002F VPC database access, prefer an HTTP Function (or Custom Image HTTP Function) — faster to deploy, cheaper, and no CloudRun environment initialization needed. Route to CloudRun (`..\u002Fcloudrun-development\u002FSKILL.md`) only for WebSocket\u002FSSE long connections, stable independent processes, custom system dependencies, or VPC DB access.\n- If the user mentions HTTP access for an existing Event Function, keep the Event Function code shape and add gateway access separately.\n\n## HTTP Function authoring contract\n\nUse these rules whenever you are writing the function code itself:\n\n- Do not write an HTTP Function as `exports.main(event, context)`. That is the Event Function contract.\n- Treat the function as a standard web server process that must listen on port `9000`.\n- With Node.js, prefer `http.createServer((req, res) => { ... })` by default so the runtime contract stays explicit.\n- With the Node.js native `http` module, do not assume Express-style helpers exist. `req.body`, `req.query`, and `req.params` are not provided for you.\n- For Node.js HTTP Functions, choose one module system up front and keep it consistent. Default to CommonJS for simple functions (`require(...)`, no `\"type\": \"module\"` in `package.json`) unless you explicitly want ES Modules.\n- If you do choose ES Modules (`\"type\": \"module\"` + `import ...`), do not mix in CommonJS-only globals or APIs such as `require(...)`, `module.exports`, or bare `__dirname`. In ESM, derive file paths from `import.meta.url` with `fileURLToPath(...)` only when needed.\n- With the native `http` module, parse `req.url` yourself with `new URL(...)`, collect the request body from the stream, and only then call `JSON.parse`. Empty bodies should be handled explicitly instead of assuming JSON is always present.\n- Return responses explicitly with `res.writeHead(...)` and `res.end(...)`, including `Content-Type` such as `application\u002Fjson; charset=utf-8` for JSON APIs.\n- **Handle CORS headers — but first check who terminates CORS.** A function reached through the HTTP gateway must **not** set `Access-Control-Allow-Origin` itself: the gateway already fills it from the environment security-domain allowlist, and a second value yields `\u003Corigin>,*`, which browsers reject outright — every request fails with a CORS error that looks like the service is down. Only set CORS headers when the function is called directly, outside the gateway:\n  - Respond to `OPTIONS` preflight with an empty `204`\n  - Include `Access-Control-Allow-Origin` only for direct, non-gateway callers\n  - Include `Access-Control-Allow-Methods: GET, POST, OPTIONS` as needed\n  - Include `Access-Control-Allow-Headers: Content-Type` for JSON requests\n- Keep routing and method handling explicit. Unknown paths should return `404`, and known paths with unsupported methods should normally return `405`.\n- Keep gateway setup and security-rule changes separate from the runtime code. They affect access, not the HTTP Function programming model.\n- Do not add HTTP access service configuration when the task is only to create an HTTP Function itself. Gateway paths or custom domains are separate access-layer work; public invocation requirements should be handled through the function security rule workflow (note: anonymous login is disabled by default).\n- If the HTTP Function calls CloudBase through `@cloudbase\u002Fnode-sdk` or `@cloudbase\u002Fmanager-node`, complete the explicit credential gate in `.\u002Freferences\u002Fhttp-function-credentials.md` before deployment. Never hardcode credentials in the function package.\n- **Never echo sensitive runtime data.** Do not return `req.headers`, `process.env`, or `x-cloudbase-context` in responses. Debug endpoints must use an explicit non-sensitive allowlist. See `..\u002Fcloudbase-platform\u002Freferences\u002Fprotocols\u002Fsensitive-runtime-data-protection.md`.\n\n## Quick decision table\n\n| Question | Choose |\n| --- | --- |\n| Triggered by SDK calls or timers? | Event Function |\n| Needs browser-facing HTTP endpoint? | HTTP Function |\n| Needs SSE or WebSocket service? | HTTP Function |\n| Needs custom system libraries \u002F arbitrary runtime, but still SCF request-driven + scale-to-zero? | HTTP Function with `Runtime: CustomImage` (deploy from a TCR image) |\n| Has a Dockerfile but is a stateless HTTP service (no long connections \u002F custom runtime \u002F VPC DB)? | HTTP Function (or Custom Image HTTP Function) — **not** CloudRun |\n| Needs long-lived container runtime or custom system environment? | CloudRun |\n| Only needs HTTP access for an existing Event Function? | Event Function + gateway access |\n\n## How to use this skill (for a coding agent)\n\n1. **Choose the correct runtime model first**\n   - Event Function -> `exports.main(event, context)`\n   - HTTP Function -> web server on port `9000`\n   - If the requirement is really a container service, reroute to CloudRun early\n\n2. **Use the converged MCP entrances**\n   - Reads -> `queryFunctions`, `queryGateway`\n   - Writes -> `manageFunctions`, `manageGateway`\n   - Translate legacy names before acting rather than copying them literally\n\n3. **Write code and deploy, do not stop at local files**\n   - Use `manageFunctions(action=\"createFunction\")` for creation\n   - Use `manageFunctions(action=\"updateFunctionCode\")` for code updates\n   - Use `manageFunctions(action=\"updateFunctionConfig\")` for config updates (timeout, memorySize, envVariables)\n   - For a Custom Image HTTP Function, call `manageFunctions(action=\"createFunction\")` with `func.runtime=\"CustomImage\"` and `imageConfig` (`imageUri` with tag; `registryId` for enterprise TCR); iterate later with `manageFunctions(action=\"updateFunctionCode\")` + `imageConfig`. No `functionRootPath` is needed because the code lives in the image. See `.\u002Freferences\u002Fhttp-functions-custom-image.md`.\n   - Keep `functionRootPath` as the directory that directly contains function folders (e.g., `cloudfunctions\u002F` or `functions\u002F`), NOT the project root and NOT the function subdirectory itself\n   - **Prefer MCP when available** — use `manageFunctions` and `queryFunctions` when those tools are in this session\n   - **CLI fallback when MCP is missing** — if function tools are not loaded (first session \u002F pre-restart), configure MCP for next time, then use `tcb fn deploy` via `..\u002Fcloudbase-cli\u002FSKILL.md` (see guideline `tooling-fallback.md`). Do not stall waiting for restart.\n   - **Do NOT invent CLI when the runtime has no shell** — if only MCP exists and it works, stay on MCP; if neither works, report the gap\n   - For batch updates (multiple functions), call `manageFunctions(action=\"updateFunctionConfig\")` individually for each function — MCP does not have a `--all` batch parameter like CLI\n   - If an HTTP Function uses `@cloudbase\u002Fnode-sdk`, prefer a server API Key created with `manageAppAuth(action=\"createApiKey\", keyType=\"api_key\")` and inject it as `CLOUDBASE_APIKEY`; Tencent Cloud `SecretId` \u002F `SecretKey` is also supported\n   - If an HTTP Function uses `@cloudbase\u002Fmanager-node`, inject Tencent Cloud `SecretId` \u002F `SecretKey`; do not claim that a CloudBase API Key initializes the Manager SDK\n   - Merge credential environment variables with the existing function configuration instead of replacing the whole environment-variable set\n\n4. **Prefer doc-first fallbacks**\n   - If a task falls back to `callCloudApi`, first check the official docs or knowledge-base entry for that action\n   - Confirm the exact action name and parameter contract before calling it\n   - Do not guess raw cloud API payloads from memory\n\n5. **Read the right detailed reference**\n   - Event Function details -> `.\u002Freferences\u002Fevent-functions.md`\n   - HTTP Function details -> `.\u002Freferences\u002Fhttp-functions.md`\n   - HTTP Function CloudBase SDK credentials -> `.\u002Freferences\u002Fhttp-function-credentials.md`\n   - HTTP Function from a container image (`Runtime: CustomImage`, TCR image pipeline) -> `.\u002Freferences\u002Fhttp-functions-custom-image.md`\n   - Logs, gateway, env vars, layers (`{layerName}_{当前envId}`), and legacy mappings -> `.\u002Freferences\u002Foperations-and-config.md`\n\n## Database write reminder\n\n- If a function will write to CloudBase document database, create the target collection first through console or management tooling.\n- `db.collection(\"feedback\").add(...)` only inserts into an existing collection; it does not auto-create `feedback` when absent.\n- If the product requirement says \"create when missing\", implement that as an explicit collection-management step before the first write instead of assuming the runtime write call will provision it.\n\n## Function types comparison\n\n| Feature | Event Function | HTTP Function |\n| --- | --- | --- |\n| Primary trigger | SDK call, timer, event | HTTP request |\n| Entry shape | `exports.main(event, context)` | web server with `req` \u002F `res` |\n| Port | No port | Must listen on `9000` |\n| `scf_bootstrap` | Not required | Required |\n| Dependencies | Auto-installed from `package.json` | Must be packaged with function code |\n| Best for | serverless handlers, scheduled jobs | APIs, SSE, WebSocket, browser-facing services |\n\n## Minimal code skeletons\n\n### Event Function hello world\n\n`cloudfunctions\u002Fhello-event\u002Findex.js`\n\n```js\nexports.main = async (event, context) => {\n  \u002F\u002F Do not return event\u002Fcontext\u002Fprocess.env — they may contain platform secrets.\n  const name = typeof event?.name === \"string\" ? event.name : \"world\";\n  return {\n    ok: true,\n    message: `hello ${name} from event function`,\n  };\n};\n```\n\n`cloudfunctions\u002Fhello-event\u002Fpackage.json`\n\n```json\n{\n  \"name\": \"hello-event\",\n  \"version\": \"1.0.0\"\n}\n```\n\n### HTTP Function hello world\n\n`cloudfunctions\u002Fhello-http\u002Findex.js`\n\n```js\nconst http = require(\"http\");\nconst { URL } = require(\"url\");\n\n\u002F\u002F CORS: leave this empty when the function is reached through the HTTP gateway.\n\u002F\u002F The gateway already fills Access-Control-Allow-Origin from the environment\n\u002F\u002F security-domain allowlist; adding a second value makes the header illegal\n\u002F\u002F ('\u003Corigin>,*') and browsers block every request. Only set CORS headers here\n\u002F\u002F when the function is called directly, outside the gateway.\nconst CORS_HEADERS = {};\n\nfunction sendJson(res, statusCode, data) {\n  res.writeHead(statusCode, {\n    \"Content-Type\": \"application\u002Fjson; charset=utf-8\",\n    ...CORS_HEADERS,\n  });\n  res.end(JSON.stringify(data));\n}\n\nfunction sendOptions(res) {\n  res.writeHead(204, CORS_HEADERS);\n  res.end();\n}\n\nfunction readJsonBody(req) {\n  return new Promise((resolve, reject) => {\n    let raw = \"\";\n    req.on(\"data\", (chunk) => { raw += chunk; });\n    req.on(\"end\", () => {\n      if (!raw) { resolve({}); return; }\n      try { resolve(JSON.parse(raw)); } catch (e) { resolve({}); }\n    });\n    req.on(\"error\", reject);\n  });\n}\n\nconst server = http.createServer(async (req, res) => {\n  \u002F\u002F Handle CORS preflight\n  if (req.method === \"OPTIONS\") {\n    return sendOptions(res);\n  }\n\n  const url = new URL(req.url || \"\u002F\", \"http:\u002F\u002F127.0.0.1\");\n\n  if (req.method === \"GET\" && url.pathname === \"\u002F\") {\n    sendJson(res, 200, { ok: true, message: \"hello from http function\" });\n  } else if (req.method === \"POST\" && url.pathname === \"\u002F\") {\n    const body = await readJsonBody(req);\n    sendJson(res, 200, { received: body });\n  } else {\n    sendJson(res, 404, { error: \"Not Found\" });\n  }\n});\n\nserver.listen(9000);\n```\n\nFor a more complete example with routing, method checks, and error handling, see `.\u002Freferences\u002Fhttp-functions.md`.\n\n`cloudfunctions\u002Fhello-http\u002Fscf_bootstrap`\n\n```bash\n#!\u002Fbin\u002Fbash\n\u002Fvar\u002Flang\u002Fnode18\u002Fbin\u002Fnode index.js\n```\n\nThe `scf_bootstrap` binary path must match the runtime — see the full mapping table in `.\u002Freferences\u002Fhttp-functions.md`.\n\n`cloudfunctions\u002Fhello-http\u002Fpackage.json`\n\n```json\n{\n  \"name\": \"hello-http\",\n  \"version\": \"1.0.0\"\n}\n```\n\n## Preferred tool map\n\n### Function management\n\n- `queryFunctions(action=\"listFunctions\"|\"getFunctionDetail\")`\n- `manageFunctions(action=\"createFunction\")`\n- `manageFunctions(action=\"updateFunctionCode\")`\n- `manageFunctions(action=\"updateFunctionConfig\")`\n\n### Layers (SCF Layer)\n\nLayers are **account-scoped**, not env-scoped. Align with MCP `manageFunctions` \u002F `queryFunctions` layer guidance:\n\n- **Naming (required for new layers):** `{layerName}_{当前envId}` — example `common_cloud1-d9ghadgak3edf6b36`. Do not reuse a bare name like `common` in another env.\n- **Create:** `manageFunctions(action=\"createLayerVersion\", layerName=\"…_{envId}\", …)` after `queryFunctions(action=\"listLayers\")` to check duplicates. MCP may return a soft `warnings` entry if the name lacks the current `envId`; it does **not** rewrite the name.\n- **Read:** `queryFunctions(action=\"listLayers\"|\"listLayerVersions\"|\"getLayerVersionDetail\"|\"listFunctionLayers\")` — list results are an account-level view and may include layers created in other envs.\n- **Bind \u002F unbind \u002F replace:** `manageFunctions(action=\"attachLayer\"|\"detachLayer\"|\"updateFunctionLayers\")`\n- **Delete version:** `manageFunctions(action=\"deleteLayerVersion\")` — deleting a version can affect every env that binds that version.\n- Full contract and warning semantics → `.\u002Freferences\u002Foperations-and-config.md`\n\n### Logs\n\n**Query function logs** — use the `queryFunctions` tool:\n\n- `queryFunctions(action=\"listFunctionLogs\", functionName=\"xxx\")` — list execution logs of a specific function\n- `queryFunctions(action=\"getFunctionLogDetail\", requestId=\"xxx\")` — fetch the detail of one log entry\n\n**`queryFunctions` vs `queryLogs`**:\n- `queryFunctions` queries execution logs of a single cloud function and requires `functionName`\n- `queryLogs` searches CLS (cross-service log aggregation) using CLS query syntax\n\n**Examples**:\n```javascript\n\u002F\u002F List recent logs for cloud function \"my-function\"\nqueryFunctions(action=\"listFunctionLogs\", functionName=\"my-function\", limit=10)\n\n\u002F\u002F Inspect the log detail for a specific request id\nqueryFunctions(action=\"getFunctionLogDetail\", requestId=\"abc-123\")\n\n\u002F\u002F Cross-service error search via CLS\nqueryLogs(action=\"searchLogs\", queryString='(src:app OR src:system) AND log:\"ERROR\"', service=\"tcb\")\n```\n\n`queryLogs` `queryString` follows CLS syntax (see https:\u002F\u002Fcloud.tencent.com\u002Fdocument\u002Fapi\u002F876\u002F128127). The examples below are starting points; adapt them to the concrete log content of your query:\n- Function logs: `(src:app OR src:system) AND log:\"START RequestId\"`\n- Aggregated function request status: `| select request_id, max(status_code) as status where ((request_id='xxxx' AND retry_num=0) AND retry_num=0) AND status_code!=202 group by request_id, retry_num`\n- Document database (NoSQL): `module:database`\n- Document database slow-query events: `module:database AND eventType:(MongoSlowQuery)` — `MongoSlowQuery` is the document-database slow-query event\n- Relational database (MySQL): `module:rdb`\n- Relational database (MySQL) events: `module:rdb AND eventType:(MysqlFreeze OR MysqlRecover OR MysqlSlowQuery)` — `MysqlFreeze` = freeze, `MysqlRecover` = recover, `MysqlSlowQuery` = slow query\n- Workflow (approval flow): `module:workflow`\n- Data model: `module:model`\n- User permissions: `module:auth`\n- LLM trace logs: `module:llm AND logType:llm-tracelog`\n- Gateway access logs: `logType:accesslog`\n- App publish \u002F delete events: `module:app AND eventType:(AppProdPub OR AppProdDel)` — `AppProdPub` = app publish, `AppProdDel` = app delete\n\nIf these are unavailable, read `.\u002Freferences\u002Foperations-and-config.md` before any `callCloudApi` fallback\n\n### Gateway exposure\n\n- `queryGateway(action=\"getRoute\")` \u002F `listRoutes` \u002F `listCustomDomains`\n- `manageGateway(action=\"createRoute\")` — for HTTP functions pass `upstreamResourceType=\"WEB_SCF\"`; for Event functions pass `upstreamResourceType=\"SCF\"`. Omit `domain` to attach the route on the HTTP gateway IsDefault domain (`DomainType=HTTPSERVICE`, typically `*.{region}.app.tcloudbase.com`)\n- **IsDefault vs static hosting CDN:** environments often also expose a separate IsDefault `STATIC_STORE` domain (`*.tcloudbaseapp.com`). Omitting `domain` does **not** bind that static-hosting CDN entry, and it is **not** a `STATIC_STORE` upstream binding (that requires `upstreamResourceType=\"STATIC_STORE\"`). Verify with `queryGateway(action=\"listRoutes\")` and check `Domain` \u002F `DomainType` \u002F `Path` \u002F `UpstreamResourceType`\n- `manageGateway(action=\"updateRoute\")` \u002F `deleteRoute` \u002F `enableRoute` \u002F `disableRoute` \u002F `bindCustomDomain` \u002F `deleteCustomDomain`\n- **Disable a route or the static hosting default domain:** prefer `manageGateway(action=\"disableRoute\", domain=..., path=...)` (looks up the existing route, sets `Routes[].Enable=false` via `ModifyHTTPServiceRoute`). `updateRoute` may also pass `enable=false` \u002F `route.enable=false`. To close `*.tcloudbaseapp.com`, list routes, take the `STATIC_STORE` IsDefault domain, then `disableRoute` with that `domain` and usually `path=\"\u002F\"` — not `manageHosting`, and not `ModifyGatewayRoute`\n- When tool results include `accessUrl` \u002F `accessUrls`, prefer them directly (gateway custom-domain URLs are ranked before default domains)\n- Do **not** call deprecated GWAPI actions via `callCloudApi` (`CreateCloudBaseGWAPI`, etc.)\n\n## Related skills\n\n- `cloudrun-development` -> container services, long-lived runtimes, Agent hosting\n- `http-api-cloudbase` -> raw CloudBase HTTP API invocation patterns\n- `cloudbase-platform` -> general CloudBase platform decisions\n- `ops-inspector` -> AIOps-style inspection and log search across services\n\n## Reference index\n\nAll packaged reference files (required for skill lint reachability):\n\n- [event-functions.md](references\u002Fevent-functions.md)\n- [http-function-credentials.md](references\u002Fhttp-function-credentials.md)\n- [http-functions-custom-image.md](references\u002Fhttp-functions-custom-image.md)\n- [http-functions.md](references\u002Fhttp-functions.md)\n- [operations-and-config.md](references\u002Foperations-and-config.md)\n- [vpc-and-tcp-database.md](references\u002Fvpc-and-tcp-database.md)\n","## Sibling skills (local only)\n\nSibling CloudBase skills ship beside this skill. Use local relative paths such as `..\u002Fauth-tool-cloudbase\u002FSKILL.md`.\n\nIf a referenced sibling skill file is missing from this environment, ask the user to install the full CloudBase plugin (or the missing skill). Do **not** HTTP-fetch remote skill or protocol markdown into the agent context.\n\n**Cross-cutting protocols** (required before code changes or deployments):\n- Change Safety Protocol: `..\u002Fcloudbase-platform\u002Freferences\u002Fprotocols\u002Fchange-safety-protocol.md`\n- Deployment Gate: `..\u002Fcloudbase-platform\u002Freferences\u002Fprotocols\u002Fdeployment-gate.md`\n- Sensitive Runtime Data Protection: `..\u002Fcloudbase-platform\u002Freferences\u002Fprotocols\u002Fsensitive-runtime-data-protection.md`\n\n# Cloud Functions Development\n\n## Activation Contract\n\n### Use this first when\n\n- The task is to create, update, deploy, inspect, or debug a CloudBase Event Function or HTTP Function that serves application runtime logic.\n- The request mentions function runtime, function logs, `scf_bootstrap`, function triggers, or function gateway exposure.\n\n### Read before writing code if\n\n- You still need to decide between Event Function and HTTP Function.\n- The task mentions `manageFunctions`, `queryFunctions`, `manageGateway`, or legacy function-tool names.\n- The task might require `callCloudApi` as a fallback for logs or gateway setup.\n- An HTTP Function will call CloudBase resources through `@cloudbase\u002Fnode-sdk` or `@cloudbase\u002Fmanager-node` -> read `.\u002Freferences\u002Fhttp-function-credentials.md`. HTTP Functions must use explicit credentials; do not rely on the Event Function passwordless runtime path.\n\n### Exception only (do not read by default)\n\n- Migrating an **existing** app that already uses classic TCP DB clients (`DATABASE_URL` \u002F Prisma \u002F `mysql2` \u002F `pg` \u002F Redis) → read `.\u002Freferences\u002Fvpc-and-tcp-database.md` via `.\u002Freferences.md`. New business CRUD must prefer CloudBase native SDK (`app.database()` \u002F `app.rdb()`) or MCP SQL tools instead of TCP.\n\n### Then also read\n\n- Detailed reference routing -> `.\u002Freferences.md`\n- Auth setup or provider-related backend work -> `..\u002Fauth-tool-cloudbase\u002FSKILL.md`\n- CloudBase Integration Center generated WeChat Pay or Official Account functions -> `..\u002Fcloudbase-wechat-integration\u002FSKILL.md` (official docs: `https:\u002F\u002Fdocs.cloudbase.net\u002Fintegration\u002Fintroduce.md`)\n- AI in functions -> `..\u002Fai-model-nodejs\u002FSKILL.md`\n- Long-lived container services or Agent runtimes -> `..\u002Fcloudrun-development\u002FSKILL.md`\n- Calling CloudBase official platform APIs from a client or script -> `..\u002Fhttp-api-cloudbase\u002FSKILL.md`\n\n### Do NOT use for\n\n- CloudRun container services.\n- Web authentication UI implementation.\n- Database-schema design or general data-model work.\n- CloudBase official platform API clients or raw HTTP integrations that only consume platform endpoints.\n- Creating Integration Center instances through guessed APIs. For WeChat Pay or Official Account generated functions, use `cloudbase-wechat-integration` for the business contract and this skill only for function operations.\n- **Tasks that the CloudBase JS SDK can handle directly** — simple data reads\u002Fwrites, leaderboards, file uploads, real-time queries. Reach for the matching SDK surface before writing a function: `db.collection(...).get\u002Fadd\u002Fupdate` only for confirmed NoSQL collections, and `app.rdb().from(...)` for CloudBase PG tables. Functions add deployment complexity, CORS configuration, and HTTP gateway binding that the SDK eliminates entirely.\n\n### Common mistakes \u002F gotchas\n\n- Picking the wrong function type and trying to compensate later.\n- Confusing official CloudBase API client work with building your own HTTP function.\n- Mixing Event Function code shape (`exports.main(event, context)`) with HTTP Function code shape (`req` \u002F `res` on port `9000`).\n- Treating HTTP Access as the implementation model for HTTP Functions. HTTP Access is a gateway configuration for Event Functions, not the HTTP Function runtime model.\n- Assuming `db.collection(\"name\").add(...)` will create a missing document-database collection automatically. Collection creation is a separate management step.\n- **Baking static content into the deployment package — media files, user uploads, or assets that change on their own cadence.** The package is uploaded on every deploy and a function package has a hard size ceiling, so large or independently-changing content makes every deploy slower and can push the package over the limit.\n  - **Media files** (`*.mp4`, large images, fonts) — go to cloud storage, referenced by URL, not into the package.\n  - **User uploads written to the function's local filesystem** — the function is ephemeral and `\u002Ftmp` is small and not shared. Uploads go to cloud storage.\n  - **Frequently-updated static resources bundled in** — every change forces a full function redeploy. Serve them from cloud storage so the function only redeploys when the *code* changes.\n- Forgetting that runtime cannot be changed after creation.\n- Using cloud functions as the first answer for Web login.\n- Forgetting that HTTP Functions must ship `scf_bootstrap`, listen on port `9000`, and include dependencies.\n- Assuming an HTTP Function can use CloudBase SDKs without explicit credentials. The default temporary credential path is not reliable for HTTP Functions and credential rotation can break a running service. Use a CloudBase server API Key or Tencent Cloud key pair for `@cloudbase\u002Fnode-sdk`; use a Tencent Cloud key pair for `@cloudbase\u002Fmanager-node`. See `references\u002Fhttp-function-credentials.md`.\n- Forgetting how an HTTP Function is meant to be reached. A call with no credential fails `401 MISSING_CREDENTIALS`; a call that carries one but is not allowed fails `403 EXCEED_AUTHORITY`. For browser, game or app clients, add a gateway route (`manageGateway(action=\"createRoute\", auth: false)`) instead of widening the function security rule — in PostgreSQL environments that rule lives in an environment-wide `authz.user.rego` document, so editing it overwrites the policy for the whole environment. See `references\u002Fhttp-functions.md`.\n- **Reading an `InsufficientBalance` invoke failure as an account problem.** A cloud function answers HTTP 410 with this code and the code reads as a short account balance, but what runs out is the environment's resource points — drawn down before any account balance and not restored by a top-up. The four causes (trial points exhausted \u002F plan points exhausted \u002F plan expired \u002F account in arrears) need four different answers, only the last of which involves topping up, so diagnose with `manageEnv(action=\"usage\")` plus the account balance before advising. See `..\u002Fcloud-api-operations\u002Freferences\u002Frecipes\u002Fcredits-exhaustion.md`.\n- Mismatching the `scf_bootstrap` Node.js binary path with the function runtime (e.g. using `\u002Fvar\u002Flang\u002Fnode18\u002Fbin\u002Fnode` but setting `runtime: \"Nodejs16.13\"`).\n- For Custom Image HTTP Functions: forgetting that TCR, the CloudApp build, and SCF must be in the same region; using `:latest` instead of a unique tag; or confusing the request-driven port-`9000` image model with a long-lived CloudRun container that listens on the injected `PORT`.\n- Assuming MCP covers the whole image pipeline. `manageFunctions` covers SCF image deploy (Stage B) via `runtime: \"CustomImage\"` + `imageConfig`, but the CloudApp custom build → TCR push (Stage A) is a raw Tencent Cloud API path — confirm action names and parameters from official docs before any `callCloudApi` fallback.\n- Making code or configuration changes without first following the Change Safety Protocol (`cloudbase-platform\u002Freferences\u002Fprotocols\u002Fchange-safety-protocol.md`).\n- Exposing functions publicly or deploying without first completing the checks in `cloudbase-platform\u002Freferences\u002Fprotocols\u002Fdeployment-gate.md`.\n- **Returning `req.headers`, `process.env`, `event`, or `context` wholesale** — gateways may inject `x-cloudbase-context` (base64 temporary credentials). Never echo that header or dump credential env vars to clients. Follow `..\u002Fcloudbase-platform\u002Freferences\u002Fprotocols\u002Fsensitive-runtime-data-protection.md`.\n- **Using a bare layer name (e.g. `common`) across environments.** SCF LayerName is an account-scoped shared namespace: same name → shared version sequence. Create new layers with fixed format `{layerName}_{当前envId}` (e.g. `common_cloud1-d9ghadgak3edf6b36`). Pass the full name as `layerName` — do not invent automatic suffixes. Treat MCP layer `warnings` as soft advisories (operation still succeeds). Details: `.\u002Freferences\u002Foperations-and-config.md`.\n- **Long-running MCP image deployments must complete the full workflow**: When using `manageFunctions` with `deployFunction` for a real `cloud` or `local` deployment, prefer `wait=false` to avoid blocking a single Tool Call for an extended period. If the tool returns a `taskId`, do not end the workflow, report success, or ask the user to wait while the status is `running`. Automatically call `queryFunctions(action=\"getFunctionDeployStatus\", taskId=\"...\")` and continue polling according to the reported progress until the status becomes `succeeded` or `failed`. Only after reaching a reasonable polling limit may you report that the deployment is still in progress; include the `taskId`, current stage, and latest progress. On success, report the image URI or build ID, function status, and Gateway URL. On failure, report the failed stage, error code, request ID, and diagnostic guidance. If the status is `expired`, explain that the local task record exceeded its retention window; the cloud deployment may still be running, so call `getFunctionDetail` to confirm the actual cloud-side status instead of treating it as a failure.\n\n### Minimal checklist\n\n- Read [Cloud Functions Execution Checklist](checklist.md) before deployment or runtime changes.\n- Decide whether the task is Event Function, HTTP Function, or actually CloudRun.\n- **Separate static from dynamic**: media, user uploads and frequently-updated assets live in cloud storage, not in the function package.\n- Pick the detailed reference file in [references.md](references.md) before writing implementation code.\n\n## MCP image deployment with polling\n\nFor real `cloud` or `local` custom-image deployments, prefer:\n\n```json\n{\n  \"action\": \"deployFunction\",\n  \"dryRun\": false,\n  \"confirm\": true,\n  \"wait\": false,\n  \"deployConfig\": {}\n}\n```\n\nThe `wait` field controls whether the current MCP Tool call waits for the complete deployment:\n\n- `wait=true`: wait for the manager deployment to reach a terminal result and return it.\n- `wait=false`: return a `taskId` promptly while the deployment continues in the MCP background.\n\nWhen `wait=false` returns a `taskId`, the deployment workflow is not complete. Automatically call `queryFunctions` with `action=\"getFunctionDeployStatus\"` and that `taskId`; continue while the status is `running`, then stop only at `succeeded` or `failed`. Wait about 5 seconds before the first follow-up query and use the returned progress\u002F`nextActions` to continue without aggressive polling. Do not tell the user to ask again or imply success before a terminal status is returned. An `expired` status means the task exceeded the maximum retention window and was force-terminated locally — the cloud deployment may still be in progress, so confirm the real state with `getFunctionDetail` instead of reporting failure.\n\nIf a reasonable polling limit is reached, report only that the task is still running, including the `taskId`, current status, current stage, and latest progress. For a terminal result, report the deployment strategy, action, image URI\u002Fdigest, build ID, function status, Gateway URL, or the failed stage, error code, request ID, and diagnostic next step.\n\n### Personal-tier TCR credentials — never put the password in tool arguments\n\nPersonal-tier image builds (`imageConfig.imageType=\"personal\"` with `local` \u002F `cloud`) need a TCR push credential. Read it from the MCP process environment, not from tool arguments:\n\n- Leave `func.imageConfig.build.registryCredential` **out of the request** when `TCB_TCR_USERNAME` and `TCB_TCR_PASSWORD` are set in the MCP server `env` block — the MCP fills them in automatically, the same way `TENCENTCLOUD_SECRETID` works.\n- **Never ask the user to paste the password into chat, and never write it into tool arguments.** Anything placed in arguments enters the model context and the tool-call history.\n- If deployment fails with `CLOUD_REGISTRY_CREDENTIAL_MISSING` or `CLOUD_REGISTRY_CREDENTIAL_INVALID`, instruct the user to add these two variables to the `env` block of their MCP configuration and restart the MCP server. Do not work around it by passing the credential inline.\n- The username is the Tencent Cloud account UIN and is not itself a secret; it may be passed explicitly if needed. Explicit arguments take precedence per field, so username-in-argument plus password-from-environment is a valid combination.\n\n**Know when that environment channel does not exist.** It works only for a local stdio MCP server whose client configuration exposes a custom `env` block. Some GUI clients do not inherit shell exports, and IDE-embedded MCP servers usually inject credentials from a hard-coded allowlist (often only `TENCENTCLOUD_*`), leaving the user no way to set arbitrary variables. Telling those users to \"set it in the MCP `env` block\" is an instruction they cannot act on. Route them to an enterprise registry (`imageType=\"enterprise\"`, which mints a short-lived TCR token instead of using a fixed password) or to `buildStrategy=\"image\"` with an already-pushed image.\n\n### Enterprise-tier builds require a login state with CAM permission\n\n`cloud` \u002F `local` builds against an enterprise registry mint a TCR token through CAM (as does `autoGrant`). Environment-level API Keys and OAuth-issued STS credentials carry no CAM policy, so those calls fail with `UnauthorizedOperation`. The MCP probes the login state before starting a real enterprise build and refuses up front rather than failing midway; treat that error as a routing signal, not a retryable fault:\n\n- Sign in with an account-level `TENCENTCLOUD_SECRETID` \u002F `TENCENTCLOUD_SECRETKEY` pair, **or**\n- Switch to `buildStrategy=\"image\"` and deploy an image that was pushed elsewhere, **or**\n- Use a personal-tier registry — its static password goes straight to `docker login` without touching CAM, which makes it the one build path that does work for API Key users.\n\n\n## Writing mode at a glance\n\n- If the request is for SDK calls, timers, or event-driven workflows, write an **Event Function** with `exports.main = async (event, context) => {}`.\n- If the request is for REST APIs, browser-facing endpoints, SSE, or WebSocket, write an **HTTP Function** with `req` \u002F `res` on port `9000`.\n- For Node.js HTTP Functions, default to the native `http` module unless the user explicitly asks for Express, Koa, NestJS, or another framework.\n- If the HTTP Function needs custom system libraries or an arbitrary runtime but should still be SCF request-driven and scale to zero, deploy it as a **Custom Image HTTP Function** (`Runtime: CustomImage`) from a TCR image. The container still listens on the fixed port `9000`. See `.\u002Freferences\u002Fhttp-functions-custom-image.md`. This is distinct from a CloudRun container, which listens on the injected `PORT` and runs long-lived.\n- **有 Dockerfile 的 HTTP 无状态服务可优先考虑 HTTP 云函数，不必上云托管** — a Dockerfile alone does not mean CloudRun. If the service is stateless, request-driven HTTP without long connections \u002F custom runtime \u002F VPC database access, prefer an HTTP Function (or Custom Image HTTP Function) — faster to deploy, cheaper, and no CloudRun environment initialization needed. Route to CloudRun (`..\u002Fcloudrun-development\u002FSKILL.md`) only for WebSocket\u002FSSE long connections, stable independent processes, custom system dependencies, or VPC DB access.\n- If the user mentions HTTP access for an existing Event Function, keep the Event Function code shape and add gateway access separately.\n\n## HTTP Function authoring contract\n\nUse these rules whenever you are writing the function code itself:\n\n- Do not write an HTTP Function as `exports.main(event, context)`. That is the Event Function contract.\n- Treat the function as a standard web server process that must listen on port `9000`.\n- With Node.js, prefer `http.createServer((req, res) => { ... })` by default so the runtime contract stays explicit.\n- With the Node.js native `http` module, do not assume Express-style helpers exist. `req.body`, `req.query`, and `req.params` are not provided for you.\n- For Node.js HTTP Functions, choose one module system up front and keep it consistent. Default to CommonJS for simple functions (`require(...)`, no `\"type\": \"module\"` in `package.json`) unless you explicitly want ES Modules.\n- If you do choose ES Modules (`\"type\": \"module\"` + `import ...`), do not mix in CommonJS-only globals or APIs such as `require(...)`, `module.exports`, or bare `__dirname`. In ESM, derive file paths from `import.meta.url` with `fileURLToPath(...)` only when needed.\n- With the native `http` module, parse `req.url` yourself with `new URL(...)`, collect the request body from the stream, and only then call `JSON.parse`. Empty bodies should be handled explicitly instead of assuming JSON is always present.\n- Return responses explicitly with `res.writeHead(...)` and `res.end(...)`, including `Content-Type` such as `application\u002Fjson; charset=utf-8` for JSON APIs.\n- **Handle CORS headers — but first check who terminates CORS.** A function reached through the HTTP gateway must **not** set `Access-Control-Allow-Origin` itself: the gateway already fills it from the environment security-domain allowlist, and a second value yields `\u003Corigin>,*`, which browsers reject outright — every request fails with a CORS error that looks like the service is down. Only set CORS headers when the function is called directly, outside the gateway:\n  - Respond to `OPTIONS` preflight with an empty `204`\n  - Include `Access-Control-Allow-Origin` only for direct, non-gateway callers\n  - Include `Access-Control-Allow-Methods: GET, POST, OPTIONS` as needed\n  - Include `Access-Control-Allow-Headers: Content-Type` for JSON requests\n- Keep routing and method handling explicit. Unknown paths should return `404`, and known paths with unsupported methods should normally return `405`.\n- Keep gateway setup and security-rule changes separate from the runtime code. They affect access, not the HTTP Function programming model.\n- Do not add HTTP access service configuration when the task is only to create an HTTP Function itself. Gateway paths or custom domains are separate access-layer work; public invocation requirements should be handled through the function security rule workflow (note: anonymous login is disabled by default).\n- If the HTTP Function calls CloudBase through `@cloudbase\u002Fnode-sdk` or `@cloudbase\u002Fmanager-node`, complete the explicit credential gate in `.\u002Freferences\u002Fhttp-function-credentials.md` before deployment. Never hardcode credentials in the function package.\n- **Never echo sensitive runtime data.** Do not return `req.headers`, `process.env`, or `x-cloudbase-context` in responses. Debug endpoints must use an explicit non-sensitive allowlist. See `..\u002Fcloudbase-platform\u002Freferences\u002Fprotocols\u002Fsensitive-runtime-data-protection.md`.\n\n## Quick decision table\n\n| Question | Choose |\n| --- | --- |\n| Triggered by SDK calls or timers? | Event Function |\n| Needs browser-facing HTTP endpoint? | HTTP Function |\n| Needs SSE or WebSocket service? | HTTP Function |\n| Needs custom system libraries \u002F arbitrary runtime, but still SCF request-driven + scale-to-zero? | HTTP Function with `Runtime: CustomImage` (deploy from a TCR image) |\n| Has a Dockerfile but is a stateless HTTP service (no long connections \u002F custom runtime \u002F VPC DB)? | HTTP Function (or Custom Image HTTP Function) — **not** CloudRun |\n| Needs long-lived container runtime or custom system environment? | CloudRun |\n| Only needs HTTP access for an existing Event Function? | Event Function + gateway access |\n\n## How to use this skill (for a coding agent)\n\n1. **Choose the correct runtime model first**\n   - Event Function -> `exports.main(event, context)`\n   - HTTP Function -> web server on port `9000`\n   - If the requirement is really a container service, reroute to CloudRun early\n\n2. **Use the converged MCP entrances**\n   - Reads -> `queryFunctions`, `queryGateway`\n   - Writes -> `manageFunctions`, `manageGateway`\n   - Translate legacy names before acting rather than copying them literally\n\n3. **Write code and deploy, do not stop at local files**\n   - Use `manageFunctions(action=\"createFunction\")` for creation\n   - Use `manageFunctions(action=\"updateFunctionCode\")` for code updates\n   - Use `manageFunctions(action=\"updateFunctionConfig\")` for config updates (timeout, memorySize, envVariables)\n   - For a Custom Image HTTP Function, call `manageFunctions(action=\"createFunction\")` with `func.runtime=\"CustomImage\"` and `imageConfig` (`imageUri` with tag; `registryId` for enterprise TCR); iterate later with `manageFunctions(action=\"updateFunctionCode\")` + `imageConfig`. No `functionRootPath` is needed because the code lives in the image. See `.\u002Freferences\u002Fhttp-functions-custom-image.md`.\n   - Keep `functionRootPath` as the directory that directly contains function folders (e.g., `cloudfunctions\u002F` or `functions\u002F`), NOT the project root and NOT the function subdirectory itself\n   - **Prefer MCP when available** — use `manageFunctions` and `queryFunctions` when those tools are in this session\n   - **CLI fallback when MCP is missing** — if function tools are not loaded (first session \u002F pre-restart), configure MCP for next time, then use `tcb fn deploy` via `..\u002Fcloudbase-cli\u002FSKILL.md` (see guideline `tooling-fallback.md`). Do not stall waiting for restart.\n   - **Do NOT invent CLI when the runtime has no shell** — if only MCP exists and it works, stay on MCP; if neither works, report the gap\n   - For batch updates (multiple functions), call `manageFunctions(action=\"updateFunctionConfig\")` individually for each function — MCP does not have a `--all` batch parameter like CLI\n   - If an HTTP Function uses `@cloudbase\u002Fnode-sdk`, prefer a server API Key created with `manageAppAuth(action=\"createApiKey\", keyType=\"api_key\")` and inject it as `CLOUDBASE_APIKEY`; Tencent Cloud `SecretId` \u002F `SecretKey` is also supported\n   - If an HTTP Function uses `@cloudbase\u002Fmanager-node`, inject Tencent Cloud `SecretId` \u002F `SecretKey`; do not claim that a CloudBase API Key initializes the Manager SDK\n   - Merge credential environment variables with the existing function configuration instead of replacing the whole environment-variable set\n\n4. **Prefer doc-first fallbacks**\n   - If a task falls back to `callCloudApi`, first check the official docs or knowledge-base entry for that action\n   - Confirm the exact action name and parameter contract before calling it\n   - Do not guess raw cloud API payloads from memory\n\n5. **Read the right detailed reference**\n   - Event Function details -> `.\u002Freferences\u002Fevent-functions.md`\n   - HTTP Function details -> `.\u002Freferences\u002Fhttp-functions.md`\n   - HTTP Function CloudBase SDK credentials -> `.\u002Freferences\u002Fhttp-function-credentials.md`\n   - HTTP Function from a container image (`Runtime: CustomImage`, TCR image pipeline) -> `.\u002Freferences\u002Fhttp-functions-custom-image.md`\n   - Logs, gateway, env vars, layers (`{layerName}_{当前envId}`), and legacy mappings -> `.\u002Freferences\u002Foperations-and-config.md`\n\n## Database write reminder\n\n- If a function will write to CloudBase document database, create the target collection first through console or management tooling.\n- `db.collection(\"feedback\").add(...)` only inserts into an existing collection; it does not auto-create `feedback` when absent.\n- If the product requirement says \"create when missing\", implement that as an explicit collection-management step before the first write instead of assuming the runtime write call will provision it.\n\n## Function types comparison\n\n| Feature | Event Function | HTTP Function |\n| --- | --- | --- |\n| Primary trigger | SDK call, timer, event | HTTP request |\n| Entry shape | `exports.main(event, context)` | web server with `req` \u002F `res` |\n| Port | No port | Must listen on `9000` |\n| `scf_bootstrap` | Not required | Required |\n| Dependencies | Auto-installed from `package.json` | Must be packaged with function code |\n| Best for | serverless handlers, scheduled jobs | APIs, SSE, WebSocket, browser-facing services |\n\n## Minimal code skeletons\n\n### Event Function hello world\n\n`cloudfunctions\u002Fhello-event\u002Findex.js`\n\n```js\nexports.main = async (event, context) => {\n  \u002F\u002F Do not return event\u002Fcontext\u002Fprocess.env — they may contain platform secrets.\n  const name = typeof event?.name === \"string\" ? event.name : \"world\";\n  return {\n    ok: true,\n    message: `hello ${name} from event function`,\n  };\n};\n```\n\n`cloudfunctions\u002Fhello-event\u002Fpackage.json`\n\n```json\n{\n  \"name\": \"hello-event\",\n  \"version\": \"1.0.0\"\n}\n```\n\n### HTTP Function hello world\n\n`cloudfunctions\u002Fhello-http\u002Findex.js`\n\n```js\nconst http = require(\"http\");\nconst { URL } = require(\"url\");\n\n\u002F\u002F CORS: leave this empty when the function is reached through the HTTP gateway.\n\u002F\u002F The gateway already fills Access-Control-Allow-Origin from the environment\n\u002F\u002F security-domain allowlist; adding a second value makes the header illegal\n\u002F\u002F ('\u003Corigin>,*') and browsers block every request. Only set CORS headers here\n\u002F\u002F when the function is called directly, outside the gateway.\nconst CORS_HEADERS = {};\n\nfunction sendJson(res, statusCode, data) {\n  res.writeHead(statusCode, {\n    \"Content-Type\": \"application\u002Fjson; charset=utf-8\",\n    ...CORS_HEADERS,\n  });\n  res.end(JSON.stringify(data));\n}\n\nfunction sendOptions(res) {\n  res.writeHead(204, CORS_HEADERS);\n  res.end();\n}\n\nfunction readJsonBody(req) {\n  return new Promise((resolve, reject) => {\n    let raw = \"\";\n    req.on(\"data\", (chunk) => { raw += chunk; });\n    req.on(\"end\", () => {\n      if (!raw) { resolve({}); return; }\n      try { resolve(JSON.parse(raw)); } catch (e) { resolve({}); }\n    });\n    req.on(\"error\", reject);\n  });\n}\n\nconst server = http.createServer(async (req, res) => {\n  \u002F\u002F Handle CORS preflight\n  if (req.method === \"OPTIONS\") {\n    return sendOptions(res);\n  }\n\n  const url = new URL(req.url || \"\u002F\", \"http:\u002F\u002F127.0.0.1\");\n\n  if (req.method === \"GET\" && url.pathname === \"\u002F\") {\n    sendJson(res, 200, { ok: true, message: \"hello from http function\" });\n  } else if (req.method === \"POST\" && url.pathname === \"\u002F\") {\n    const body = await readJsonBody(req);\n    sendJson(res, 200, { received: body });\n  } else {\n    sendJson(res, 404, { error: \"Not Found\" });\n  }\n});\n\nserver.listen(9000);\n```\n\nFor a more complete example with routing, method checks, and error handling, see `.\u002Freferences\u002Fhttp-functions.md`.\n\n`cloudfunctions\u002Fhello-http\u002Fscf_bootstrap`\n\n```bash\n#!\u002Fbin\u002Fbash\n\u002Fvar\u002Flang\u002Fnode18\u002Fbin\u002Fnode index.js\n```\n\nThe `scf_bootstrap` binary path must match the runtime — see the full mapping table in `.\u002Freferences\u002Fhttp-functions.md`.\n\n`cloudfunctions\u002Fhello-http\u002Fpackage.json`\n\n```json\n{\n  \"name\": \"hello-http\",\n  \"version\": \"1.0.0\"\n}\n```\n\n## Preferred tool map\n\n### Function management\n\n- `queryFunctions(action=\"listFunctions\"|\"getFunctionDetail\")`\n- `manageFunctions(action=\"createFunction\")`\n- `manageFunctions(action=\"updateFunctionCode\")`\n- `manageFunctions(action=\"updateFunctionConfig\")`\n\n### Layers (SCF Layer)\n\nLayers are **account-scoped**, not env-scoped. Align with MCP `manageFunctions` \u002F `queryFunctions` layer guidance:\n\n- **Naming (required for new layers):** `{layerName}_{当前envId}` — example `common_cloud1-d9ghadgak3edf6b36`. Do not reuse a bare name like `common` in another env.\n- **Create:** `manageFunctions(action=\"createLayerVersion\", layerName=\"…_{envId}\", …)` after `queryFunctions(action=\"listLayers\")` to check duplicates. MCP may return a soft `warnings` entry if the name lacks the current `envId`; it does **not** rewrite the name.\n- **Read:** `queryFunctions(action=\"listLayers\"|\"listLayerVersions\"|\"getLayerVersionDetail\"|\"listFunctionLayers\")` — list results are an account-level view and may include layers created in other envs.\n- **Bind \u002F unbind \u002F replace:** `manageFunctions(action=\"attachLayer\"|\"detachLayer\"|\"updateFunctionLayers\")`\n- **Delete version:** `manageFunctions(action=\"deleteLayerVersion\")` — deleting a version can affect every env that binds that version.\n- Full contract and warning semantics → `.\u002Freferences\u002Foperations-and-config.md`\n\n### Logs\n\n**Query function logs** — use the `queryFunctions` tool:\n\n- `queryFunctions(action=\"listFunctionLogs\", functionName=\"xxx\")` — list execution logs of a specific function\n- `queryFunctions(action=\"getFunctionLogDetail\", requestId=\"xxx\")` — fetch the detail of one log entry\n\n**`queryFunctions` vs `queryLogs`**:\n- `queryFunctions` queries execution logs of a single cloud function and requires `functionName`\n- `queryLogs` searches CLS (cross-service log aggregation) using CLS query syntax\n\n**Examples**:\n```javascript\n\u002F\u002F List recent logs for cloud function \"my-function\"\nqueryFunctions(action=\"listFunctionLogs\", functionName=\"my-function\", limit=10)\n\n\u002F\u002F Inspect the log detail for a specific request id\nqueryFunctions(action=\"getFunctionLogDetail\", requestId=\"abc-123\")\n\n\u002F\u002F Cross-service error search via CLS\nqueryLogs(action=\"searchLogs\", queryString='(src:app OR src:system) AND log:\"ERROR\"', service=\"tcb\")\n```\n\n`queryLogs` `queryString` follows CLS syntax (see https:\u002F\u002Fcloud.tencent.com\u002Fdocument\u002Fapi\u002F876\u002F128127). The examples below are starting points; adapt them to the concrete log content of your query:\n- Function logs: `(src:app OR src:system) AND log:\"START RequestId\"`\n- Aggregated function request status: `| select request_id, max(status_code) as status where ((request_id='xxxx' AND retry_num=0) AND retry_num=0) AND status_code!=202 group by request_id, retry_num`\n- Document database (NoSQL): `module:database`\n- Document database slow-query events: `module:database AND eventType:(MongoSlowQuery)` — `MongoSlowQuery` is the document-database slow-query event\n- Relational database (MySQL): `module:rdb`\n- Relational database (MySQL) events: `module:rdb AND eventType:(MysqlFreeze OR MysqlRecover OR MysqlSlowQuery)` — `MysqlFreeze` = freeze, `MysqlRecover` = recover, `MysqlSlowQuery` = slow query\n- Workflow (approval flow): `module:workflow`\n- Data model: `module:model`\n- User permissions: `module:auth`\n- LLM trace logs: `module:llm AND logType:llm-tracelog`\n- Gateway access logs: `logType:accesslog`\n- App publish \u002F delete events: `module:app AND eventType:(AppProdPub OR AppProdDel)` — `AppProdPub` = app publish, `AppProdDel` = app delete\n\nIf these are unavailable, read `.\u002Freferences\u002Foperations-and-config.md` before any `callCloudApi` fallback\n\n### Gateway exposure\n\n- `queryGateway(action=\"getRoute\")` \u002F `listRoutes` \u002F `listCustomDomains`\n- `manageGateway(action=\"createRoute\")` — for HTTP functions pass `upstreamResourceType=\"WEB_SCF\"`; for Event functions pass `upstreamResourceType=\"SCF\"`. Omit `domain` to attach the route on the HTTP gateway IsDefault domain (`DomainType=HTTPSERVICE`, typically `*.{region}.app.tcloudbase.com`)\n- **IsDefault vs static hosting CDN:** environments often also expose a separate IsDefault `STATIC_STORE` domain (`*.tcloudbaseapp.com`). Omitting `domain` does **not** bind that static-hosting CDN entry, and it is **not** a `STATIC_STORE` upstream binding (that requires `upstreamResourceType=\"STATIC_STORE\"`). Verify with `queryGateway(action=\"listRoutes\")` and check `Domain` \u002F `DomainType` \u002F `Path` \u002F `UpstreamResourceType`\n- `manageGateway(action=\"updateRoute\")` \u002F `deleteRoute` \u002F `enableRoute` \u002F `disableRoute` \u002F `bindCustomDomain` \u002F `deleteCustomDomain`\n- **Disable a route or the static hosting default domain:** prefer `manageGateway(action=\"disableRoute\", domain=..., path=...)` (looks up the existing route, sets `Routes[].Enable=false` via `ModifyHTTPServiceRoute`). `updateRoute` may also pass `enable=false` \u002F `route.enable=false`. To close `*.tcloudbaseapp.com`, list routes, take the `STATIC_STORE` IsDefault domain, then `disableRoute` with that `domain` and usually `path=\"\u002F\"` — not `manageHosting`, and not `ModifyGatewayRoute`\n- When tool results include `accessUrl` \u002F `accessUrls`, prefer them directly (gateway custom-domain URLs are ranked before default domains)\n- Do **not** call deprecated GWAPI actions via `callCloudApi` (`CreateCloudBaseGWAPI`, etc.)\n\n## Related skills\n\n- `cloudrun-development` -> container services, long-lived runtimes, Agent hosting\n- `http-api-cloudbase` -> raw CloudBase HTTP API invocation patterns\n- `cloudbase-platform` -> general CloudBase platform decisions\n- `ops-inspector` -> AIOps-style inspection and log search across services\n\n## Reference index\n\nAll packaged reference files (required for skill lint reachability):\n\n- [event-functions.md](references\u002Fevent-functions.md)\n- [http-function-credentials.md](references\u002Fhttp-function-credentials.md)\n- [http-functions-custom-image.md](references\u002Fhttp-functions-custom-image.md)\n- [http-functions.md](references\u002Fhttp-functions.md)\n- [operations-and-config.md](references\u002Foperations-and-config.md)\n- [vpc-and-tcp-database.md](references\u002Fvpc-and-tcp-database.md)\n",{"name":5,"license":14,"version":23,"alwaysApply":19,"description":7},"2.36.2","main","33b6151ccee9aa0816c6f32d021be77d82772755","connectors\u002Fcloudbase\u002Fskills\u002Freferences\u002Fcloud-functions",138,"https:\u002F\u002Fgithub.com\u002Finfometa\u002Fworkbuddyskills","https:\u002F\u002Fgithub.com\u002Finfometa","2026-11-11 03:15:35",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add infometa\u002Fworkbuddyskills --skill cloud-functions",{"tool":37,"command":38},"bunx","bunx skills add infometa\u002Fworkbuddyskills --skill cloud-functions",{"tool":40,"command":41},"pnpm","pnpm dlx skills add infometa\u002Fworkbuddyskills --skill cloud-functions","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Finfometa\u002Fworkbuddyskills\u002Fblob\u002Fmain\u002Fconnectors\u002Fcloudbase\u002Fskills\u002Freferences\u002Fcloud-functions\u002FSKILL.md",true,[45,51,55,59,63,67,71,75],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"checklist.md","REFERENCE","参考文档",4729,"https:\u002F\u002Fgithub.com\u002Finfometa\u002Fworkbuddyskills\u002Fblob\u002Fmain\u002Fconnectors\u002Fcloudbase\u002Fskills\u002Freferences\u002Fcloud-functions\u002Fchecklist.md",{"path":52,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":53,"sourceHtmlUrl":54},"references.md",3510,"https:\u002F\u002Fgithub.com\u002Finfometa\u002Fworkbuddyskills\u002Fblob\u002Fmain\u002Fconnectors\u002Fcloudbase\u002Fskills\u002Freferences\u002Fcloud-functions\u002Freferences.md",{"path":56,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":57,"sourceHtmlUrl":58},"references\u002Fevent-functions.md",3533,"https:\u002F\u002Fgithub.com\u002Finfometa\u002Fworkbuddyskills\u002Fblob\u002Fmain\u002Fconnectors\u002Fcloudbase\u002Fskills\u002Freferences\u002Fcloud-functions\u002Freferences\u002Fevent-functions.md",{"path":60,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":61,"sourceHtmlUrl":62},"references\u002Fhttp-function-credentials.md",5674,"https:\u002F\u002Fgithub.com\u002Finfometa\u002Fworkbuddyskills\u002Fblob\u002Fmain\u002Fconnectors\u002Fcloudbase\u002Fskills\u002Freferences\u002Fcloud-functions\u002Freferences\u002Fhttp-function-credentials.md",{"path":64,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":65,"sourceHtmlUrl":66},"references\u002Fhttp-functions-custom-image.md",10784,"https:\u002F\u002Fgithub.com\u002Finfometa\u002Fworkbuddyskills\u002Fblob\u002Fmain\u002Fconnectors\u002Fcloudbase\u002Fskills\u002Freferences\u002Fcloud-functions\u002Freferences\u002Fhttp-functions-custom-image.md",{"path":68,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":69,"sourceHtmlUrl":70},"references\u002Fhttp-functions.md",17966,"https:\u002F\u002Fgithub.com\u002Finfometa\u002Fworkbuddyskills\u002Fblob\u002Fmain\u002Fconnectors\u002Fcloudbase\u002Fskills\u002Freferences\u002Fcloud-functions\u002Freferences\u002Fhttp-functions.md",{"path":72,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Foperations-and-config.md",9919,"https:\u002F\u002Fgithub.com\u002Finfometa\u002Fworkbuddyskills\u002Fblob\u002Fmain\u002Fconnectors\u002Fcloudbase\u002Fskills\u002Freferences\u002Fcloud-functions\u002Freferences\u002Foperations-and-config.md",{"path":76,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002Fvpc-and-tcp-database.md",3734,"https:\u002F\u002Fgithub.com\u002Finfometa\u002Fworkbuddyskills\u002Fblob\u002Fmain\u002Fconnectors\u002Fcloudbase\u002Fskills\u002Freferences\u002Fcloud-functions\u002Freferences\u002Fvpc-and-tcp-database.md",[80,87,94,101,108,117],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":18},"01M7A1EC013S1PBBTSH2PA2S7D","yingmi-skill","当用户需要查询基金、策略、公告、财经资讯，做资产配置、组合诊断、风险回测、现金流分析，或生成图表、PDF 时，优先使用本 Skill 获取真实数据与可执行能力。","https:\u002F\u002Fgithub.com\u002Finfometa\u002Fworkbuddyskills\u002Fblob\u002Fmain\u002Fskills\u002Fyingmi-skill\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":18},"01M7A194T67P6NRVYK8KCTH3CH","web-access","所有联网操作必须通过此 skill 处理，包括：搜索、网页抓取、登录后操作、网络交互等。","https:\u002F\u002Fgithub.com\u002Finfometa\u002Fworkbuddyskills\u002Fblob\u002Fmain\u002Fskills\u002Fweb-access\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":18},"01M7A14FATMDD6FK8QAGXY5GVR","tencentmap-map-assistant","腾讯位置服务·地图助手 Skill，一句自然语言调用腾讯地图全套能力，无需开发者账号、开箱即用。提供 AI 旅游攻略、地点搜索（含评分\u002F人均\u002F营业时间）、关键词提示、路线规划（驾车\u002F步行\u002F公交\u002F骑行）、地址解析与逆解析、行政区划、IP 定位、距离计算、天气查询，并可将行程或多 POI 渲染成网页地图。涉及找地点、规划路线、旅游行程、查天气、坐标转换等出行场景时使用。","https:\u002F\u002Fgithub.com\u002Finfometa\u002Fworkbuddyskills\u002Fblob\u002Fmain\u002Fskills\u002Ftencentmap-map-assistant\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":18},"01M7A0SX4XW5053MZ2S921EDH2","skill-scanner","Scan any agent skill for security risks before you install or use it. Powered by Tencent Zhuque Lab A.I.G (AI-Infra-Guard). 100% local static analysis — no file contents or credentials leave your device. Compatible with CodeBuddy, Cursor, Windsurf, Claude Code, OpenClaw and more. Triggers on: 这个 skill 安全吗, skill 安全扫描, 检查 skill 安全, audit skill, scan skill, check skill safety, analyze skill, inspect skill, verify skill, skill security, skill supply chain. Do NOT trigger for general agent usage, full system health checks, project debugging, or normal development.","https:\u002F\u002Fgithub.com\u002Finfometa\u002Fworkbuddyskills\u002Fblob\u002Fmain\u002Fskills\u002Fskill-scanner\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":112,"licenseFileUrl":113,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":18},"01M7A0SQC2CZB3450G8471673M","skill-creator","Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends agent capabilities with specialized knowledge, workflows, or tool integrations.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Finfometa\u002Fworkbuddyskills\u002Fblob\u002Fmain\u002Fskills\u002Fskill-creator\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Finfometa\u002Fworkbuddyskills\u002Fblob\u002Fmain\u002Fskills\u002Fskill-creator\u002FSKILL.md",[],[],{"skillNo":118,"name":119,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":18},"01M7A0RHV7BKS7DFQF9X9QCCNN","shader-dev","Comprehensive GLSL shader techniques for creating stunning visual effects — ray marching, SDF modeling, fluid simulation, particle systems, procedural generation, lighting, post-processing, and more.","https:\u002F\u002Fgithub.com\u002Finfometa\u002Fworkbuddyskills\u002Fblob\u002Fmain\u002Fskills\u002Fshader-dev\u002FSKILL.md",[],[]]