Tencent Cloud CloudBase WeChat Ecosystem Integration Skill: Standardized Integration of Payment and OAuth via the Integration Center

Preface

When integrating WeChat Pay or Official Account OAuth on CloudBase, common difficulties often lie not in “whether WeChat APIs can be called,” but in unpredictable cloud function names generated by the Integration Center, aligning callback signature verification with openid scenarios, and keeping merchant keys out of the repository. Reading official Markdown and Integration Center documentation often requires jumping across multiple pages; AI Agents easily default to hardcoding example function names or treating frontend payment success as the terminal state.

Below is an introduction to @tencent-adm/cloudbase-wechat-integration (WeChat Ecosystem Integration) on SkillHub. It organizes WeChat capabilities under the CloudBase Integration Center into an Agent-executable SKILL.md and scenario-specific references. Maintained by the Tencent Cloud CloudBase team, the current version is v2.36.0, categorized under dev-programming, with the tag requires_api_key=false (The Skill itself does not require separate API Key configuration; WeChat Pay still requires merchant and Official Account credentials to be configured in the console).

What is This

One-sentence positioning: A WeChat ecosystem integration guide Skill for CloudBase applications, using the Integration Center as the entry point. It covers Mini Program payment, Official Account JSAPI/Native payment, Official Account OAuth, openid handling, and the extension of payment-related cloud functions generated by the Integration Center.

Origin and Distribution: Published by the Tencent Cloud CloudBase team, sourced from enterprise. On SkillHub, the coordinates are @tencent-adm/cloudbase-wechat-integration, with a page rating of 100000 and 6095 downloads (subject to SkillHub display).

Official Entry Points:

  • SkillHub API: https://api.skillhub.cn/tencent-adm/cloudbase-wechat-integration
  • SkillHub Details: https://www.skillhub.cn/skills/tencent-adm/cloudbase-wechat-integration
  • CloudBase Documentation (Installation & Test Prompts): https://docs.cloudbase.net/ai/cloudbase-ai-toolkit/prompts/cloudbase-wechat-integration

Core Features

The following content aligns with the SKILL.md (v2.36.0) inside the Skill package and the official documentation pages; only explicitly stated capabilities are listed.

Payment and OAuth Scenarios

Scenario Skill Reference Key Points
Mini Program WeChat Pay references/mini-program-pay.md wx.cloud.callHTTPFunction, wx.requestPayment, openid injection & callback expectations
Mini Program Virtual Payment references/virtual-payment.md wx.requestVirtualPayment, OfferID / AppKey signing, xpay_* callbacks, sandbox & production
Official Account JSAPI Pay references/official-account-jsapi-pay.md Official Account openid, WeixinJSBridge.invoke
Native QR Code Pay references/native-qr-pay.md code_url, QR code display, polling / order inquiry
Official Account OAuth references/official-account-oauth.md OAuth routes generated by Integration Center, openid / userinfo
Troubleshooting references/troubleshooting.md 404s, missing credentials, openid mismatch, callback failures, logs

Agent Execution Contract (Operating Rules Summary)

  1. Integration Center instance creation prioritizes the console; do not guess undocumented Manager SDK / Cloud APIs.
  2. Console steps and credential fields follow the official index.md; pay-common and offiaccount-common are example function names only. Real function names in the environment must be confirmed before calling.
  3. Merchant keys, APIv3 keys, AppSecret, certificates, etc., are configured only in the Integration Center and must not be written into source code, commit history, or conversations.
  4. Frontend payment success is merely UI feedback; order status is determined by server-side order inquiry or payment callbacks. When extending generated functions, preserve signature verification / decryption logic and add idempotency and fulfillment handling.

Out of Scope

Pure CloudBase Web login, Mini Program identity unrelated to payment, general cloud function development (non-Integration Center generated functions), and creating Integration Center instances via guessed MCP methods—the Skill explicitly suggests using the console or official CloudBase MCP tools instead.

Installation and Activation

The Skill is based on the general SKILL.md format. Choose the installation method based on the Agent you are using; usually, the Agent needs to be restarted or reloaded after installation to recognize the skills directory.

Method 1: SkillHub CLI (Domestic Store)

