Install
openclaw skills install @vincentjiang06/mp-cli-supopenclaw skills install @vincentjiang06/mp-cli-supDebug a WeChat Mini Program's live runtime through the system vince-mp JSON CLI (an
installed npm package, not a vendored binary). The defining workflow is session-first:
connect once, then every later command reuses that one connection — repeat commands are
near-instant and element uids persist across separate CLI calls.
Use this skill to: connect to / start a session against WeChat DevTools; inspect runtime state
(route, pageStack, pageData, storage, systemInfo, console); query/snapshot elements and then
tap/input them by uid (long-press via step); take a single-element or full screenshot; drive a camera-less
scan; run a real project doctor (tsc + .ts/.js freshness + selected backend domain + LAN IP);
diagnose "won't connect / 模拟器启动失败"; switch backend env and pull server error logs by
requestId; probe Skyline Canvas/Camera or mock media.
Do not use it for ordinary web-browser automation, generic frontend source edits, Mini
Program code review with no DevTools/runtime execution, or a Skyline→WebView renderer migration
(that is mp-groundline).
vince-mp session start # connect ONCE: auto-resolves miniprogramRoot + ensures the
# automation port (spawns `cli auto` only if it isn't live),
# then attaches. May open/focus DevTools if it isn't running.
vince-mp doctor # optional health check (project + tsc + .js freshness + domain)
vince-mp data # read pageData — instant (reuses the session)
vince-mp query .submit-btn # mint a uid (e.g. "button_0")
vince-mp tap button_0 # act by uid — the uid is STILL valid in this separate call
vince-mp data # confirm the effect
vince-mp scan PKG-2026-0605 # camera-less: onScanCode with a {type:"scancode",detail:{result,scanType,type}} event
vince-mp console # console buffered since session start
vince-mp session stop # when done (or it idle-reaps itself)
Any trigger whose handler does async work (tap/input/scan/step) resolves when DevTools
DISPATCHES the call, NOT when the async work (wx.request→setData) finishes — wait or re-poll
before reading the effect, whether the read is data, networkList, or mediaList.
Every command returns JSON and accepts --workspace-root <dir> and --port <n> (default 9420;
--port only selects the automation port when a NEW session is first spawned for a workspace).
The session is keyed per workspace-root, NOT per port — to debug two projects at once give each
its own --workspace-root; --port alone will reuse the live session and not switch targets.
vince-mp command as the only backend.--no-session/run --connect only when a one-shot or an
explicit connection is required. Opening/focusing DevTools via launch (beyond session start
ensuring the port) is a human-gated side effect — do it only with explicit user authorization.cwd/--workspace-root; file outputs need an explicit --output/path arg.session start ensuring the automation port (and possibly opening
DevTools) is the one expected connect-time side effect.APP_NOT_RUNNING, AUTOMATION_PORT_TIMEOUT, STALE_OR_UNKNOWN_UID).ps/shell history; config is on disk): never pass a token value with env token <value> or --token <value>, never export it, never read or print ~/.vince-mp/config.json or $VINCE_MP_ADMIN_TOKEN. ADMIN_TOKEN_REQUIRED is the name-only presence signal: ask the user to set VINCE_MP_ADMIN_TOKEN in the environment that launches the agent, entered so it never lands in argv or shell history (e.g. read -rs VINCE_MP_ADMIN_TOKEN && export VINCE_MP_ADMIN_TOKEN, then restart the agent from that shell). Do not recommend env token <value> to the user either — it is the same argv/history leak. A token pasted into chat is not used, even when the user says "just use it" — say it is now exposed in the transcript and recommend rotating it.data.cli.im or any unknown host, judged by host, not env name — env use caoliaoProdIm, logs while such an env is selected, logs --base on it. Run vince-mp env current before every logs (the selection persists across sessions); ask the user in this conversation for that concrete action — an earlier blanket "don't ask" does not count — then restore the previous env and report it. Restoring only undoes your own env use; if the previous env is production-target, switching back is itself a production-target action — leave the current env, say which is selected, and offer the switch.eval is an act, not a read (it runs arbitrary JS in the app): under non-invasive inspection only a side-effect-free read expression you show the user; unsure → treat as act and ask.vince-mp or building workflow JSON, load rules/runtime-protocol.md (session-first
protocol, action-surface tiers, hard safety rules) and references/cli-contract.md (exact command
surface, session ops, shorthands, connection/workflow JSON, step list, error codes).rules/ui-element-workflow.md (uids persist in a
session, stale only after navigation/mutation).references/skyline-media.md (snapshot protocol, instrumentation, mocks).references/evidence-and-failures.md — also for STEP_TIMEOUT on data/scan, a wedged camera page, or pulling server logs.Verification, the release checklist, the hardening-loop stop rule and the judgment ledger live in
MAINTENANCE.md — read it only when changing, verifying or releasing this skill, never for debugging.