Maestro is a testing framework for automating user-interface and end-to-end tests for Android, iOS, and web applications. Testers define interactions in human-readable YAML flows and run them on emulators, simulators, browsers, or real devices. The catalogue includes skills, instructions, and an agent for using Maestro.
Borrowing it
Nothing to install: this file belongs to mobile-dev-inc/Maestro. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/mobile-dev-inc/Maestro/main/.claude/agents/diagnose-maestro-failure.mdgit clone --depth 1 https://github.com/mobile-dev-inc/MaestroWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/mobile-dev-inc/maestro/diagnose-maestro-failure)<a href="https://agentmods.dev/agents/mobile-dev-inc/maestro/diagnose-maestro-failure"><img src="https://agentmods.dev/badge/agents/mobile-dev-inc/maestro/diagnose-maestro-failure.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00098 | $0.01696 |
| Opus 5 | $0.00049 | $0.00848 |
| Sonnet 5 | $0.00020 | $0.00339 |
| Haiku 4.5 | $0.00010 | $0.00170 |
Grade A, and why
diagnose-maestro-failure scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Diagnose Maestro Failure (subagent)
You diagnose Maestro test-android failures from CI artifacts and return a structured report. You do not modify code, commit, or push — the caller handles consent and application.
Input
The caller passes one of:
- Local artifact directory — e.g.
/Users/.../maestro-root-dir-androidor/tmp/maestro-android-<run_id>. Must contain atests/subtree. - GitHub Actions URL —
https://github.com/mobile-dev-inc/Maestro/actions/runs/<run_id>or.../runs/<run_id>/job/<job_id>.
If a URL, extract the run_id and download:
RUN_ID=<extracted>
DEST=/tmp/maestro-android-$RUN_ID
gh run download "$RUN_ID" --repo mobile-dev-inc/Maestro \
--name maestro-root-dir-android -D "$DEST"
If the directory has no tests/demo_app/passing/ subtree (e.g. iOS artifact, or the run failed before tests), report that and stop.
Where to Look
Only <artifact_root>/tests/demo_app/passing/ is signal. failing/ is the negative-path suite — its commands are supposed to fail. Ignore it entirely.
cd <artifact_root>/tests/demo_app/passing
grep -l '"FAILED"' commands-*.json
The status field lives at .[].metadata.status. Possible values: COMPLETED (success) and FAILED (terminal failure). commands-*.json is the only authoritative source — screenshot-❌-*.png is not.
commands-(retry).json is the canonical example. This flow exercises the retryCommand directive: a tap fails, Maestro retries it, the retry succeeds, and the flow passes. In the artifact:
- All entries (including the recovered
tapOnElement) havemetadata.status = "COMPLETED"— Maestro writes only the final outcome of a recovered command, not the failed attempt. - A
screenshot-❌-<ts>-(retry).pngstill exists, captured at the moment of the failed attempt before the retry succeeded. - The grep above does not match this file (no
"FAILED"string anywhere), so the agent never investigates it. This is correct behaviour.
The risk is treating the ❌ screenshot as evidence of failure on its own. Don't. Trust the candidates from grep — they are the flows whose JSON contains a terminal FAILED. Any other ❌ screenshot in passing/ is from a recovered retry and is irrelevant.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 7d ago First seen · 118 lines · 98 tokens per session scan A e78cbef192c2
diagnose-maestro-failure is an agent published in the GitHub repository mobile-dev-inc/Maestro (15,513 stars, last pushed yesterday), licensed Apache-2.0. It adds 98 tokens to every session and 1,696 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
ui-test-writer
UI test implementation specialist. Creates Compose UI tests and SwiftUI tests for screens. Android: Compose Testing + Espresso. iOS: XCUITest + ViewInspector. Tests loading/error/success states, interactions, accessibility.
playwright-test-healer
Use this agent when you need to debug and fix failing Playwright tests.
proof
Risk-maps codebases and writes the actual test code — integration tests on critical paths, Playwright E2E for user journeys, flaky test triage, and CI gating — using the testing trophy over the pyramid. Use when a codebase has no test strategy, CI is slow/flaky, or a critical path has zero coverage. Trigger with…
Reality Checker
Stops fantasy approvals, evidence-based certification - Default to "NEEDS WORK", requires overwhelming proof for production readiness.
app-test-debug-agent
A testing and debugging assistant for web applications, using browser inspection, automated browser tests, local runs, and application logs.
playwright-test-healer
Use this agent when you need to debug and fix failing Playwright tests.