Reusable Codex skill for repeatable WeChat Mini Program workflows in WeChat DevTools.
git clone https://github.com/Housetan218/wechat-devtools-automation-skill.git
cd wechat-devtools-automation-skill
./install.shThen use the installed skill in Codex when working on a WeChat Mini Program project.
python3 wechat-devtools-automation/scripts/bootstrap_wechat_devtools_automation.py \
--project-dir /path/to/existing-miniapp \
--env-id your-env-id \
--functions login,autoTest,auditGameRecords
python3 wechat-devtools-automation/scripts/validate_bootstrap.py \
--project-dir /path/to/existing-miniappTypical result:
[bootstrap] written: utils/devAutomationConfig.js
[bootstrap] written: scripts/wechat-cli.sh
[bootstrap] written: scripts/wechat-regression.sh
[validate] bootstrap output looks consistent
- one installable skill folder:
wechat-devtools-automation/ - a bootstrap script that adds a project-local automation skeleton
- a validation script that checks the generated skeleton
- reference documents for the expected project contract
- minimal GitHub collaboration templates for safe public maintenance
Use this when you want a repeatable terminal-driven flow for:
- opening a Mini Program project in WeChat DevTools
- checking DevTools login status
- deploying cloud functions repeatedly
- selecting a compile mode automatically
- compiling, refreshing, and capturing screenshots on macOS
- creating a minimal automation scaffold in an existing Mini Program project
install.sh
wechat-devtools-automation/
SKILL.md
references/
bootstrap-template.md
project-contract.md
scripts/
bootstrap_wechat_devtools_automation.py
validate_bootstrap.py
./install.shOr install into a custom Codex home:
CODEX_HOME=/path/to/codex-home ./install.sh- macOS
- WeChat DevTools desktop app installed
- DevTools HTTP service port enabled
- a real Mini Program project directory as bootstrap target
The bootstrap script is not a full project generator. --project-dir must already contain a valid WeChat Mini Program project, including project.config.json.
Run from the repository root:
python3 wechat-devtools-automation/scripts/bootstrap_wechat_devtools_automation.py \
--project-dir /path/to/existing-miniapp \
--env-id your-env-id \
--functions login,autoTest,auditGameRecordsTypical output adds:
utils/devAutomationConfig.jsutils/devLaunchConfig.jsutils/generatedDevLaunchConfig.jsscripts/wechat-cli.shscripts/wechat-gui-compile.shscripts/wechat-gui-refresh.shscripts/wechat-gui-capture.shscripts/wechat-set-compile-mode.jsscripts/wechat-regression.sh
python3 wechat-devtools-automation/scripts/validate_bootstrap.py \
--project-dir /path/to/existing-miniappValidation checks the generated files, compile mode wiring, placeholder resolution, and JavaScript syntax of the generated helpers.
- macOS-oriented workflow and helper scripts
- requires a real existing Mini Program project, not an empty directory
- does not generate your business pages or cloud functions
- still depends on WeChat DevTools behavior and local GUI permissions
- diagnostics or admin routes in target projects still need cloud-side auth checks
- Mini Program business pages
- project-specific cloud functions
- production diagnostics endpoints
- any real env id, app id, openid, or project path
You still need to add your own guarded diagnostics page and cloud-side auth checks in each target project.
After cloning this repository on another machine:
./install.shThen reference the skill by name in Codex when working on a WeChat Mini Program project.
This repository includes:
- issue templates for bugs and feature requests
- a pull request template with required verification steps
CONTRIBUTING.mdfor contribution rulesSECURITY.mdfor private vulnerability reporting guidance
codex-skillwechat-mini-programwechat-devtoolsautomationminiapp
Validated on macOS with WeChat DevTools installed. The included scripts were verified by:
python3 .../bootstrap_wechat_devtools_automation.py --helppython3 .../validate_bootstrap.py --help- bootstrap into a temporary project directory
- validation against that generated output