SuperAPI AI Directory

wechat-miniprogram

Coding & development

View repository

Updated 10-25 07:26

About this skill

Mini program development and verification

The mini program task reads this page. First identify the target platform, such as WeChat or Alipay; the tool workflow below is for WeChat. Other platforms should be adapted according to their official tools and cannot be applied directly. wx.* API。

Built-in WeChat DevTools workflow

When you need to create/import a WeChat project, compile, preview and upload, automate the simulator, capture logs and screenshots, or use Cloud Development, readWeChat tool entry, then read only the corresponding topic. This skill is organized based on the tool protocol of the WeChat DevTools Skill and does not require installing the original Skill separately; for the protocol version, seeEnvironment and versions. Both mini programs and mini games can be accessed, but the applicable scope of pages, canvas, and build tools must be verified according to the corresponding parameters.

This new set of interfaces requires the Electron version of DevTools; for the version threshold, installation channels, and version relationships, seeEnvironment and versions. A qualifying version number or an already installed GUI is only candidate evidence; whether the interfaces are available is determined by the status check. When this new set of interfaces is missing, only IDE operations that depend on it are paused; ordinary source code modifications, configuration edits, and existing miniprogram-ci workflows continue as usual.

Locate the source code and target configuration

  • Native WeChat project check project.config.json、miniprogramRoot、app.json, pages/components, and WXML/WXSS. For Taro, uni-app, etc., first read dependencies, build scripts, and framework configuration, modify the source code, and then compile to the WeChat target directory; do not directly patch artifacts that will be overwritten.
  • Confirm the AppID, base library, rendering mode, subpackages, launch page, and parameters; local private configuration may override shared configuration, so judge by the actually effective values. AppID is the application identifier and is not equal to AppSecret, the upload private key, or login state; do not copy another project's identity to eliminate errors.
  • Verify APIs, components, and privacy permissions according to the base library and framework versions. Check page/component lifecycles, asynchronous state updates and cleanup on unmount, event binding, back navigation, and repeated taps. Passing on the WeChat side does not automatically imply passing on H5 or other mini program platforms.

Debugging and integration

Prefer reusing the available WeChat DevTools and its CLI/MCP; first confirm installation, login status, tool capabilities, and project path. When the corresponding tools are unavailable, complete source code, type, and build checks, and do not fabricate simulator results.

When using the new wechatide interfaces, follow the built-in entry's status check and asynchronous task rules; old cli/cli.bat or miniprogram-ci do not impersonate the same command set. An already available old preview chain is still used according to its own capabilities.

For API integration, separately verify request parameters, identity sessions, valid domains/network conditions, backend environments, and return statuses. Success in DevTools after disabling domain verification does not prove availability on a phone; mark mock data and real backend results separately. Cover task-related logged-out, failure-retry, and empty-data states, and do not look only at page display.

Preview and delivery

miniprogram-ci can perform compile-related preview, upload, and npm build. Before use, check actual prerequisites such as the project, AppID, upload private key file, and backend IP configuration; for invocation parameters, check the local version and official documentation, and prefer the project settings and packaging ignore rules. Pass the private key to the local program only via a file path, and do not read it into the conversation.

Action completed Conclusion allowed
Framework build/static check The corresponding check passed; WeChat runtime has not been verified
DevTools started and operated The tested path passed in the simulator; note the base library and page
Preview QR code generated successfully Available for scanning and preview; does not mean the phone has run it or interaction has passed
Scan the code on the phone to enter the target page and operate it Record device/WeChat environment and actual verification path
Upload development version Upload succeeded; does not equal completion of trial version setup, review, or official release

When the user requests phone verification and the tools are available, continue to the target page and interactions; when the user needs to scan a code, provide the QR code file, entry parameters, and brief acceptance steps, and truthfully preserve the parts not executed. A single successful preview cannot replace real API and runtime verification.

Official entry points:Project configuration、CI documentation、WeChat official CI repository、Official sample project. When the documentation is inaccessible, consult the official repository and local tool help; do not treat content you have not read as verified.