name: desktop-app-audit
description: Audit desktop applications — especially Electron and other web-runtime apps — for idle resource waste: background CPU when unfocused, memory footprint, startup daemons, per-app runtime duplication, animation and polling loops that never sleep. Use this skill whenever the user builds or maintains a desktop app, mentions Electron/Tauri/WebView apps, shares process or profiler data, or users complain the app drains laptops. Part of Lean Agentic AI Skills; emits lean-findings.json.
Desktop App Audit
Subject type: emit subject.type: "desktop-app" in findings.
Producer skill. Input: app architecture description, profiler/process data (CPU when idle/unfocused, RSS), update and background-service configs, renderer counts. Output: lean-findings.json.
Desktop apps run for hours on hardware the user owns — idle CPU is battery drained and fans spun across every installed seat, and memory pressure shortens the useful life of machines (the M-lever lean-mobile-audit's radio logic doesn't cover). Web-runtime apps are the biggest offenders by construction: each ships its own browser.
Signatures
- Busy while idle — measurable CPU when the window is unfocused/minimized: animation loops not paused, timers firing, telemetry heartbeats. High (hours × seats). Evidence: profiler CPU% in idle state. Fix: pause rendering on blur/occlusion (Electron: backgroundThrottling, visibility handlers), coalesce timers.
- Polling where OS events serve — file watchers implemented as poll loops, network polling for state push could deliver. High. Fix: native FS events, push channels, OS-scheduled background tasks.
- Startup daemons and helpers — auto-start services running always for features used rarely (updaters resident 24/7 to check once a day). Medium-high. Fix: on-demand launch, OS-scheduled checks.
- Renderer sprawl — one process/webview per panel; memory multiplying with windows. Medium-high. Evidence: process count × RSS. Fix: consolidate renderers, unload hidden views.
- Web runtime where native serves — the honest architecture finding: a status-bar utility shipping a full browser runtime. Medium; effort high; alternatives (Tauri/native webview, native UI) named with their trade-offs (team skills, cross-platform cost) — this is an option, never a mandate.
- Update churn — full-app downloads for small updates; no delta updates. Medium: bytes × seats × frequency. Fix: differential updates.
- Unbounded caches/logs on user disks — app data growing forever on machines you don't pay for. Low-medium. Fix: cache ceilings, log rotation.
- Ignoring OS power states — same behavior on battery vs plugged, no response to low-power mode. Medium. Fix: honor power APIs; heavy work deferred to plugged+idle (the desktop cousin of carbon-aware scheduling).
Cost signal (countable)
Provider-side cost is mostly update bandwidth (GB × seats × releases) and any telemetry ingestion — countable from release sizes and analytics volume. The dominant costs are user-side (battery, machine longevity): name them in impact text, not cost_signal, per the module's rule against charging users' costs to fabricated figures.
Honesty rules
Idle-CPU claims come from a profiler run, not intuition — name the tool (OS activity monitors, Electron's contentTracing, platform profilers). Runtime-replacement recommendations always carry the engineering-cost trade-off at effort: high. Seat counts are the user's data.
Not this skill's job
Web pages in browsers (web-carbon-audit), the app's bundle build (js-bundle-audit — Electron apps should run both), mobile (lean-mobile-audit), backend APIs it calls (api-efficiency-audit).