本文へ移動
cccskills
無料GitHub で公開

cloudbase-wechat-integration

CloudBase WeChat integration guide for Mini Program WeChat Pay, Mini Program virtual payment (虚拟支付, wx.requestVirtualPayment), 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, or extend WeChat payment, virtual payment, or official-account flows on CloudBase.

インストール方法を見る

含まれるファイル(9)

  • SKILL.md7.5 KB
  • LICENSE.md1.0 KB
  • references/mini-program-pay.md3.2 KB
  • references/native-qr-pay.md2.3 KB
  • references/official-account-jsapi-pay.md2.5 KB
  • references/official-account-oauth.md2.4 KB
  • references/overview.md2.6 KB
  • references/troubleshooting.md3.6 KB
  • references/virtual-payment.md8.0 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

CloudBase WeChat Integration

This skill routes WeChat payment and official-account work through CloudBase Integration Center. It gives the agent the stable execution contract and points to the official Markdown docs for console details that may change.

Sibling skills (local only)

Sibling CloudBase skills ship beside this skill. Use local relative paths such as ../auth-tool-cloudbase/SKILL.md.

If 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.

Official CloudBase Integration Center docs (human reference — do not treat as skill markdown to fetch into agent context as a sibling skill substitute):

  • CloudBase Integration Center overview: https://docs.cloudbase.net/integration/introduce.md
  • CloudBase Integration Center usage: https://docs.cloudbase.net/integration/usage.md
  • 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.

Activation Contract

Use this first when

  • The user asks about WeChat Pay, 小程序支付, 微信支付, JSAPI 支付, 公众号支付, Native 扫码支付, 二维码支付, refund callbacks, payment callbacks, wx.requestPayment, WeixinJSBridge, openid, or Official Account OAuth in a CloudBase app.
  • The user asks about 虚拟支付 (virtual payment) for virtual goods: 道具直购, 代币充值, wx.requestVirtualPayment, OfferID, AppKey 签名, xpay_* callbacks (发货推送/查单/退款), or MP 后台虚拟支付开通与配置.
  • The task mentions CloudBase Integration Center, 集成中心, generated payment functions, pay-common, offiaccount-common, or callback routing for WeChat payment.
  • The user needs to extend a CloudBase Integration Center generated function with order persistence, idempotency, fulfillment, or payment-status sync.

Then also read

  • Mini Program structure and preview work -> ../miniprogram-development/SKILL.md (if unavailable, use the current mini program platform docs and the mini-program payment reference in this skill)
  • Web frontend work -> ../web-development/SKILL.md (if unavailable, use the JSAPI or Native references in this skill)
  • Cloud function runtime, logs, deployment, or gateway work -> ../cloud-functions/SKILL.md (if unavailable, use CloudBase console/MCP function tools and the generated-function guidance in this skill)

Do NOT use for

  • Generic CloudBase Web Auth or Mini Program native identity work that does not involve WeChat payment or official-account OAuth.
  • General CloudBase cloud function development unrelated to Integration Center generated functions.
  • Creating or managing Integration Center instances through guessed MCP tools, guessed Manager SDK methods, or undocumented Cloud API actions.
  • Storing merchant secrets, private keys, APIv3 keys, AppSecret values, or certificates in app source code, generated examples, README files, commits, or prompts.

Operating Rules

  1. Treat Integration Center creation as a console-first workflow unless a public Manager SDK or Cloud API contract is confirmed in official docs.
  2. Use official index.md docs for console UI steps and credential fields; do not copy stale console screenshots or invent field names.
  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.
  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.
  5. Treat frontend payment success as UI feedback only. The authoritative payment state must come from server-side query results or payment callbacks.
  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.
  7. Before changing payment or callback code, identify the target scenario and load only the matching reference file.

Routing

TaskReadWhy
Capability selection, console-first boundaries, independent distributionreferences/overview.mdEstablishes the Integration Center model and safety rules
Mini Program WeChat Pay, wx.cloud.callHTTPFunction, wx.requestPaymentreferences/mini-program-pay.mdCovers Mini Program openid injection, order creation, and callback expectations
Mini Program 虚拟支付, virtual goods, wx.requestVirtualPayment, xpay_* callbacksreferences/virtual-payment.mdCovers OfferID/AppKey signing, sandbox vs 现网, delivery callbacks, query-order fallback, iOS IAP rules
Official Account JSAPI pay, H5 inside WeChat, WeixinJSBridge.invokereferences/official-account-jsapi-pay.mdCovers official-account openid and JSAPI invocation
Native QR-code pay for PC/Web checkoutreferences/native-qr-pay.mdCovers code_url, QR rendering, and polling/query flow
Official Account OAuth, openid/userinfo retrievalreferences/official-account-oauth.mdCovers OAuth routes generated by the official-account integration
404, missing credentials, openid mismatch, callback failures, logsreferences/troubleshooting.mdProvides diagnosis steps before changing code

