ANR Audit And Fix
Organizationandroid
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.
Overview
- Repository
- android/skills
- Publisher
- android
- Stars
- 10.5K
- Forks
- 695
- Bundled files
- 3
- License
- Apache-2.0
- Updated
- Nov 11, 2026
Installation
tmp=$(mktemp -d)
git clone --depth 1 https://github.com/android/skills.git "$tmp"
mkdir -p ~/.claude/skills
cp -R "$tmp/performance/anr-audit-and-fix" ~/.claude/skills/anr-audit-and-fix
rm -rf "$tmp"tmp=$(mktemp -d)
git clone --depth 1 https://github.com/android/skills.git "$tmp"
mkdir -p ~/.codex/skills
cp -R "$tmp/performance/anr-audit-and-fix" ~/.codex/skills/anr-audit-and-fix
rm -rf "$tmp"Install the ANR Audit And Fix agent skill from https://github.com/android/skills/tree/main/performance/anr-audit-and-fix into this project's skills folder.Instructions
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:
- Diagnose systematically using references/trace_analysis_guide.md and format the report with references/anr_trace_report_template.md.
- Base findings strictly on log evidence. Propose application fixes only for
APP_DEFECTorAPP_RESOURCE_OVERLOAD(never forEXTERNAL_BOTTLENECK).
Bundled files
FAQ
What does ANR Audit And Fix do?
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.
Who made ANR Audit And Fix?
android (an organization) publishes it in the android/skills repository on GitHub.
Is ANR Audit And Fix free?
Yes. ANR Audit And Fix is open source, published by android under the Apache-2.0 license.
What comes with ANR Audit And Fix?
Its instructions and 3 files the agent reads only when a task needs them, such as references, examples or scripts.
Which agents can use ANR Audit And Fix?
Any coding agent that reads SKILL.md files, including Claude Code, Codex, Cursor, GitHub Copilot and Gemini CLI. The agent loads the skill when a task matches its description.
What are agent skills?
An agent skill is a folder with a SKILL.md file: instructions that teach a coding agent how to do one kind of task, and optionally files it can read while it works. The agent keeps only the skill's name and description in mind and reads the rest when a task calls for it.
How are agent skills different from MCP servers?
An MCP server gives an agent new tools to call, code that runs somewhere and returns results. A skill gives it knowledge: how to approach a task with the tools it already has. Many agents use both.
How can my agent test my Android app?
Robomori lets coding agents create, start and control Android emulators and devices from one command, so they can install your app, take screenshots and check dark mode, font sizes and languages.