К основному содержанию
скилл CX Codex

cloudbase-wechat-integration — скилл для Claude Code

Скилл cloudbase-wechat-integration для Claude Code настраивает оплату через WeChat Pay, виртуальные платежи и OAuth для CloudBase. Включается при работе с колбэками, генерацией облачных функций и маршрутизацией openid.

MIT 125 установок ★ 82 обновлён 2026-11-15

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add TencentCloudBase/skills --skill cloudbase-wechat-integration -a claude-code
Открыть на GitHub

Что делает cloudbase-wechat-integration

Скилл координирует интеграцию платежей WeChat через CloudBase Integration Center. Он охватывает платежи в мини-программах (wx.requestPayment), виртуальную оплату цифровых товаров (wx.requestVirtualPayment), оплату JSAPI внутри WeChat Official Account, сборку Native QR-кодов и авторизацию через OAuth.

Интеграция требует работы через консоль CloudBase. Скилл прямо запрещает сохранять APIv3-ключи, сертификаты и пароли приложений в коде или передавать их в чат агента. Фронтенд-уведомление об успешной транзакции служит только визуальным сигналом для интерфейса. Авторитетный статус заказа всегда подтверждается запросом к API или входящим серверным колбэком.

В автономной установке относительные пути к соседним инструкциям не открываются. Скилл запрещает загружать сторонние файлы Markdown через HTTP прямо в контекст модели.

Какие задачи решает

  • настроить оплату WeChat Pay и вызовы wx.requestPayment в мини-программе
  • внедрить виртуальные платежи через wx.requestVirtualPayment и разобрать колбэки xpay_*
  • подключить сценарий JSAPI-оплаты и авторизацию OAuth для аккаунтов WeChat Official Account
  • дополнить сгенерированные функции pay-common идемпотентностью и сохранением заказов

Примеры запросов агенту

  • Настрой прием платежей WeChat Pay в мини-программе через CloudBase Integration Center
  • Добавь обработку виртуальных платежей через wx.requestVirtualPayment и настрой колбэк xpay
  • Подключи авторизацию Official Account OAuth и серверную проверку статуса транзакции

Как установить cloudbase-wechat-integration

1Через Skills CLI (Vercel)

npx skills add TencentCloudBase/skills --skill cloudbase-wechat-integration -a claude-code

2Вручную: положить файлы

~/.claude/skills/cloudbase-wechat-integration/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/cloudbase-wechat-integration/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о cloudbase-wechat-integration

Как установить cloudbase-wechat-integration в Claude Code?

Выполните команду npx skills add TencentCloudBase/skills --skill cloudbase-wechat-integration -a claude-code. Файл инструкций разместится по пути ~/.claude/skills/cloudbase-wechat-integration/SKILL.md.

Зачем нужен cloudbase-wechat-integration?

Он направляет агента по правилам CloudBase Integration Center при создании платежных сценариев WeChat. Скилл помогает правильно верифицировать колбэки и избегать небезопасного хранения ключей в репозитории.

Что нужно для работы cloudbase-wechat-integration?

Требуется настроенный экземпляр CloudBase Integration Center. Учетные данные мерчанта и параметры доступа задаются вручную в консоли CloudBase, без передачи секретных ключей в чат.

Исходный текст

SKILL.md · MIT
---
name: cloudbase-wechat-integration
description: 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.
version: 2.37.6
license: MIT
alwaysApply: false
---

# 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)

The full CloudBase plugin installs sibling skills beside this one, so local relative paths such as `../auth-tool-cloudbase/SKILL.md` resolve there. A standalone install from a skill marketplace packages only this skill; those paths do not exist, and any "Then also read" link starting with `../` cannot be opened.

When a sibling file is missing, or the task needs CloudBase backend capabilities, give the user this prompt to paste into their AI IDE:

```text
帮我把 CloudBase 接好,按下面做:
1. 打开 https://docs.cloudbase.net/skill.md,按说明完成接入。
2. 接入完成后告诉我,并建议最相关的下一步。
```

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

In a standalone install, use the setup prompt above instead of these `../` paths.

- 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.
8. For 虚拟支付 inbound callbacks, do not reuse outbound `pay_sig` as the notify authenticator. Cloud function and Integration Center deliveries are already verified. A self-hosted HTTP receiver follows mini program message-push verification in `references/virtual-payment.md`. Match the ack to the configured XML or JSON push format. `refund_order` success only means the refund task was accepted. A refund notify counts as success only when its `RetCode` is `0` and the refund id matches; do not invent unpublished idempotency or query-parameter mappings.

## Routing

