mobile-qa
Skill19 starsChanged 6 months agoMITView on GitHub
Use for any mobile QA or Android end-to-end testing work — "test the app on a device/emulator", install/launch an APK, drive a real app to reproduce a bug, write or fix Appium / UiAutomator2 / WebdriverIO mobile tests, chase a flaky Android test, or QA a Capacitor/React Native build. Runs the autonomous QA loop (preflight → install → read the a11y tree → execute → assert → capture evidence + root cause on failure → re-verify through cdt-verify until green) and turns every confirmed bug into a durable regression test.
- Reads credentials
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Mesteriis/Engineering-Bible-AItheir own version, first seen Jun 28, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- Mesteriis/Engineering-Bible-AI★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository14 other files it gives its agents.
- automation-firstSkill
- clean-code-typescriptSkill
- code-splittingSkill
- final-responseSkill
- gauge-improvementsSkill
- karpathy-guidelinesSkill
- orchestrationSkill
- qa-sharedSkill
- requirement-intelligenceSkill
- root-cause-analysisSkill
- technical-writingSkill
- ui-ux-pro-maxSkill
- web-design-guidelinesSkill
- web-qaSkill
The file
Files
Mobile QA — autonomous device-driven testing
Drive a real Android device/emulator, find real bugs, prove the fix. Never claim a pass you did not observe. No device attached → say so and stop; a QA report with no device behind it is a fabrication.
Read
qa-sharedalongside this. The autonomous loop, thecdt-verifygate, the artifact layout (.claude/qa/mobile/<runid>), the failure-analysis format, the report shape, and the credential / payment / PII rules are shared withweb-qaand defined once there. This file covers only what is mobile-specific: the device control plane, the Android traps, and native/RN/Capacitor selectors.
Control plane — precedence (use the first that covers it)
| # | Layer | Use for | Never |
| 1 | Mobile MCP tools (if wired) | Live exploratory driving — tap/swipe/type/screenshot/read UI, model-native | — |
| 2 | cdt-mobile-qa (~/.claude/bin/cdt-mobile-qa) | Everything device-lifecycle: preflight, install, launch, reset, capture, logcat, net, perms, Appium | — |
| 3 | raw adb | Only what neither above wraps — say so explicitly when you drop to it | Hand-writing an adb command a subcommand already wraps |
This is the same hierarchy as automation-first — repo/tool automation beats improvised commands. Wire an
MCP once, then prefer it for interaction:
claude mcp add mobile -- npx -y @mobilenext/mobile-mcp@1.0.0
claude mcp add appium -- npx -y appium-mcp-server@0.1.61Pin the version — never @latest. An MCP server gets arbitrary code execution in your session and
full control of the device. With @latest, npx -y re-resolves from the registry on every launch, so a
hijacked or compromised publish runs automatically the next time you start a session, with no diff to
review. Both are third-party (appium-mcp-server is pre-1.0); bump the pin deliberately, the way
templates/package.json pins every devDependency exactly.
The frozen CLI (do not invent subcommands)
| Command | Purpose |
doctor | adb/appium/uiautomator2-driver/node/device/MCP preflight → PASS·WARN·FAIL + fix hints |
devices | adb devices + api level + model |
install <apk> | adb install -r -g (-r replace, -g grant all runtime perms). For clean state use reset <pkg> |
launch <pkg> [activity] / stop <pkg> | am start (waits for window) / force-stop |
reset <pkg> | pm clear — fresh state per scenario |
shot [name] / record start|stop [name] | screencap / screenrecord mp4 → artifacts |
ui [--json] | uiautomator dump → a11y tree (resource-id, content-desc) |
logcat [--since <ts>] [--pkg <pkg>] [--crash] | scoped log window |
net on|off | data/wifi toggle for offline scenarios |
perm grant|revoke <pkg> <perm...> | runtime permissions |
artifacts [--dir] [--clean] | artifact dir path / wipe |
appium start|stop|status | Appium server lifecycle |
scaffold [--dir <path>] [--force] | copy the shipped WDIO harness into an app repo |
Env: CDT_MQA_DEVICE (adb serial, required when >1 device), CDT_QA_ARTIFACTS (shared with cdt-web-qa;
default .claude/qa/mobile/<runid> — CDT_MQA_ARTIFACTS still honoured for back-compat).
The autonomous QA loop
Defined in qa-shared — preflight → build/install → launch → read the a11y tree → act → assert →
capture + rank root cause on failure → re-run through cdt-verify until green, bounded by
CDT_MAX_ITERATIONS, escalating to the Bug Council on a repeated signature. Read it there; it is
identical for web and mobile. Only the device-specific steps differ:
| Step | Mobile specifics |
| Preflight | cdt-mobile-qa doctor — any FAIL means no device work runs |
| Build/install | check the app repo's Makefile / package scripts first (automation-first), then install <apk> |
| Fresh state | reset <pkg> (pm clear) before every scenario |
| Observe | ui --json — the a11y tree is the fact; a selector from source is a guess |
| Launch check | launch polls until the package is actually foregrounded, so a crash-on-start fails loudly |
Two layers — both are required
Defined in qa-shared. Mobile mapping: exploratory driving is a mobile MCP or cdt-mobile-qa;
the durable layer is an Appium + UiAutomator2 spec in the app repo's qa/. Every confirmed bug ends
as a committed spec, not a screenshot.
The harness (scaffolded, not hand-rolled)
cdt-mobile-qa scaffold --dir <app-repo>/qa drops a TypeScript Appium + UiAutomator2 + WebdriverIO harness
(a subdirectory, never the repo root — the harness owns qa/, and the CLI refuses a project root
because overwriting the app's .gitignore would un-ignore its real .env)
(existing files are skipped, not overwritten, without --force — read the per-file wrote /
skip (exists) lines before assuming a template landed). To onboard an app, follow the harness README:
copy apps/example-rn.ts (or example-capacitor.ts) to apps/<your-id>.ts, fill in appPackage,
appActivity and every selectors entry, then register it in apps/index.ts:
| Path | Contains |
qa/apps/<app>.ts | per-app config: package, activity, capabilities, base URL, test creds source |
qa/flows/ | shared flows (login, nav, CRUD) parameterized by app config |
qa/specs/ | per-app specs composed from flows |
sel(app,'name') | the sanctioned way to reach an element — routes per app kind (RN → resource-id, native → accessibility id, Capacitor → DOM data-testid). Never call by.* directly in a flow |
Multi-app reuse: one harness, N app configs. A new app is a new qa/apps/<name>.ts + its specs — never
a second harness. If a flow needs an if (app === 'x'), the difference belongs in the app config.
Verified capability names (context7, uiautomator2-driver 8.2.2): appium:automationName: 'uiautomator2'
(the driver README's own wording is "Must be set to 'uiautomator2'" — the value is case-insensitive at
runtime, so do not "correct" it to UiAutomator2; both work and the lowercase form is documented),
appium:appPackage, appium:appActivity, appium:autoGrantPermissions (needs targetSdk ≥ 23),
appium:noReset, appium:fullReset, appium:enforceAppInstall, appium:autoWebview,
appium:printPageSourceOnFindFailure (turn this on — it dumps the tree on every find failure).
Versions on npm today: appium 3.6.0, appium-uiautomator2-driver 8.2.2, webdriverio 9.30.1.
Root-cause discipline, reporting, and safety
All three are defined in qa-shared and are identical for web and mobile — the required failure
fields (where / state / logs / ranked cause / artifacts), flake triage, the report shape, and the
credential, sandbox-only-payment, artifact-PII and scrub rules. Do not restate them here; a rule
written twice is a rule that drifts.
Mobile-specific notes only:
| Topic | Mobile specifics |
| Logs | logcat --pkg <pkg> --since <step-start> — the window around the failure, not the whole buffer |
| State at failure | the ui dump taken at the failing step, not a later one |
| Destructive ops | reset wipes app data and net off leaves the device offline — both hit a REAL device, possibly the user's own phone |
| Permissions | install -g auto-grants every runtime permission; use reset to get back to an ungranted state |
Artifacts land in .claude/qa/mobile/<runid> (CDT_QA_ARTIFACTS), alongside .claude/qa/web/ —
one root, per qa-shared.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

