| name | lean-mobile-audit |
| description | Audit mobile apps for battery and network waste on user devices — wake locks, background sync frequency, polling where push serves, location over-sampling, image/payload sizes on cellular, and retry storms on flaky networks. Use this skill whenever the user shares Android/iOS code or configs (WorkManager, background tasks, sync adapters), asks why an app drains battery or data, or wants a mobile app sustainability/efficiency review. Part of Lean Agentic AI Skills; emits lean-findings.json. |
Green Mobile Audit
Producer skill. Input: app source/configs (manifest, background task schedules, networking code), or a behavioral description. Output: lean-findings.json.
Mobile inefficiency is E shifted onto millions of user devices — and the user pays it in battery and data. It is also an R story: the same app function delivered with less device work. The physics to keep in mind: the radio is the battery's biggest enemy after the screen, and every network wakeup costs a "tail" of energized-radio time beyond the transfer itself.
Subject type: emit subject.type: "mobile-app" in findings.
Signatures
- Polling where push serves — fixed-interval fetch loops for data that changes rarely; every poll wakes the radio. High. Fix: FCM/APNs push, or exponential/adaptive intervals at minimum.
- Frequent background sync — WorkManager/BackgroundTasks intervals tighter than the data's real change rate; sync not batched or coalesced. High. Fix: widen intervals, use constraint-based scheduling (charging + unmetered for heavy work — the OS's own carbon-aware knob).
- Wake locks held wide — partial wake locks around long code paths; alarms with setExactAndAllowWhileIdle where inexact serves. High. Fix: narrow scope, prefer WorkManager over alarms, exact alarms only for user-facing deadlines.
- Location over-sampling — high-accuracy GPS at high frequency for coarse needs (geofencing, city-level). High. Fix: lowest accuracy/frequency serving the feature; passive/fused providers; geofence APIs instead of continuous tracking.
- Full-size assets over cellular — images/videos not sized to device or connection class; no modern formats. Medium-high (pairs with web-carbon-audit patterns).
- Retry storms — network retries without backoff/jitter on flaky connectivity; the radio-tail cost multiplies. Medium-high. Fix: exponential backoff, offline queue, respect OS connectivity callbacks instead of probing.
- Chatty APIs — many small requests per screen where one aggregate serves; each carries the radio-tail overhead. Medium.
- Ignoring battery saver / data saver signals — app behaves identically under OS power/data constraints. Medium; fix: honor PowerManager/DataSaver states.
Honesty rules
Battery impact is device- and usage-dependent — findings are directional; the measurement pointer is platform profilers (Android Battery Historian/Perfetto, Xcode Energy Log), named in every report. Trade-offs stated: push infrastructure has server-side cost; wider sync intervals trade freshness — name the staleness each recommendation accepts.
Cost signal (countable)
Cost driver on the provider side is minor for many findings; the honest costs of mobile inefficiency are user-side (battery, data-plan bytes). Where a provider-side call volume applies (push infra, sync endpoints), name it in cost_signal; otherwise skip the field and address the user-side cost in the impact text.
Not this skill's job
Server-side efficiency of the APIs the app calls (db-efficiency-audit, caching-strategy-designer), on-device ML placement (inference-placement-advisor).