WeChat DevTools Automation
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, andunknown. For subpackages, it inspectspackage.json,.mps.config.js, andconfig/index.js, returning fields such asdevtoolsProjectPath,subpackageRoot, anddevScript. When multiple hosted targets exist, the workflow requires user selection. - Session bootstrap: prefers
cli autoplusconnectover opening duplicate windows;launchis 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 asreLaunch,tap,waitForSelector,data, andscreenshot. - 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.cjsproduces a top-levelreport.jsonplus 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.
Related Skills
A systematic code error fixing skill that follows a five-step workflow: Reproduce, Isolate, Understand, Fix, Verify, to help developers resolve code errors.
Supports inline SVG/HTML rendering and Mermaid code output, covering common technical diagram creation like architecture and flow diagrams.
A comprehensive browser automation guide covering navigation, interaction, multi-tab management, and data collection, tailored for domestic web ecosystems and tools like Playwright/Selenium.
Control Windows WeChat through GUI automation to search contacts and send text, images, or files without official APIs.