Skip to main content
skill CX Codex

anr-audit-and-fix — Claude Code skill: ANR checks

The anr-audit-and-fix Claude Code skill finds ANR risks in Android projects and examines ANR stack dumps. Run it to inspect blocking calls or investigate an unresponsive app.

Apache-2.0 694 installs ★ 10,691 updated 2026-10-23

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add android/skills --skill anr-audit-and-fix -a claude-code
Open on GitHub

What anr-audit-and-fix does

The skill checks Android source code for calls that can stall a thread, then examines ANR traces. For a code audit, it traces the execution thread and verifies that a call blocks before grading a candidate. Rejected candidates appear separately with a brief reason.

For trace analysis, findings must come from log evidence, and the report follows a supplied template. Suggested app changes are limited to app defects and app resource overload; external bottlenecks do not receive app-level fixes. This skill does not cover other crashes, dropped frames, general CPU profiling, or Perfetto system traces.

What it helps with

  • find calls that can block in Android code
  • trace which thread executes a call
  • diagnose an ANR stack dump from log evidence
  • separate app defects from external bottlenecks

Example prompts for the agent

  • Audit this Android code for ANR risks and identify calls that block a thread.
  • Analyze this ANR stack dump and write up the findings.
  • Check whether off-main-thread changes to attached Views could cause a Sync Barrier Leak ANR.

How to install anr-audit-and-fix

1Skills CLI (Vercel)

npx skills add android/skills --skill anr-audit-and-fix -a claude-code

2Manually: put the files in place

~/.claude/skills/anr-audit-and-fix/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/anr-audit-and-fix/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about anr-audit-and-fix

How do I install anr-audit-and-fix in Claude Code?

Run npx skills add android/skills --skill anr-audit-and-fix -a claude-code. The skill file is at ~/.claude/skills/anr-audit-and-fix/SKILL.md.

What does anr-audit-and-fix do?

It audits Android code for ANR risks and investigates ANR traces using log evidence. The audit separates confirmed candidates from those it dismisses.

Which issues can anr-audit-and-fix analyze?

It handles ANRs, not unrelated crashes, dropped frames, general CPU profiling, or Perfetto system traces.

Source text

SKILL.md · Apache-2.0
---
name: anr-audit-and-fix
description: 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.txt
metadata:
  author: Google LLC
  last-updated: '2026-11-10'
  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](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](references/trace_analysis_guide.md) and format the report with [references/anr_trace_report_template.md](references/anr_trace_report_template.md).
- Base findings strictly on log evidence. Propose application fixes **only** for `APP_DEFECT` or `APP_RESOURCE_OVERLOAD` (never for `EXTERNAL_BOTTLENECK`).

© Google LLC · Apache-2.0 · android/skills

Similar skills

All skills for Mobile →

From the same set36

The whole set →
leanback-to-compose-tv-migration leanback-to-compose-tv-migration — a skill that guides the move from Leanback and Android Views to Jetpack Compose for TV. Useful when a browse, settings or playback screen needs rewriting. CX Codex +1 1,200installs restore-credentials This Claude Code skill guides Android Restore Credentials integration with androidx.credentials. It covers creating, retrieving, and clearing restore keys for sign-in on a new device. CX Codex +1 1,000installs navigation-event Configures back gesture handling and Predictive Back animations using NavigationEvent in Jetpack Compose apps targeting SDK 36+. CX Codex +1 998installs ml-kit-genai-prompt-api ml-kit-genai-prompt-api is a Claude Code skill that guides the setup of ML Kit GenAI Prompt API on Android. Sends on-device requests to Gemini Nano and handles structured output. CX Codex +1 835installs glance-canonical-layouts Generates home screen widgets using Jetpack Glance canonical layouts from Android Platform Samples. Activates when adding checklist, action list, or grid widget patterns. CX Codex +1 599installs litert-runtime litert-runtime walks through Kotlin code and Gradle setup for running .tflite models on Android with the CompiledModel API. Covers CPU and GPU inference, buffer reuse, preprocessing, and migration from the legacy TFLite stack. CX Codex +1 558installs wear-widgets wear-widgets — a skill that builds, migrates, and checks Wear OS widgets using Glance Wear and Remote Compose. It steps in when an Android project needs a new widget, a TileService migration, or a review of an existing implementation. CX Codex +1 544installs android-for-cars-parked-apps android-for-cars-parked-apps — a skill for Claude Code adapts existing Android video apps, games, and web browsers for parked use on Android Auto and Android Automotive OS. CX Codex +1 537installs

Project sponsors

Companies that keep this analytics open