maa-cli-operate
Installation
SKILL.md
Maa CLI Operate
Use the pinned external maafw-cli runtime. Read references/command-contract.md before composing commands or interpreting output.
Choose the runtime
Use maafw-cli for one-shot, repeatable operations with compact JSON output: device discovery, resource checks, Pipeline validation, scripted recognition/action sequences, and CI jobs.
Use MaaMCP instead when the task benefits from a long-lived exploratory session, repeated visual inspection, interactive Pipeline debugging, or an MCP-native tool schema. Do not run both against the same device session unless the user deliberately wants separate controllers.
Prepare safely
- Run the pinned version check and require the tested version.
- Use
--jsonfor every non-help operation that supports it. Parse stdout as JSON; keep stderr for diagnostics. - Check
resource statusbefore OCR. Treatdownload-ocras an explicit network and disk mutation. - Discover devices before connecting. Resolve an exact ADB address, Win32 title/handle, PlayCover application, or wlroots target instead of guessing.
- Use a named
--onsession whenever more than one command or device is involved. Record whether the daemon or session existed before the task.