Skip to content
Skillpedia
Mobile apps10k · #11926

anr-audit-and-fix

What it does

This skill checks Android code for risks of Application Not Responding freezes, and explains ANR stack dumps. It is for Android developers who see freezes or ANR reports in their app.

When to use it

  • ✓When you want to scan Android code for work that blocks the main thread.
  • ✓When you have an ANR stack dump or trace and want to know what caused it.
  • ✓When Google Play or your crash tool reports ANR errors and you need the likely fix.

Skill link

https://github.com/android/skills/blob/main/performance/anr-audit-and-fix/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/android/skills/blob/main/performance/anr-audit-and-fix/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Here is an ANR trace from our app. Tell me what caused it and what to fix.”

5 new skills a week. 1 minute to read.

How it works

For code, the skill lists risky calls, proves which thread runs them and whether they really block, then grades each one. For traces, it follows a set trace analysis guide and writes a report based only on the log evidence.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

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:

FAQ

Does it list every slow call?

No. It reports only risks it can prove, and lists the dismissed ones separately with a short reason.

Will it propose fixes for every ANR?

Only for problems in the app itself. Causes outside the app, such as external bottlenecks, are not given app fixes.

Does it cover crashes and frame drops?

No. Non-ANR crashes, dropped frames and system traces are outside this skill.

Details

Original description by the author

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.

repo: android/skills

Popularity

GitHub stars
10k
Ranking position
#11926
License
Apache-2.0
Updated
10/29/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills