with one click
compiler
负责编译:项目编译、单文件编译、编译到指定页面、构建 npm、刷新模拟器。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
负责编译:项目编译、单文件编译、编译到指定页面、构建 npm、刷新模拟器。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
| name | compiler |
| description | 负责编译:项目编译、单文件编译、编译到指定页面、构建 npm、刷新模拟器。 |
处理与编译、单文件构建校验、模拟器刷新相关的操作。先判断用户要的是“局部文件编译结果”,还是“让项目窗口里的模拟器重新运行”。
典型任务:
open_project_window 打开项目窗口。simulator_open_page。simulator_refresh。触发项目窗口模拟器编译并打开指定页面,不修改持久编译条件列表。适合“去某个页面看效果”,不承诺返回完整编译错误。
wechatide -c <clientName> -t simulator_open_page --project <project> --page pages/index/index [--query id=1]
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
project | string | 是 | 项目本地绝对路径 |
page | string | 是 | 目标页面路径(如 "pages/index/index") |
query | string | 否 | 页面参数(如 "id=1&type=test") |
scene | number | 否 | 场景值 |
获取单个 JS/TS 文件编译结果摘要。
wechatide -c <clientName> -t compile_js --project <project> --file-path pages/index/index.js
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
project | string | 是 | 项目本地绝对路径 |
filePath | string | 是 | 相对 miniprogramRoot 或 pluginRoot 的文件路径 |
编译 WXML 模板文件,返回编译结果。isPlugin / isLazyLoad 由工具根据项目配置自动推断。
wechatide -c <clientName> -t compile_wxml --project <project> --file-path pages/index/index.wxml
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
project | string | 是 | 项目本地绝对路径 |
filePath | string | 是 | 相对 miniprogramRoot 或 pluginRoot 的 .wxml 路径 |
编译 WXSS 样式文件,返回编译结果。isPlugin / isLazyLoad 由工具根据项目配置自动推断。
wechatide -c <clientName> -t compile_wxss --project <project> --file-path pages/index/index.wxss
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
project | string | 是 | 项目本地绝对路径 |
filePath | string | 是 | 相对 miniprogramRoot 或 pluginRoot 的 .wxss 路径 |
构建项目 npm 依赖产物,会修改本地构建结果。
wechatide -c <clientName> -t buildnpm --project <project> [--compile-type miniprogram]
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
project | string | 是 | 项目本地绝对路径 |
compile-type | string | 否 | 编译类型:miniprogram(默认)或 plugin |
触发项目窗口模拟器重新编译/刷新当前页面。适合恢复或刷新运行态。返回 success: true 只表示刷新动作已触发,不代表编译通过;需要验证局部文件结果时,还要按场景单独调用单文件编译工具。
wechatide -c <clientName> -t simulator_refresh --project <project>
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
project | string | 是 | 项目本地绝对路径 |
| 用户意图 | 选择 |
|---|---|
| "直接编到这个页面让我看效果" | simulator_open_page |
| "只想看这个 TS/JS 文件编译产物" | compile_js |
| "模板是不是编挂了" | compile_wxml |
| "样式编译是不是有问题" | compile_wxss |
| "依赖没好,帮我构建 npm" | buildnpm |
| "页面没刷新,重新跑一下" | simulator_refresh |
simulator_open_pagesimulator_refresh;返回成功不代表编译通过compile_js、compile_wxml、compile_wxssbuildnpmsimulator_open_page 和 simulator_refresh 是本地模拟器操作,返回成功只表示触发成功;要确认编译结果必须再用合适的编译校验工具buildnpm 会修改本地构建产物,不要在被动排查中默认执行微信开发者工具 任务执行的根入口。用于在执行前先完成环境检查,再路由到预览、自动化、调试与云相关操作。
负责页面操作:点击、输入、滚动、截图、验证。
负责云操作:云环境、云函数、云数据库、云存储。
负责排查:查日志、查运行时、定位问题原因,也包括模拟器相关的状态检查与刷新。
初始化 微信开发者工具 开发环境与基础信息。用于项目窗口打开或接管、登录信息获取、AppID 信息获取以及运行时上下文读取。
负责预览和发布:推送手机预览、生成预览码、真机预览、上传代码包。