First, confirm if skillhub is installed (see https://skillhub.cn/install/skillhub.md for instructions):

command -v skillhub && skillhub --version

If not installed, follow the SkillHub installation documentation for a full install or CLI-only install. It is mandatory to use --dir pointing to the current Agent’s skills directory when installing the Skill; otherwise, defaulting to ./skills/ might not be recognized:

skillhub install tencent-adm/cloudbase-wechat-integration --dir <skills directory>

Common directories (from SkillHub installation docs):

  • Cursor: ~/.cursor/skills/
  • Codex: ~/.codex/skills/ or .agents/skills/ under the project
  • Claude Code: ~/.claude/skills/

You can also give the prompt below to an AI to let it install @tencent-adm/cloudbase-wechat-integration according to https://skillhub.cn/install/skillhub.md (the same instructions provided on the SkillHub page).

Method 2: npx skills from CloudBase Documentation

The Tencent Cloud Development documentation “Application Integration: WeChat Ecosystem Integration” provides the following installation commands.

Install all CloudBase Skills:

npx skills add tencentcloudbase/cloudbase-skills

Install only this Skill:

npx skills add https://github.com/tencentcloudbase/skills --skill cloudbase-wechat-integration

Sibling Skills in the Suite

The Skill references CloudBase skills located alongside it via relative paths (e.g., ../miniprogram-development/SKILL.md, ../cloud-functions/SKILL.md). If missing locally, install the complete CloudBase plugin or the corresponding Skill rather than replacing them by pulling remote SKILLs via HTTP.

Typical Usage

1. Trigger the Skill with Official Test Prompts

CloudBase documentation suggests using natural language to verify if the Agent answers according to the Integration Center path, for example:

  • “Integrate WeChat Pay in a CloudBase Mini Program and handle payment callbacks”
  • “Help me implement Official Account JSAPI payment using the CloudBase Integration Center”
  • “Integrate WeChat Native QR code payment in a web site and query order status”
  • “Obtain Official Account openid via CloudBase Integration Center and use it for payment”

2. Quick Workflow (Six Steps within the Skill)

  1. Determine Scenario: Mini Program pay, Virtual pay, JSAPI, Native, Official Account OAuth, extend generated functions, or troubleshoot.
  2. Load Corresponding references/*.md and the official docs linked therein.
  3. Confirm CloudBase Environment ID and real generated function names.
  4. Modify only necessary client/backend code, keeping credentials in the Integration Center.
  5. If business depends on payment results, add order inquiry, callback idempotency, and amount/order validation.
  6. Verify end-to-end using cloud function logs, callback logs, and sandbox or small real-amount payments.

3. Manual Consultation of Integration Center Docs

The Skill lists the following documents for manual reference (console details may change):

  • Integration Center Introduction: https://docs.cloudbase.net/integration/introduce.md
  • Integration Center Usage: https://docs.cloudbase.net/integration/usage.md

Applicable Scenarios and Notes

Who is it for

  • Teams already using or planning to use the CloudBase Integration Center for WeChat Pay.
  • Developers using Agents like Cursor, Codex, or Claude Code who want unified rules for writing payment/OAuth code and avoiding common errors like “hardcoding function names” or “committing keys to repo.”

Limitations and Caveats

  • WeChat Pay and Official Account capabilities depend on completing Integration Center configuration in the CloudBase console; the Skill cannot replace merchant platform contracting and credential management.
  • Generated function names and Environment IDs vary by project; always refer to the console or logs.
  • Rules for Virtual Payment, iOS IAP, etc., follow virtual-payment.md and official WeChat policies.
  • SkillHub statistics (ratings, downloads) change over time; refer to the live data on the SkillHub page.

Conclusion

@tencent-adm/cloudbase-wechat-integration consolidates CloudBase WeChat ecosystem integration into “Integration Center + Scenario-based references + Operational Red Lines,” making it suitable as a long-term execution contract for Agents. To install or view details, open SkillHub: https://www.skillhub.cn/skills/tencent-adm/cloudbase-wechat-integration, or the API coordinates page: https://api.skillhub.cn/tencent-adm/cloudbase-wechat-integration.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye