Introduction¶
When using AI to write WeChat Mini Programs, the common issue is not whether it can “generate pages,” but rather incorrect context: cramming Web login flows into Mini Programs, suggesting previews without checking project.config.json, trying to use Nightly wechatide commands with the default Stable version developer tools, or forcing wx.cloud constraints on projects that haven’t integrated cloud development. Official documentation is scattered across WeChat Open Docs, Developer Tools, and CloudBase docs, making it difficult for an Agent to align these boundaries in a single conversation.
Below is an introduction to WeChat Mini Program Development (@tencent-adm/miniprogram-development) on SkillHub. It organizes project structure, debugging/preview/publishing, message pushing, and optional cloud development integration into a SKILL.md and references that Agents can follow. It is suitable for enabling in environments that support Skills, such as Cursor, Claude Code, and Codex.
What is this¶
WeChat Mini Program Development is an enterprise-sourced Skill (enterprise) released by the Tencent Cloud CloudBase team. The current version is 2.36.0, with the coordinates @tencent-adm/miniprogram-development, categorized under dev-programming. The page indicates requires_api_key=false, meaning no additional API Key is required to install this Skill itself.
In one sentence: It is a WeChat Mini Program development guide oriented towards AI coding scenarios, covering project scaffolding, tabBar, routing, debugging, previewing, publishing, and wx.cloud integration. It also explains when to switch to sibling Skills in the same series, such as Web Development, Cloud Functions, or UI Design, to avoid scope mixing.
- SkillHub Display Page: https://www.skillhub.cn/skills/tencent-adm/miniprogram-development
- Introduction Entry: https://api.skillhub.cn/zcwl/miniprogram-development
Core Features¶
The following content is derived from the Skill’s SKILL.md and SkillHub description, summarized by scenario.
Project Structure and Configuration¶
- Follows configurations in
project.config.jsonsuch as the Mini Program root directory,appid, andminiprogramRoot. - Pages must have a complete set of files (including page
.jsonconfigurations); verify file existence before referencing local resources. tabBar: When icons are not explicitly requested, the default recommendation is a text-only customtabBar(tabBar.custom = true, with onlypagePathandtext) to reduce issues with icon resources and whitespace. ConfigureiconPath/selectedIconPathand place resource files only when icons are needed.
Build, Debug, Preview, and Publish¶
- The default workflow points to WeChat Developer Tools Nightly and the
wechatideCLI (with built-in Skills/MCP), used for opening projects, compiling, simulator, console/network debugging, previewing, uploading, etc. - Nightly download instructions are available via the link in the SKILL:
https://developers.weixin.qq.com/miniprogram/dev/devtools/nightly_backup.html. - If
wechatideis not present in the environment, the Skill requires explaining that this is an environment gap, notifying the user that Nightly is required, and waiting for the user to decide whether to install it. If the user refuses or cannot install it, fall back tominiprogram-cifor preview/upload and CloudBase MCP paths, clearly stating the missing capabilities (e.g., simulator, console). - Before involving upload/publish, combine with the Change Safety Protocol and Deployment Gate protocols in the same plugin (paths are provided in the Sibling skills section of the SKILL).
Cloud Development (On-demand)¶
- Apply cloud development constraints and references only when the user or codebase explicitly uses CloudBase,
wx.cloud, or Tencent Cloud Development. - Covers diagnostic guidelines for account and entity prerequisites (individual/enterprise entities, test accounts, greyed-out cloud development entries, invisible environments, etc.), as well as routing instructions to sibling Skills for scenarios like Authentication, Document Database, and WeChat Pay/Virtual Payment.
Message Push and Customer Service¶
- Message pushing (Message Push), customer service auto-replies, etc., follow the currently supported paths via Developer Tools IDE + wxide CLI. Customer service replies must use
cloud.openapi.customerServiceMessage.sendand the openapi permissions inconfig.json; relying solely on cloud function return values for auto-replies is not allowed.
Search and Promotion¶
- Scenarios such as Mini Program search optimization, page indexing, and search promotion have independent references (including explanations for
mpcrawler, titles, and thumbnails).
Explicitly Not Covered Scopes¶
- Pure Web Frontend → Use
web-development. - Pure Backend Services → Use
cloudrun-development/cloud-functions. - UI Design Only (no Mini Program development context) → Use
ui-design.
Installation and Activation¶
The Skill is based on the universal SKILL.md format. When installing on SkillHub, files must be installed to the current Agent’s skills directory; otherwise, they may default to ./skills/ and might not be recognized.
1. Install SkillHub CLI (if not already installed)¶
First, check if skillhub exists:
command -v skillhub && skillhub --version
If not installed, execute the official full installation (CLI + Default Skill):
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
CLI only:
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash -s -- --cli-only
Instructions and paths are subject to https://skillhub.cn/install/skillhub.md; if the COS domain in the documentation differs slightly from the above, the current content of that page prevails.
2. Install this Skill¶
skillhub install @tencent-adm/miniprogram-development --dir <skills directory>
Common skills directories for Agents (from skillhub.md):
| Environment | Directory |
|---|---|
| Cursor | ~/.cursor/skills/ |
| Claude Code | ~/.claude/skills/ |
| Codex | ~/.codex/skills/ or .agents/skills/ under project |
| Windsurf | ~/.codeium/windsurf/skills/ or .windsurf/skills/ |
You can also send the following prompt to the AI to let it complete the installation according to skillhub.md:
Please install `@tencent-adm/miniprogram-development` based on https://skillhub.cn/install/skillhub.md.
After installation, restart or refresh the Skills cache according to your client’s requirements (subject to the respective client documentation).
Typical Usage¶
After enabling the Skill, the Agent will determine whether to enter this Skill based on the Activation Contract in SKILL.md and jump to the corresponding reference based on the task type. Below are two types of examples that can be directly reproduced against the official SKILL.
Simple tabBar Default Configuration¶
When tab icons are not required, app.json can adopt a text-only custom tabBar:
{
"tabBar": {
"custom": true,
"list": [
{ "pagePath": "pages/index/index", "text": "Home" },
{ "pagePath": "pages/travel/travel", "text": "Travel" },
{ "pagePath": "pages/my/my", "text": "Me" }
]
}
}
Then, in the custom tabBar component, only perform text layout to avoid blank space caused by reserved icon slots.
Minimal Project Skeleton¶
app.js:
App({
onLaunch() {
console.log("Mini Program launched");
},
});
pages/index/index.js:
Page({
data: {
message: "Hello CloudBase Mini Program",
},
});
pages/index/index.wxml:
<view class="page">
<text>{{message}}</text>
</view>
pages/index/index.json:
{
"navigationBarTitleText": "Home"
}
project.config.json (replace with real appid before preview/upload):
{
"appid": "your-mini-program-appid",
"projectname": "cloudbase-mini-program",
"miniprogramRoot": "./",
"compileType": "miniprogram"
}
In actual development, if Nightly, wechatide parameters, message push binding, or cloud development initialization are involved, let the Agent read the references/ documents listed in the SKILL before modifying code, rather than generating the entire repository at once.
Suitable Scenarios and Notes¶
Who is it for
- Developers using AI to assist in creating, modifying, debugging, previewing, or publishing WeChat Mini Programs.
- Teams whose projects may integrate Tencent Cloud Development and need the Agent to distinguish between “general Mini Programs” and
wx.cloudpaths. - Those who need unified tabBar, project configuration, and DevTools/Nightly workflow instructions to reduce cases where the Agent misuses Web modes or incorrect preview methods.
Limitations and Notes
- The Skill depends on CloudBase sibling Skills in the same directory (e.g.,
cloudbase-platform,auth-wechat-miniprogram). If only this package is installed locally and sibling Skills are missing, the SKILL requires informing the user that the full CloudBase plugin or missing items need to be installed. Do not fetch remote skill documents via HTTP to pad context. - CLI automation defaults to Nightly; Stable version tools may not contain Nightly Skills/
wechatide. Do not silently downgrade to “manual import” without informing the user. - Cloud development, WeChat Pay, and entity types (Individual/Enterprise) have hard business constraints. The Skill emphasizes confirming the sales type before recommending the entity to avoid the cost of late entity changes.
- The rating displayed on the SkillHub page is 100000, downloads 46019, installations 7 (statistics change with SkillHub updates, subject to the page).
Conclusion¶
The WeChat Mini Program Development Skill converges Mini Program engineering conventions, DevTools/Nightly debugging and publishing paths, optional cloud development, and message pushing knowledge into a structure readable by Agents, reducing AI’s common sense errors in Mini Program scenarios. If you are using Cursor or similar tools to write Mini Programs, you can first install @tencent-adm/miniprogram-development as described above, and then clarify in the conversation whether cloud development is used and whether preview/upload is needed, so that the Agent hits the correct reference.
Official Introduction and Installation Entry: https://api.skillhub.cn/zcwl/miniprogram-development
SkillHub Details Page: https://www.skillhub.cn/skills/tencent-adm/miniprogram-development