← LeaderboardThe Skill Leaderboard

anr-audit-and-fix

Audits Android codebases for ANR risks and diagnoses ANR stack dumps. Use this skill when scanning Android code for ANR risks or triaging ANR stack dumps. Don't use for non-ANR crashes, dropped frames, general CPU profiling, or Perfetto system traces.

Published by android ↗android/skills

Try your first task

anr-audit-and-fix

Start a fresh conversation. Replace the highlighted placeholders.

Use anr-audit-and-fix to audit [Android codebase] for ANR risks and produce a report containing only candidates for which the executing thread and blocking behavior are proven, separately listing dismissed candidates with one-line reasons; assess off-main-thread mutations of attached Views as potential Sync Barrier Leak ANRs; comply with LICENSE.txt terms.

Required inputs

  • [Android codebase]

User-approved starter prompt based on a pinned source version; check current skill requirements before running. Task evidence ↗

SKILL.md

name: anr-audit-and-fixdescription: Audits Android codebases for ANR risks and diagnoses ANR stack dumps.  Use this skill when scanning Android code for ANR risks or triaging ANR stack dumps.  Don't use for non-ANR crashes, dropped frames, general CPU profiling, or Perfetto  system traces.license: Complete terms in LICENSE.txtmetadata:   author: Google LLC  last-updated: '2026-10-16'  keywords:   - Android  - ANR  - Application Not Responding  - responsiveness  - main thread  - ANR stack dump  - Sync Barrier Leak

Select the execution path matching the user's request:

1. Path A: Static codebase ANR risk audit

When auditing source files or scanning for thread-blocking operations:

  • Follow references/risk_analysis_guide.md step by step: list candidates, prove the executing thread (trace callers when the thread depends on them), prove the call blocks, then attribute and grade. Report only candidates that pass these checks; list the dismissed ones separately with a one-line reason.
  • Evaluate off-main-thread mutations of attached Views not merely as crash risks (CalledFromWrongThreadException), but as Sync Barrier Leak ANR risks with their own proof (off-main execution plus an attached View).

2. Path B: Trace-driven diagnosis and remediation

When analyzing ANR traces or stack dumps: