BosskuAI WeChat Mini Programs
Use this skill to build and review Mini Programs (小程序) that run inside WeChat. They use a dual-thread model, a platform review process, and strict network and privacy rules.
How this differs from nearby skills
bosskuai-private-domain-operator: WeCom community and CRM operations. This skill is the Mini Program code and release path.
bosskuai-china-ecommerce-operator: marketplace stores and campaigns, not app code.
bosskuai-china-market-localization-strategist: go-to-market strategy for China.
bosskuai-saas-billing-ops: generic subscription billing; WeChat Pay specifics are here.
bosskuai-tdd-loop: test-first loop for the plain JavaScript logic you extract.
Workflow
- Configuration: define pages, tab bar, window, and permission declarations. Plan the main package and subpackages by user journey priority.
- Network: every API, socket, upload, and download domain must be registered in the Mini Program console, and requests must use HTTPS with a valid certificate. Keep dev, staging, and production environments separate.
- Request layer: wrap callback-based
wx APIs in promises; centralise auth headers, token refresh, and error handling. Handle error bodies that are empty, plain text, or gateway HTML without leaving a promise pending.
- Login: obtain the temporary code on the client, exchange it on your server, and keep session secrets on the server. Never ship app secrets or merchant keys in the package.
- Payments: create the order on the server, return the signed parameters, and invoke the payment API on the client. Confirm payment status from the server-side notification, not from the client success callback. Distinguish a user cancel from a failure. Check the current WeChat Pay docs for signing and refund requirements.
- Subscription messages: request authorisation at a moment that has user value (for example after an order), and handle accept, reject, and ban results.
- Performance: reduce
setData frequency and payload (send only changed fields), defer non-critical start-up work, lazy-load images, use virtual lists for long lists, and check package size against the current platform limits.
- Privacy and content: follow current WeChat privacy-API rules, ask authorisation before sensitive data, show a visible reason for permissions, and use content-security APIs for user-generated content where required. Consider China's Personal Information Protection Law and have counsel review.
- Test on real iOS and Android devices and different base library versions, then prepare review materials and the common rejection causes (permission without visible use, missing policy, content problems).
Guardrails
- Platform limits, API names, review policy, and base library behaviour change often. Check the current official WeChat documentation and developer tools before relying on any number or API here.
- Never expose merchant keys, signing keys, or user tokens in client code or logs.
- Do not submit for review, publish a version, issue refunds, or call live payment APIs without the owner's explicit approval; use the sandbox where available.
- Treat performance targets as measurements from your own devices.
Output format
Structure: [pages, subpackages, size per package]
Domains to register: [list]
Auth and payment flow: [client step, server step, verification]
setData and loading findings: [..]
Privacy and permission review: [..]
Device test matrix and result: [..]
Review risks: [..]
The shared quality bar: ../../references/checklists/engineering-quality-bar.md.
Adapted from agency-agents/engineering/engineering-wechat-mini-program-developer.md (agency-agents, MIT).
1---2name: bosskuai-wechat-mini-programs3description: "Use when building a WeChat Mini Program: project structure, request wrapper and login, server-side WeChat Pay flow, subscription messages, setData and package-size performance, domain whitelist, privacy, and review readiness."4metadata:5 source: https://skillmd.com/skills/wankimmy/bosskuai-wechat-mini-programs6---78# BosskuAI WeChat Mini Programs910Use this skill to build and review Mini Programs (小程序) that run inside WeChat. They use a dual-thread model, a platform review process, and strict network and privacy rules.1112## How this differs from nearby skills1314- **`bosskuai-private-domain-operator`**: WeCom community and CRM operations. This skill is the Mini Program code and release path.15- **`bosskuai-china-ecommerce-operator`**: marketplace stores and campaigns, not app code.16- **`bosskuai-china-market-localization-strategist`**: go-to-market strategy for China.17- **`bosskuai-saas-billing-ops`**: generic subscription billing; WeChat Pay specifics are here.18- **`bosskuai-tdd-loop`**: test-first loop for the plain JavaScript logic you extract.1920## Workflow21221. Configuration: define pages, tab bar, window, and permission declarations. Plan the main package and subpackages by user journey priority.232. Network: every API, socket, upload, and download domain must be registered in the Mini Program console, and requests must use HTTPS with a valid certificate. Keep dev, staging, and production environments separate.243. Request layer: wrap callback-based `wx` APIs in promises; centralise auth headers, token refresh, and error handling. Handle error bodies that are empty, plain text, or gateway HTML without leaving a promise pending.254. Login: obtain the temporary code on the client, exchange it on your server, and keep session secrets on the server. Never ship app secrets or merchant keys in the package.265. Payments: create the order on the server, return the signed parameters, and invoke the payment API on the client. Confirm payment status from the server-side notification, not from the client success callback. Distinguish a user cancel from a failure. Check the current WeChat Pay docs for signing and refund requirements.276. Subscription messages: request authorisation at a moment that has user value (for example after an order), and handle accept, reject, and ban results.287. Performance: reduce `setData` frequency and payload (send only changed fields), defer non-critical start-up work, lazy-load images, use virtual lists for long lists, and check package size against the current platform limits.298. Privacy and content: follow current WeChat privacy-API rules, ask authorisation before sensitive data, show a visible reason for permissions, and use content-security APIs for user-generated content where required. Consider China's Personal Information Protection Law and have counsel review.309. Test on real iOS and Android devices and different base library versions, then prepare review materials and the common rejection causes (permission without visible use, missing policy, content problems).3132## Guardrails3334- Platform limits, API names, review policy, and base library behaviour change often. Check the current official WeChat documentation and developer tools before relying on any number or API here.35- Never expose merchant keys, signing keys, or user tokens in client code or logs.36- Do not submit for review, publish a version, issue refunds, or call live payment APIs without the owner's explicit approval; use the sandbox where available.37- Treat performance targets as measurements from your own devices.3839## Output format4041```text42Structure: [pages, subpackages, size per package]43Domains to register: [list]44Auth and payment flow: [client step, server step, verification]45setData and loading findings: [..]46Privacy and permission review: [..]47Device test matrix and result: [..]48Review risks: [..]49```5051The shared quality bar: `../../references/checklists/engineering-quality-bar.md`.5253Adapted from agency-agents/engineering/engineering-wechat-mini-program-developer.md (agency-agents, MIT).