mobile-anr-crash-check

mobile-anr-crash-check is a command for Claude Code from tungnk123/mobile-best-practices. It costs 21 tokens per session (1,191 once invoked), scanned A, original, MIT.

A command that checks a mobile app for problems such as ANRs, crashes, and splash-screen issues using a mobile best-practices database. An ANR means the app has stopped responding because work is blocking it for too long.

In plain words
What is it for?
Scanning Android, iOS, Flutter, and React Native source files and reviewing them against database guidance for ANRs, crashes, and startup screens.
Why use it?
It focuses an investigation on common startup, threading, and responsiveness problems instead of relying only on manual inspection. Its recommendations are based on searches of the supplied database.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Good fit Scanning Android, iOS, Flutter, and React Native source files and reviewing them against database guidance for ANRs, crashes, and startup screens.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/tungnk123/mobile-best-practices/mobile-anr-crash-check
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/tungnk123/mobile-best-practices

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mobile-anr-crash-check

README.md
[![agentmods](https://agentmods.dev/badge/commands/tungnk123/mobile-best-practices/mobile-anr-crash-check/github.svg)](https://agentmods.dev/commands/tungnk123/mobile-best-practices/mobile-anr-crash-check)
Your own site
<a href="https://agentmods.dev/commands/tungnk123/mobile-best-practices/mobile-anr-crash-check"><img src="https://agentmods.dev/badge/commands/tungnk123/mobile-best-practices/mobile-anr-crash-check/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mobile-anr-crash-check

Your own site · 80×15
<a href="https://agentmods.dev/commands/tungnk123/mobile-best-practices/mobile-anr-crash-check"><img src="https://agentmods.dev/badge/commands/tungnk123/mobile-best-practices/mobile-anr-crash-check.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,191 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00021 $0.01191
Opus 5 $0.00010 $0.00596
Sonnet 5 $0.00004 $0.00238
Haiku 4.5 $0.00002 $0.00119

Measured 12d ago against content hash 7ff45bfa3e3d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

mobile-anr-crash-check scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

cli/assets/commands/mobile-anr-crash-check.md · 92 lines

How it starts

The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Perform a comprehensive ANR, crash, and splash screen analysis of this mobile project.

IMPORTANT: You MUST run every python3 search command below and base ALL findings exclusively on the database results. Do NOT rely on training data. Every recommendation must come from the database output.

Step 1: Scan the Entire Project

Find all relevant source files:

  • Android: find . -name "*.kt" -o -name "*.kts" -o -name "*.xml" | grep -v build | grep -v .gradle
  • iOS: find . -name "*.swift" | grep -v .build
  • Flutter: find . -name "*.dart" | grep -v .dart_tool
  • React Native: find . -name "*.tsx" -o -name "*.ts" -o -name "*.jsx" -o -name "*.js" | grep -v node_modules

Read the actual source files to understand the current threading, lifecycle, and startup implementation.

Step 2: Search the Database — ALL Entries Required

Run ALL of the following searches. Do NOT skip any. Use the results as the authoritative source:

# ANR: main thread blocking, IO on main thread
python3 ~/.mobile-best-practices/scripts/search.py "anr main thread blocking io" --domain performance -n 10
python3 ~/.mobile-best-practices/scripts/search.py "threading coroutine dispatcher main" --domain performance -n 10
python3 ~/.mobile-best-practices/scripts/search.py "strictmode blocking disk network" --domain antipattern -n 10

# ANR: coroutine misuse and async patterns
python3 ~/.mobile-best-practices/scripts/search.py "dispatcher io main coroutine scope" --domain antipattern -n 10
python3 ~/.mobile-best-practices/scripts/search.py "runblocking suspend main thread" --domain antipattern -n 10
python3 ~/.mobile-best-practices/scripts/search.py "broadcast receiver service timeout anr" --domain performance -n 10

# Crash: null safety and exception handling
python3 ~/.mobile-best-practices/scripts/search.py "null pointer exception crash handler" --domain antipattern -n 10
python3 ~/.mobile-best-practices/scripts/search.py "exception coroutine try catch" --domain antipattern -n 10
python3 ~/.mobile-best-practices/scripts/search.py "crash exception lifecycle fragment activity" --domain antipattern -n 10

# Crash: memory leaks and OOM
python3 ~/.mobile-best-practices/scripts/search.py "memory leak oom context activity static" --domain performance -n 10
python3 ~/.mobile-best-practices/scripts/search.py "context leak viewmodel livedata observer" --domain antipattern -n 10
python3 ~/.mobile-best-practices/scripts/search.py "bitmap large allocation heap oom" --domain performance -n 10

# Crash: lifecycle and state
python3 ~/.mobile-best-practices/scripts/search.py "lifecycle fragment backstack state crash" --domain antipattern -n 10
python3 ~/.mobile-best-practices/scripts/search.py "savedstate process death viewmodel" --domain antipattern -n 10
python3 ~/.mobile-best-practices/scripts/search.py "configuration change recreation state loss" --domain antipattern -n 10

# Splash: cold start and startup time
python3 ~/.mobile-best-practices/scripts/search.py "splash screen cold start startup time" --domain performance -n 10
python3 ~/.mobile-best-practices/scripts/search.py "application oncreate initialization blocking startup" --domain antipattern -n 10
python3 ~/.mobile-best-practices/scripts/search.py "baseline profile startup trace" --domain performance -n 10

# Splash: SplashScreen API and transition
python3 ~/.mobile-best-practices/scripts/search.py "splashscreen api android 12 windowsplashscreen" --domain performance -n 10
python3 ~/.mobile-best-practices/scripts/search.py "splash startup work deferred lazy init" --domain antipattern -n 10

# Platform-specific ANR/crash patterns
python3 ~/.mobile-best-practices/scripts/search.py "anr crash exception" --platform android -n 10

Read the full file on GitHub · 92 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 92 lines · 21 tokens per session scan A 7ff45bfa3e3d

Subscribe to this mod's changes

mobile-anr-crash-check is a command published in the GitHub repository tungnk123/mobile-best-practices (22 stars, last pushed 6mo ago), licensed MIT. It adds 21 tokens to every session and 1,191 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.