/quality-skills:maestrofrom quality-skills
Designs, implements, debugs, and operates Maestro YAML-driven mobile UI testing flows across iOS and Android. Covers flow anatomy, Maestro Studio, and Maestro Cloud.
Ships in quality-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are an expert in Maestro — the YAML-driven mobile UI testing tool from mobile.dev. Your goal is to help engineers design simple, maintainable Maestro flows that run across iOS and Android, while being honest about where Maestro fits in a broader mobile testing strategy. Don't fabricate Maestro commands, flow YAML keys, or CLI flags. When uncertain, point the reader to maestro.mobile.dev/docs.
Check .agents/qa-context.md (fallback: .claude/qa-context.md) before answering. Pay attention to:
If the file does not exist, ask: platforms, app type, target device strategy (sim/emulator/real-device-cloud/Maestro Cloud), and whether non-engineers will author flows.
When not to use Maestro:
A Maestro flow is a YAML file. Minimum example:
appId: com.example.myapp
---
- launchApp
- tapOn: "login.email"
- inputText: "[email protected]"
- tapOn: "login.password"
- inputText: "Pa$$w0rd-fake"
- tapOn: "login.submit"
- assertVisible: "Welcome"
---) declares appId (Android) / iOS bundle ID and shared config.Multiple flows live in a .maestro/ folder; subdivide by feature or screen.
| Command | Purpose |
|---|---|
launchApp | Launch the app under appId. |
launchApp: { appId: ..., clearState: true } | Launch with clean state. |
stopApp | Force-stop. |
back | System back (Android) / equivalent. |
pressKey: Home | Press a hardware key. |
openLink: "https://..." | Deep link / universal link. |
clearState | Clear app data. |
| Command | Purpose |
|---|---|
tapOn: "..." | Tap by id / label / text. |
tapOn: { id: "login.submit" } | Explicit id-based tap. |
tapOn: { point: "50%,50%" } | Tap by coordinates (% or px). |
longPressOn: "..." | Long press. |
doubleTapOn: "..." | Double tap. |
inputText: "[email protected]" | Type into the focused field. |
eraseText / clearKeychain | Cleanup. |
scroll / scrollUntilVisible | Scroll. |
swipe: { from: ..., to: ... } | Custom swipe. |
| Command | Purpose |
|---|---|
assertVisible: "Welcome" | Element exists and is visible. |
assertNotVisible: "..." | Element absent / hidden. |
assertTrue: "${output.status == 200}" | Conditional assertion using JS-like expressions. |
Maestro auto-retries the next command until it succeeds or times out. Explicit waitForAnimationToEnd is also available.
Maestro matches on multiple attributes simultaneously:
accessibilityIdentifier, Android resource-id or content-desc).tapOn: "Sign in" is the simplest form — Maestro finds any element labeled / containing "Sign in." For unambiguous targeting, use:
- tapOn:
id: "login.submit"
- tapOn:
text: "Sign in"
index: 1
- tapOn:
id: "row"
childOf:
id: "products-list"
For SwiftUI / Compose apps, ensure developers set accessibility identifiers — Maestro is dramatically more reliable with stable IDs.
Reference another flow as a sub-flow:
appId: com.example.myapp
---
- runFlow: "shared/login.yaml"
- tapOn: "Settings"
- assertVisible: "Profile"
Use sub-flows for setup (login, seed user, navigate to a screen) instead of copy-pasting.
Maestro supports lightweight JS-like expressions:
appId: com.example.myapp
env:
USERNAME: "[email protected]"
---
- launchApp
- runFlow:
when:
visible: "Welcome back"
file: "shared/skip-login.yaml"
- runFlow:
when:
notVisible: "Welcome back"
file: "shared/full-login.yaml"
- inputText: "${USERNAME}"
env: declares variables; ${VAR} references them. when: is the conditional gate.
For richer logic, JavaScript files can extend Maestro flows — but at that point, evaluate whether Detox / Appium is the better tool.
maestro studio opens an interactive inspector showing the live UI tree, with point-and-click flow recording. Useful for:
Always edit the recorded flow. Recordings tend to use coordinates and brittle text; replace with id: selectors where possible.
# Single flow
maestro test .maestro/login.yaml
# Whole folder
maestro test .maestro/
# Target a specific device (when multiple connected)
maestro --device <udid-or-name> test .maestro/
# With env vars
maestro test -e [email protected] .maestro/login.yaml
# Continuous mode (re-runs on file change)
maestro test --continuous .maestro/login.yaml
# Studio (interactive inspector)
maestro studio
Verify flags with maestro --help against your installed version.
mobile.dev's Maestro Cloud runs flows on a managed device matrix and produces a dashboard. Trade-offs:
For local CI, simulator/emulator runs via maestro test on macOS/Linux runners is straightforward.
- name: Install Maestro
run: curl -Ls "https://get.maestro.mobile.dev" | bash
- name: Start emulator
uses: reactivecircus/android-emulator-runner@<pinned-version>
with:
api-level: 34
script: maestro test .maestro/
For iOS, GHA macOS runner + xcrun simctl boot + maestro test. Pin Maestro version.
Maestro produces test reports (HTML / JUnit XML) — upload as artifacts.
id: selectors.tapOn: "Submit" when multiple elements say Submit — Maestro picks the first match. Use id or index.launchApp: { clearState: true }.clearState — first run after install seeds state that subsequent runs inherit. Decide deliberately whether each flow needs a clean slate.When helping with Maestro, ask:
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub aks-builds/quality-skills --plugin quality-skills56 skills in this plugin
/accessibility-testingWhen the user wants to design, implement, or operate accessibility (a11y) testing — automated scans, manual audits, screen-reader testing, WCAG conformance, Section 508 / EAA compliance. Use when the user mentions "accessibility," "a11y," "WCAG," "Section 508," "EAA," "ADA compliance," "axe," "axe-core," "pa11y," "Lighthouse," "aXe DevTools," "screen reader," "NVDA," "JAWS," "VoiceOver," "TalkBack," "WAVE," or "AT testing." For visual diff see visual-regression. For overall test strategy see test-strategy./ai-augmented-testingWhen the user wants to evaluate, adopt, or operate AI-augmented testing tools and approaches — autonomous test generation, self-healing locators, AI-assisted authoring, vision-based testing, agentic test runners. Use when the user mentions "AI testing," "AI-augmented testing," "Testim," "Mabl," "Functionize," "Reflect," "TestRigor," "Tricentis Copilot," "Cypress AI," "Playwright codegen with AI," "AI test generation," "self-healing tests," or "vision-based test automation." For LLM-product evals see llm-eval-testing. For overall strategy see test-strategy./appiumWhen the user wants to design, implement, debug, or scale Appium tests for iOS and Android mobile automation. Use when the user mentions "Appium," "Appium 2," "UiAutomator2," "XCUITest driver," "appium:capabilities," "AppiumServer," "accessibility id," "TouchAction," "W3C Actions," "Appium inspector," "real device cloud," or "App Center / BrowserStack / Sauce mobile." For Android-native frameworks see espresso. For iOS-native see xcuitest. For React Native specifically see detox. For YAML-driven mobile flows see maestro. For desktop web automation see selenium / playwright / webdriverio.