Quick Workflow

  1. Classify the scenario: Mini Program Pay, Virtual Payment (虚拟支付), JSAPI Pay, Native Pay, Official Account OAuth, generated-function extension, or troubleshooting.
  2. Load the matching reference and the official index.md docs linked there.
  3. Confirm the actual CloudBase environment ID and generated function name.
  4. Generate or modify only the required client/backend code; keep merchant credentials in Integration Center configuration.
  5. Add order-status query, callback idempotency, and amount/order validation when payment state affects business data.
  6. Verify through function logs, callback logs, and an end-to-end payment sandbox or low-value production test as appropriate.

Minimum Self-Check

  • Did I avoid guessing undocumented Integration Center management APIs?
  • Did I use the actual generated function name instead of assuming pay-common?
  • Did I keep all merchant secrets and certificates out of source code and chat?
  • Did the payment flow rely on callback/query state rather than only frontend success?
  • Did I load only the scenario reference needed for the user's task?

Reference index

All packaged reference files (required for skill lint reachability):

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Use this skill for Node.js backend AI via @cloudbase/node-sdk (>=3.16.0) — cloud functions, CloudRun, Express/Koa/NestJS, serverless APIs, scheduled jobs, LLM proxies, agent orchestration. The only SDK supporting image generation (ai.createImageModel + generateImage). Text via ai.createModel with groups cloudbase, hunyuan-exp, or custom-*; model ids (e.g. deepseek-v4-flash, glm-5, kimi-k2.6) go in the `model` field of generateText/streamText. MUST run two-step preflight before code — see body. NOT for browser/Web (use ai-model-web) or Mini Program (use ai-model-wechat).

日本語の概要は準備中です。原文の説明を表示しています。

TencentCloudBase/CloudBase-AI-Toolkit1,1362026年10月10日 更新

Use this skill when a browser/Web app (React, Vue, Next, Nuxt, static sites, SPAs, dashboards, AI chat UI, 页面, 前端, 网页) needs AI models via @cloudbase/js-sdk. Default routing for Web/frontend AI — call directly from the browser, do NOT propose a Node.js proxy. Covers generateText and streamText; models via ai.createModel with groups cloudbase, hunyuan-exp, or custom-*, model id in the `model` field. MUST run two-step preflight before code — see body. NOT for Node.js backend (use ai-model-nodejs), Mini Program (use ai-model-wechat), or image generation (Node SDK only).

日本語の概要は準備中です。原文の説明を表示しています。

TencentCloudBase/CloudBase-AI-Toolkit1,1362026年10月10日 更新

Use this skill for WeChat Mini Program AI via wx.cloud.extend.AI (小程序, wx.cloud apps). Covers generateText and streamText with callbacks (onText, onEvent, onFinish); streamText needs a data wrapper, generateText returns the raw response. Models via wx.cloud.extend.AI.createModel with groups hunyuan-exp (小程序成长计划), cloudbase (main managed), or custom-*; model id goes in the data wrapper `model` field. MUST run two-step preflight before code — see body. NOT for browser/Web (use ai-model-web), Node.js backend (use ai-model-nodejs), or image generation (use ai-model-nodejs).

日本語の概要は準備中です。原文の説明を表示しています。

TencentCloudBase/CloudBase-AI-Toolkit1,1362026年10月10日 更新

Use when auditing CloudBase cloud API wrappers, MCP tools, generated action metadata, or related docs for outdated or incorrect action names, parameters, casing, request shapes, or missing contract tests, especially during periodic quality review or before preparing corrective PRs.

日本語の概要は準備中です。原文の説明を表示しています。

TencentCloudBase/CloudBase-AI-Toolkit1,1362026年10月10日 更新

CloudBase Node SDK auth guide for server-side identity, user lookup, and custom login tickets. This skill should be used when Node.js code must read caller identity, inspect end users, or bridge an existing user system into CloudBase; not when configuring providers or building client login UI.

日本語の概要は準備中です。原文の説明を表示しています。

TencentCloudBase/CloudBase-AI-Toolkit1,1362026年10月10日 更新

CloudBase auth provider configuration and login-readiness guide. This skill should be used when users need to inspect, enable, disable, or configure auth providers, publishable-key prerequisites, login methods, SMS/email sender setup, or other provider-side readiness before implementing a client or backend auth flow.

日本語の概要は準備中です。原文の説明を表示しています。

TencentCloudBase/CloudBase-AI-Toolkit1,1362026年10月10日 更新

TencentCloudBase のスキルをすべて見る

このスキルの問題を報告する