| Task | Read | Why |
| --- | --- | --- |
| Capability selection, console-first boundaries, independent distribution | `references/overview.md` | Establishes the Integration Center model and safety rules |
| Mini Program WeChat Pay, `wx.cloud.callHTTPFunction`, `wx.requestPayment` | `references/mini-program-pay.md` | Covers Mini Program openid injection, order creation, and callback expectations |
| Mini Program 虚拟支付, virtual goods, `wx.requestVirtualPayment`, `xpay_*` callbacks | `references/virtual-payment.md` | Covers OfferID/AppKey signing, sandbox vs 现网, delivery callbacks, `query_order` status, refund acceptance vs completion, and self-hosted message-push verification versus gateway-verified callbacks |
| Official Account JSAPI pay, H5 inside WeChat, `WeixinJSBridge.invoke` | `references/official-account-jsapi-pay.md` | Covers official-account openid and JSAPI invocation |
| Native QR-code pay for PC/Web checkout | `references/native-qr-pay.md` | Covers `code_url`, QR rendering, and polling/query flow |
| Official Account OAuth, openid/userinfo retrieval | `references/official-account-oauth.md` | Covers OAuth routes generated by the official-account integration |
| 404, missing credentials, openid mismatch, callback failures, logs | `references/troubleshooting.md` | Provides 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):

- [mini-program-pay.md](references/mini-program-pay.md)
- [native-qr-pay.md](references/native-qr-pay.md)
- [official-account-jsapi-pay.md](references/official-account-jsapi-pay.md)
- [official-account-oauth.md](references/official-account-oauth.md)
- [overview.md](references/overview.md)
- [troubleshooting.md](references/troubleshooting.md)

© TencentCloudBase · MIT · TencentCloudBase/skills

Похожие скиллы

Все скиллы по теме «Бэкенд и API» →
cloudbase TencentCloudBase Скилл ведёт разработку проектов на Tencent CloudBase: от авторизации и серверлесс-функций до вызова моделей DeepSeek и Hunyuan в мини-приложениях WeChat. CX Codex +1 13 500установок wechat-miniprogram-skill Gourdbaby Скилл wechat-miniprogram-skill для Claude Code и пяти других IDE-агентов, который переводит агента в режим эксперта по нативным WeChat Mini Program на JavaScript. Запускается при любой задаче с wx.* API, WXML, WXSS или логикой setData. CX Codex +1 1 500установок wechat-miniprogram joneqian Скилл wechat-miniprogram по разработке мини-программ WeChat: WXML-шаблоны, WXSS-стили, WXS-скрипты, компоненты и вызовы WeChat API. Собран из официальной документации. CX Codex +1 603установок wechat-official-account acedatacloud Управляет статьями, черновиками и сервисными сообщениями в WeChat Official Account через серверный API платформы с помощью curl и jq. CX Codex +1 255установок wechat-devtools-mcp WaterTian Управляет WeChat DevTools через 7 MCP-инструментов: компилирует мини-приложения, снимает длинные скриншоты, читает логи CDP и автоматизирует тестирование. CX Codex +1 ★ 171звёзд репо baoyu-post-to-wechat JimLiu Скилл baoyu-post-to-wechat публикует статьи и графические посты в WeChat Official Account через API платформы или браузерный профиль Chrome. CX Codex +1 35 100установок

Из того же набора25

Весь набор →
relational-database-mcp-cloudbase Скилл relational-database-mcp-cloudbase управляет существующей MySQL-базой CloudBase через инструменты MCP: запросы, схема, права доступа, удаление. Для новых проектов рекомендован PostgreSQL. CX Codex +1 962установок auth-web-cloudbase Скилл auth-web-cloudbase настраивает вход, регистрацию и сессии в веб-приложениях на базе @cloudbase/js-sdk. Предотвращает частые ошибки авторизации и защищает роуты. CX Codex +1 959установок cloudbase-document-database-web-sdk Скилл cloudbase-document-database-web-sdk помогает писать браузерный код для CloudBase Document Database через @cloudbase/js-sdk: CRUD, запросы, пагинация и realtime. CX Codex +1 939установок ai-model-web Скилл ai-model-web для Claude Code вызывает AI-модели прямо из браузера в React, Vue, Next, Nuxt и других фронтенд-приложениях через @cloudbase/js-sdk. CX Codex +1 920установок relational-database-web-cloudbase Скилл relational-database-web-cloudbase для Claude Code настраивает доступ браузерного приложения к существующей базе CloudBase MySQL. Он подключается к запросам через @cloudbase/js-sdk. CX Codex +1 903установок cloudbase-agent Помогает создавать и развёртывать серверы агентов на CloudBase Agent SDK для TypeScript и Python с поддержкой протокола AG-UI. CX Codex +1 268установок cloudbase-cli Скилл cloudbase-cli для командной строки Tencent CloudBase. Развёртывает функции, хранилище, базы данных и статический хостинг через tcb CLI — подходит для CI/CD, batch-операций и первой сессии, когда MCP-инструменты ещё не загружены. CX Codex +1 245установок ops-inspector Скилл ops-inspector для проверки здоровья CloudBase-окружения: анализирует логи, интерпретирует алармы (нормальна ли CPU, какой пик QPS), подбирает сценарии для ошибок 429, timeout, 404, ACCESS_TOKEN_INVALID и нулевых вызовов. CX Codex +1 175установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой