Tencent CloudBase WeChat Mini Program Development
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
miniprogramRootpath inproject.config.json, with page files including required.jsonconfigurations likeindex.json. It recommends a text-only customtabBardefault (tabBar.custom = true), defining onlypagePathandtextto 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
wechatideCLI for project opening, compilation, preview, and upload. Key parameters include-ccontext, absolute--projectpath, validappid, and cloud environment. If Nightly is unavailable, fallback tominiprogram-cifor 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 viacloud_fn_deploy --remote-npm-installand bindingMsgType/Eventto cloud functions in the IDE; customer-service auto-reply must callcloud.openapi.customerServiceMessage.sendwith openapi permissions inconfig.json, as function return values alone do not trigger replies. -
Scenario Routing: Automatically routes based on task type—reads
devtools-debug-preview.mdfor debugging tasks, references sub-skills likeauth-wechat-miniprogramfor 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.
Related Skills
Supports inline SVG/HTML rendering and Mermaid code output, covering common technical diagram creation like architecture and flow diagrams.
A P8-level programming expert skill that follows a six-step closed-loop workflow, covering the full development lifecycle including code generation, review, and debugging for complex software projects.
Intelligently transforms natural language requests into editable professional online diagrams, supporting various types like flowcharts, architecture diagrams, etc.
A Chinese localization plugin for GitHub Desktop that automatically detects the installation directory and performs text string replacements to localize the interface, supporting loose and asar modes with backup and rollback features.