Skip to content

Repository files navigation

WeChat DevTools Automation Skill

Reusable Codex skill for repeatable WeChat Mini Program workflows in WeChat DevTools.

Quick Start

git clone https://github.com/Housetan218/wechat-devtools-automation-skill.git
cd wechat-devtools-automation-skill
./install.sh

Then use the installed skill in Codex when working on a WeChat Mini Program project.

Typical Workflow

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-miniapp

Typical result:

[bootstrap] written: utils/devAutomationConfig.js
[bootstrap] written: scripts/wechat-cli.sh
[bootstrap] written: scripts/wechat-regression.sh
[validate] bootstrap output looks consistent

What This Repo Ships

  • 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

Good Fit

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

Repository Layout

install.sh
wechat-devtools-automation/
  SKILL.md
  references/
    bootstrap-template.md
    project-contract.md
  scripts/
    bootstrap_wechat_devtools_automation.py
    validate_bootstrap.py

Install Into Codex

./install.sh

Or install into a custom Codex home:

CODEX_HOME=/path/to/codex-home ./install.sh

Requirements

  • 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.

Bootstrap Example

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,auditGameRecords

Typical output adds:

  • utils/devAutomationConfig.js
  • utils/devLaunchConfig.js
  • utils/generatedDevLaunchConfig.js
  • scripts/wechat-cli.sh
  • scripts/wechat-gui-compile.sh
  • scripts/wechat-gui-refresh.sh
  • scripts/wechat-gui-capture.sh
  • scripts/wechat-set-compile-mode.js
  • scripts/wechat-regression.sh

Validate Example

python3 wechat-devtools-automation/scripts/validate_bootstrap.py \
  --project-dir /path/to/existing-miniapp

Validation checks the generated files, compile mode wiring, placeholder resolution, and JavaScript syntax of the generated helpers.

Limitations

  • 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

What It Intentionally Does Not Include

  • 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.

Publishing As A Codex Skill

After cloning this repository on another machine:

./install.sh

Then reference the skill by name in Codex when working on a WeChat Mini Program project.

Collaboration Files

This repository includes:

  • issue templates for bugs and feature requests
  • a pull request template with required verification steps
  • CONTRIBUTING.md for contribution rules
  • SECURITY.md for private vulnerability reporting guidance

Suggested GitHub Topics

  • codex-skill
  • wechat-mini-program
  • wechat-devtools
  • automation
  • miniapp

Tested Scope

Validated on macOS with WeChat DevTools installed. The included scripts were verified by:

  • python3 .../bootstrap_wechat_devtools_automation.py --help
  • python3 .../validate_bootstrap.py --help
  • bootstrap into a temporary project directory
  • validation against that generated output

About

Reusable Codex skill for WeChat Mini Program DevTools automation, bootstrap, compile, deploy, and regression workflows.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages