$npx -y skills add hanamizuki/solopreneur --skill gplay-vitals-monitoringMonitor Android app stability and performance from the Play Developer Reporting API via gplay vitals. Use to query crash/ANR rates, detect release regressions with anomaly detection, filter error issues/reports with AIP-160 expressions, and break down startup/rendering/battery me
| 1 | # App Vitals Monitoring |
| 2 | |
| 3 | `gplay vitals` hits the **Play Developer Reporting API** (separate from the Android Publisher API used by most other commands). Every subcommand outputs **JSON by default**; add `--output table|markdown` for humans or `--pretty` to indent JSON. Dates are ISO 8601 (`YYYY-MM-DD`). |
| 4 | |
| 5 | ## Preconditions |
| 6 | - Credentials set (`gplay auth login` or `GPLAY_SERVICE_ACCOUNT`). |
| 7 | - Service account needs "View app information and download bulk reports" permission. |
| 8 | - The app must have enough installs to generate vitals data (small apps return empty sets). |
| 9 | |
| 10 | ## The real surface |
| 11 | There are exactly three groups. There is **no** `crashes list/get`, no `errors list/get`, no `performance overview/permissions`, no `--cluster-id`, `--version-code`, `--start-time/--end-time`, `--severity`, or `--error-id`. |
| 12 | |
| 13 | | Command | Purpose | |
| 14 | |---------|---------| |
| 15 | | `vitals crashes query` | Crash / ANR **rate** metrics over a date range | |
| 16 | | `vitals crashes anomalies` | Auto-detected regressions — the release gate | |
| 17 | | `vitals performance startup\|rendering\|battery` | Performance metric breakdowns | |
| 18 | | `vitals errors issues` | Grouped error **issues** (AIP-160 filterable) | |
| 19 | | `vitals errors reports` | Individual error **reports** with stack traces | |
| 20 | |
| 21 | ## Crash & ANR rate metrics |
| 22 | |
| 23 | `gplay vitals crashes query` returns rate metrics, not a cluster list. Switch metric with `--type crash|anr`; group with `--dimension`. |
| 24 | |
| 25 | ```bash |
| 26 | # Crash rate for a window |
| 27 | gplay vitals crashes query --package com.example.app --from 2026-06-01 --to 2026-06-30 --output table |
| 28 | |
| 29 | # ANR rate |
| 30 | gplay vitals crashes query --package com.example.app --type anr --output table |
| 31 | |
| 32 | # Break down by version to spot a bad build |
| 33 | gplay vitals crashes query --package com.example.app --dimension versionCode --output table |
| 34 | |
| 35 | # By device model |
| 36 | gplay vitals crashes query --package com.example.app --dimension deviceModel --paginate |
| 37 | ``` |
| 38 | |
| 39 | Other valid dimensions include `deviceModel`, `deviceBrand`, `apiLevel`, `countryCode`. Use `--paginate` to pull every page. |
| 40 | |
| 41 | ## Anomaly detection — the regression / release gate |
| 42 | |
| 43 | `gplay vitals crashes anomalies` lists automatically detected deviations that likely indicate a regression from a new release. This is the command to run in a post-release watch or a CI gate — it does the "is this worse than baseline?" judgement for you across crash, ANR, error, and performance metric sets. |
| 44 | |
| 45 | ```bash |
| 46 | # All anomalies in the last 7 days (default window) |
| 47 | gplay vitals crashes anomalies --package com.example.app --output table |
| 48 | |
| 49 | # Just ANR regressions, most recent 20 |
| 50 | gplay vitals crashes anomalies --package com.example.app --type anr --limit 20 |
| 51 | |
| 52 | # Scope to a release window |
| 53 | gplay vitals crashes anomalies --package com.example.app --from 2026-06-25 --to 2026-07-02 |
| 54 | ``` |
| 55 | |
| 56 | `--type` accepts `crash`, `anr`, `errors`, `performance`, or `all` (default). `--limit` is 1–1000 (default 50). |
| 57 | |
| 58 | ## Performance metrics |
| 59 | |
| 60 | Three subcommands, each with an optional `--dimension` (e.g. `apiLevel`, `deviceModel`, `country`): |
| 61 | |
| 62 | ```bash |
| 63 | # Cold/warm/hot startup percentiles, broken down by API level |
| 64 | gplay vitals performance startup --package com.example.app --dimension apiLevel --output table |
| 65 | |
| 66 | # Slow (16ms) and frozen (700ms) frame rates |
| 67 | gplay vitals performance rendering --package com.example.app --from 2026-06-01 --to 2026-06-30 |
| 68 | |
| 69 | # Battery: excessive wakeups vs. stuck wake locks (choose with --type) |
| 70 | gplay vitals performance battery --package com.example.app --type wakeup --output table |
| 71 | gplay vitals performance battery --package com.example.app --type wakelock |
| 72 | ``` |
| 73 | |
| 74 | ## Errors: issues vs. reports, filtered with AIP-160 |
| 75 | |
| 76 | - **`errors issues`** — reports grouped into issues (counts, distinct users). Start here to triage. |
| 77 | - **`errors reports`** — individual reports with stack traces and device info. Drill in from an issue. |
| 78 | |
| 79 | Both filter via a single `--filter` AIP-160 expression. Supported fields: `errorIssueType` (`CRASH`, `ANR`, `NON_FATAL`), `apiLevel`, `versionCode`, `deviceModel`, `deviceBrand`, `deviceType`, `appProcessState` (`FOREGROUND`, `BACKGROUND`), `isUserPerceived`; `reports` additionally supports `errorIssueId` and `errorReportId`. |
| 80 | |
| 81 | ```bash |
| 82 | # Top crash issues by report count |
| 83 | gplay vitals errors issues --package com.example.app \ |
| 84 | --filter 'errorIssueType = CRASH' \ |
| 85 | --order-by 'errorReportCount desc' --page-size 10 --output table |
| 86 | |
| 87 | # ANR issues most impacting distinct users |
| 88 | gplay vitals errors issues --package com.example.app \ |
| 89 | --filter 'errorIssueType = ANR' --order-by 'distinctUsers desc' |
| 90 | |
| 91 | # Compound filter: crashes on a spec |