Install
openclaw skills install @haohao642/wb-skill-wechat-miniprogram-helper-skillThis skill should be used when a user wants to build, develop, debug, or publish a WeChat Mini Program (微信小程序), from scaffolding a project to submitting it for review and release. It covers the dual-thread architecture, the four-file page structure (wxml/wxss/js/json), rpx units, setData, Canvas 2D, common errors (invalid app.json disableScroll, "ctx is not defined", jank/卡顿), AppID vs test accounts, experience-member permissions, and the upload/review/release workflow. Trigger phrases include "微信小程序", "做个小程序", "小程序上线", "小程序报错", "小程序发布", "小程序体验权限".
openclaw skills install @haohao642/wb-skill-wechat-miniprogram-helper-skillGuide the user through the full lifecycle of a WeChat Mini Program: understanding the architecture → scaffolding a runnable project → developing pages (including Canvas 2D) → debugging common errors → setting up AppID / accounts → submitting for review → releasing. Apply the bundled procedural knowledge and reusable assets so the user ends up with a real, runnable project rather than just an explanation.
ReferenceError: ctx is not defined, 卡顿/掉帧).Determine: target device (phone only / also need 管理后台?), must-have pages, whether a backend is needed (wx.request to own server), and whether payment/login is required. If the user just wants to start, skip straight to scaffolding.
Run the bundled scaffolder to generate a complete, importable project:
python <skill>/scripts/scaffold_miniprogram.py <target_dir> [--appid APPID] [--name NAME]
This creates app.js / app.json / app.wxss / project.config.json / sitemap.json and pages/index/* (the four-file set). The user imports the folder into 微信开发者工具 (WeChat DevTools) and can preview immediately. Then customize pages per the request.
Consult references/architecture-and-basics.md for:
rpx units, data binding {{ }}, bindtap events.setData mechanics and its size/performance limits.type="2d" + SelectorQuery + requestAnimationFrame + dpr).wx.request and the domain whitelist gotcha.Consult references/common-pitfalls.md for the exact fixes to:
ctx is not defined inside Canvas drawing (capture const ctx = canvas.getContext('2d')).shadowBlur, cap dpr at 2, cache measured text widths, limit particle count).Consult references/publishing.md for:
touristappid) vs official AppID trade-offs.appid field or DevTools 详情).scripts/scaffold_miniprogram.py — generate a runnable boilerplate project.references/architecture-and-basics.md — architecture, four-file structure, rpx, setData, lifecycle, Canvas 2D, network.references/common-pitfalls.md — error catalog with exact fixes.references/publishing.md — AppID, accounts, experience members, review/release flow.common-pitfalls.md.