AI Agent Hub
Back to skills
WeChat DevTools Automation icon

WeChat DevTools Automation

Development Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please follow https://skillhub.cn/install/skillhub.md to install @user_aa41fce0/wechat-miniprogram-automator.

About this skill

Problem

WeChat DevTools automation often relies on ad hoc UI clicking and becomes fragile with hosted mini programs, subpackages, multiple targets, port reuse, skeleton states, and batch smoke tests. This skill standardizes the workflow around miniprogram-automator and a JSON-driven runner, resolving the project shape first, then bootstrapping or connecting to DevTools and executing parseable action sequences.

How it works

  • Project shape resolution: distinguishes standalone-miniprogram, hosted-subpackage, and unknown. For subpackages, it inspects package.json, .mps.config.js, and config/index.js, returning fields such as devtoolsProjectPath, subpackageRoot, and devScript. When multiple hosted targets exist, the workflow requires user selection.
  • Session bootstrap: prefers cli auto plus connect over opening duplicate windows; launch is only a fallback for disposable sessions. Per-project stable ports reduce cross-project session collisions.
  • JSON action flow: action plans are stored as temporary JSON files and executed through run_automator.cjs, which prints a single JSON object for harness parsing. It covers stable APIs such as reLaunch, tap, waitForSelector, data, and screenshot.
  • Readiness checks: a short preflight can run before long batches, using business selectors rather than route roots to confirm the page has left skeleton or loading states. Batch entry run_wechat_batch.cjs produces a top-level report.json plus per-case subreports.

Boundaries

This is useful for local mini programs, hosted subpackages, route smoke checks, screenshot capture, and batch inspection, but it is not an arbitrary JS executor. Prefer stable selectors, collect data() or screenshots on failure, and avoid interpreting one environment blocker as multiple product regressions. Disconnect the websocket when finished instead of closing the user-owned DevTools window. In sandboxed environments, a port may appear listening while WebSocket connection still fails; re-probe before changing the mini program workflow.

Use Cases

  • Resolve hosted subpackage targets, connect DevTools, then run route screenshots and data checks.
  • Wait for a business selector to leave skeleton state before batch smoke tests.
  • Collect page data, screenshots, and route state to diagnose blank pages or failed requests.
  • Inspect Taro page structure and business data to verify rendering readiness.

Best For

  • Frontend engineers integrating hosted mini program subpackages who need stable project path selection and route smoke checks.
  • Frontend engineers maintaining Taro rendering quality who need skeleton-end detection, business data checks, and screenshot evidence.
  • Engineering efficiency engineers running mini program smoke tests who need action files and parseable reports.
  • On-call frontend engineers diagnosing blank page reports who need route, request, and storage state snapshots.