$npx -y skills add TencentCloudBase/cloudbase-skills --skill cloudbase-wechat-integrationCloudBase WeChat integration guide for Mini Program WeChat Pay, Official Account JSAPI Pay, Native QR-code Pay, Official Account OAuth, openid handling, payment callbacks, and CloudBase Integration Center generated functions. This skill should be used when users ask to add, debug
| 1 | # CloudBase WeChat Integration |
| 2 | |
| 3 | This skill routes WeChat payment and official-account work through CloudBase Integration Center. It gives the agent the stable execution contract and points to official `index.md` docs for console details that may change. |
| 4 | |
| 5 | ## Standalone Install Note |
| 6 | |
| 7 | This skill is designed to work when distributed independently on platforms such as OpenClaw. If sibling CloudBase skills are unavailable, use the references in this skill directory plus the official `index.md` documentation links in each reference file. |
| 8 | |
| 9 | - CloudBase main entry: `https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/SKILL.md` |
| 10 | - Current skill raw source: `https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/cloudbase-wechat-integration/SKILL.md` |
| 11 | - CloudBase Integration Center overview: `https://docs.cloudbase.net/integration/introduce/index.md` |
| 12 | - CloudBase Integration Center usage: `https://docs.cloudbase.net/integration/usage/index.md` |
| 13 | - When cloud function deployment or log operations are needed and no sibling skill is available, use the current platform's CloudBase MCP tools or CloudBase console instead of guessing unsupported APIs. |
| 14 | |
| 15 | ## Activation Contract |
| 16 | |
| 17 | ### Use this first when |
| 18 | |
| 19 | - The user asks about WeChat Pay, 小程序支付, 微信支付, JSAPI 支付, 公众号支付, Native 扫码支付, 二维码支付, refund callbacks, payment callbacks, `wx.requestPayment`, `WeixinJSBridge`, `openid`, or Official Account OAuth in a CloudBase app. |
| 20 | - The task mentions CloudBase Integration Center, 集成中心, generated payment functions, `pay-common`, `offiaccount-common`, or callback routing for WeChat payment. |
| 21 | - The user needs to extend a CloudBase Integration Center generated function with order persistence, idempotency, fulfillment, or payment-status sync. |
| 22 | |
| 23 | ### Then also read |
| 24 | |
| 25 | - Mini Program structure and preview work -> `../miniprogram-development/SKILL.md` (standalone fallback: `https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/miniprogram-development/SKILL.md`; if unavailable, use the current mini program platform docs and the mini-program payment reference in this skill) |
| 26 | - Web frontend work -> `../web-development/SKILL.md` (standalone fallback: `https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/web-development/SKILL.md`; if unavailable, use the JSAPI or Native references in this skill) |
| 27 | - Cloud function runtime, logs, deployment, or gateway work -> `../cloud-functions/SKILL.md` (standalone fallback: `https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/cloud-functions/SKILL.md`; if unavailable, use CloudBase console/MCP function tools and the generated-function guidance in this skill) |
| 28 | |
| 29 | ### Do NOT use for |
| 30 | |
| 31 | - Generic CloudBase Web Auth or Mini Program native identity work that does not involve WeChat payment or official-account OAuth. |
| 32 | - General CloudBase cloud function development unrelated to Integration Center generated functions. |
| 33 | - Creating or managing Integration Center instances through guessed MCP tools, guessed Manager SDK methods, or undocumented Cloud API actions. |
| 34 | - Storing merchant secrets, private keys, APIv3 keys, AppSecret values, or certificates in app source code, generated examples, README files, commits, or prompts. |
| 35 | |
| 36 | ## Operating Rules |
| 37 | |
| 38 | 1. Treat Integration Center creation as a console-first workflow unless a public Manager SDK or Cloud API contract is confirmed in official docs. |
| 39 | 2. Use official `index.md` docs for console UI steps and credential fields; do not copy stale console screenshots or invent field names. |
| 40 | 3. Never ask the user to paste secrets into chat. Tell them to configure merchant and official-account credentials in the CloudBase console Integration Center form. |
| 41 | 4. Do not assume generated function names are fixed. `pay-common` and `offiaccount-common` are examples; ask for or inspect the actual function name before writing calls. |
| 42 | 5. Treat frontend payment success as UI feedback only. The authoritative payment state must come from server-side query results or payment callbacks. |
| 43 | 6. When extending generated functions, preserve credential environment variables and generated callback verification/decryption logic. Add business logic around order checks, persistence, idempotency, and fulfillment. |
| 44 | 7. Before changing payment or callback code, identify the target scenario and load only the matching reference file. |
| 45 | |
| 46 | ## Routing |
| 47 | |
| 48 | | Task | Read | Why | |
| 49 | | --- | --- | --- | |
| 50 | | Capability selec |