AI Agent Hub
Back to skills
Tencent CloudBase WeChat Mini Program Development icon

Tencent CloudBase WeChat Mini Program Development

Development Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please refer to https://skillhub.cn/install/skillhub.md to install @tencent-adm/miniprogram-development.

About this skill

Specific Challenges in WeChat Mini Program Development

WeChat Mini Program development involves project structure configuration, debugging workflows, publishing management, and cloud service integration. Developers often face issues like directory chaos causing compile failures, inefficient debugging, or misapplying Web SDK assumptions to mini program environments. For instance, missing .json configuration files can lead to runtime errors, or improper message-push callback binding in CloudBase integration disrupts functionality.

Core Capabilities and Key Steps

This skill offers a systematic approach covering the mini program development lifecycle:

  • Project Structure Management: Ensures code follows the miniprogramRoot path in project.config.json, with page files including required .json configurations like index.json. It recommends a text-only custom tabBar default (tabBar.custom = true), defining only pagePath and text to avoid icon asset handling complexity, unless icons are explicitly required.

  • Debugging and Publishing Optimization: Prioritizes using Nightly WeChat Developer Tools (with built-in Skills/MCP) and wechatide CLI for project opening, compilation, preview, and upload. Key parameters include -c context, absolute --project path, valid appid, and cloud environment. If Nightly is unavailable, fallback to miniprogram-ci for preview/upload or CloudBase MCP for cloud resources; always adheres to change safety protocols and deployment gate checks.

  • CloudBase Integration Handling: When projects explicitly use wx.cloud, Tencent CloudBase, or CloudBase, correctly applies its APIs and constraints. For example, message push requires deploying receiver functions via cloud_fn_deploy --remote-npm-install and binding MsgType/Event to cloud functions in the IDE; customer-service auto-reply must call cloud.openapi.customerServiceMessage.send with openapi permissions in config.json, as function return values alone do not trigger replies.

  • Scenario Routing: Automatically routes based on task type—reads devtools-debug-preview.md for debugging tasks, references sub-skills like auth-wechat-miniprogram for CloudBase integration, and consults message-push references for push operations, avoiding blanket application errors.

Applicable Boundaries and Key Considerations

This skill focuses on WeChat Mini Program development, especially with CloudBase integration. Not applicable for Web frontend development (use web-development skill), pure backend service development (use cloudrun-development or cloud-functions), and UI design tasks without mini program context (use ui-design).

Common pitfalls to avoid: generating Web-style login flows for mini programs, mixing Web SDK assumptions into wx.cloud projects, applying CloudBase constraints before confirming its use. Also, bypassing wechatide CLI for low-level message-push transport, assuming Stable WeChat Developer Tools include Nightly Skills, or performing code changes/publishing without following protocols. Always verify operation paths through reference documents to ensure compatibility and stability.

Use Cases

  • When starting a new WeChat Mini Program project, need to create page directory structures, configure files like index.json, and set up custom tabBar to avoid icon handling complexity.
  • When the project uses CloudBase cloud development services, need to bind wx.cloud APIs for cloud functions, databases, and configure callbacks for message push or customer-service auto-reply events.
  • Using Nightly WeChat Developer Tools and wechatide CLI for daily debugging, preview, and upload operations, requiring correct project paths, appid, and cloud environment parameters.
  • Before publishing the mini program, need to follow deployment gate protocols to check configuration completeness, ensuring miniprogramRoot paths are correct and local resource files exist to prevent compile failures.

Best For

  • Front-end engineers responsible for WeChat Mini Program page development, needing to debug components quickly and follow project conventions for maintainability.
  • Back-end developers using CloudBase integration for cloud services, needing to handle specific tasks like cloud function deployment, database connections, and message push binding.
  • Technical leads coordinating mini program development and publishing workflows, needing to select appropriate toolchains like Nightly Developer Tools and avoid common deployment errors.