parsing-android-anr-expert

parsing-android-anr-expert is a skill for Claude Code, Codex from ttdazi/AndroidAISkills. It costs 64 tokens per session (2,260 once invoked), scanned A, original, Apache-2.0.

An analysis guide for Android ANR reports and bugreports. ANR means “Application Not Responding”; the guide uses thread stacks, wait states, locks, and Binder communication to trace the likely cause and states confidence and missing evidence.

In plain words
What is it for?
Use it to investigate ANRs, waiting channels, thread dumps, lock contention, Binder chains, and related Perfetto traces, including checking matching source code in the current repository.
Why use it?
It prevents conclusions based on one keyword or one stack line by connecting the blocked thread to the code or system interaction that may have caused the delay.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to investigate ANRs, waiting channels, thread dumps, lock contention, Binder chains, and related Perfetto traces, including checking matching source code in the current repository.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ttdazi/androidaiskills/parsing-android-anr
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.

Any agent
npx skills add ttdazi/AndroidAISkills --skill parsing-android-anr
Clone the repo
git clone --depth 1 https://github.com/ttdazi/AndroidAISkills

Made for: Claude Code, Codex.

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 parsing-android-anr-expert

README.md
[![agentmods](https://agentmods.dev/badge/skills/ttdazi/androidaiskills/parsing-android-anr/github.svg)](https://agentmods.dev/skills/ttdazi/androidaiskills/parsing-android-anr)
Your own site
<a href="https://agentmods.dev/skills/ttdazi/androidaiskills/parsing-android-anr"><img src="https://agentmods.dev/badge/skills/ttdazi/androidaiskills/parsing-android-anr/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 parsing-android-anr-expert

Your own site · 80×15
<a href="https://agentmods.dev/skills/ttdazi/androidaiskills/parsing-android-anr"><img src="https://agentmods.dev/badge/skills/ttdazi/androidaiskills/parsing-android-anr.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,260 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.00064 $0.02260
Opus 5 $0.00032 $0.01130
Sonnet 5 $0.00013 $0.00452
Haiku 4.5 $0.00006 $0.00226

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

Security

Grade A, and why

parsing-android-anr-expert 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 11d 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.

parsing-android-anr/SKILL.md · 151 lines

How it starts

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

Android ANR 深度解析(通用核心 + Thunder 适配)

核心原则

  • 结论必须基于证据链:内核等待态 -> 线程栈 -> 业务帧/系统交互
  • 不能仅凭单一关键词下结论(例如看到 epoll_wait 就判死锁)。
  • 输出时必须给出“置信度”和“不足证据说明”。
  • 首要异常点优先:整份结论必须以「证据等级最高、且与 ANR 类型/主线程最相关」的那一条作为第一节焦点;禁止把低置信猜测放在最前面。

仓库联动(在 Cursor 工程内分析时的强约束)

当用户把 ANR 放在当前可访问的工作区/仓库中分析时,凡栈里出现可定位符号(例如 com.thunder.*com.xxx 业务类、本仓库模块路径),必须:

  1. 先在本仓库内自行检索:用文件名/类名 grep、语义搜索、按包路径浏览,定位对应类与方法,再对照栈判断是否存在主线程阻塞、同步 I/O、过大锁域等问题。
  2. 禁止默认让用户「贴类源码」:只有在满足下列任一条件时,才可请用户补充材料,且须写明「已在仓库内检索未果」:
    • 符号被混淆/裁剪,仓库内无匹配;
    • 栈帧落在闭源三方 SDK(仅有 aar,无 Java/Kotlin 源码);
    • 栈中只有 native 符号且无映射表,无法对应业务模块。
  3. 用户口头指定也要验证:即使用户说「去看某某类」,仍应先打开/搜索仓库确认实现,再结合 trace 判断,避免复述用户猜测。

不在仓库场景(仅有纯文本 trace、无代码)时:只做 trace 级结论,并明确「无法做代码侧验证」。

输入契约(先判定再分析)

最小可分析输入(满足其一)

  1. ----- pid N at ... + Cmd line: ... + 至少一段线程栈;或
  2. DALVIK THREADS + "main" 线程块;或
  3. Waiting Channels + 可匹配到同 pid 的线程信息。

可选增强输入

  • Subject: / Reason: / ANR in
  • Load: / CPU usage from ...
  • Binder transaction 或 lock 文本(waiting to lock / held by tid
  • Perfetto 系统 trace.perfetto-trace):与栈文本 互补(调度、log、时间线);采集流程见本仓库 android-perfetto-capture(含 ANR 不定时 的长看守配置);本 skill 仍以 bugreport / traces.txt 栈与锁链 为主证据。

降级策略

  • Reason/CPU:允许分析,但必须在结论中标注“仅基于 stack 证据”。
  • 缺主线程块:只输出候选根因,不输出确定性根因。
  • 无法完成 pid 对齐:先输出“输入不足”,列出需补充字段。

通用分析流程(必须按顺序)

  1. 锁定目标进程

    • 先从 ANR in/Subject/Reason(若存在)找目标包名或 pid。
    • 再用 ----- pid N atCmd line 交叉确认,避免误把 system_server 当主因进程。
  2. 定位主线程与状态

    • 在目标 pid 范围内找 "main" 或主线程对应 sysTid
    • 提取状态:Runnable / Native / Blocked / Waiting
    • 记录栈顶 5~15 帧中的关键调用路径(框架层 + 业务层)。
  3. 建立阻塞链

    • 锁链:waiting to lock <obj> -> held by tid -> 持锁线程栈。
    • Binder 链:binder_thread_read / IPCThreadState -> 对端进程/服务线程。
    • I/O 链:read/write/open/ioctl + JNI/业务方法,判断是否在主线程路径。
  4. 环境压力校验

    • 若有 Load/CPU usage,区分“系统级算力饥饿”与“业务线程阻塞”。
    • 无 CPU 段时,不得给出“CPU 饱和”确定结论。
  5. 根因归类

    • Input:输入分发/绘制/主线程消息循环路径被阻塞。
    • Broadcast/ServiceActivityThread 的 receiver/service 处理超时路径。
    • Watchdog:系统关键线程长时间无响应(常见于系统进程)。
    • 类型判断若证据不足,输出 Unknown(证据不足)

Read the full file on GitHub · 151 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 11d ago First seen · 151 lines · 64 tokens per session scan A fdc62e4711f2

Subscribe to this mod's changes

parsing-android-anr-expert is a skill published in the GitHub repository ttdazi/AndroidAISkills (5 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 64 tokens to every session and 2,260 once invoked, about $0.0003 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-31.

Related

Other skills, from other repositories

ios-fix

Autonomous iOS bug fixer. (gstack).

garrytan/gstack · 15 tokens

google-mobile-ads-validate

Validates a project's Google Mobile Ads (GMA) SDK integration for iOS, Android, or Unity projects. Use when conducting a full pre-launch audit of an app that integrates GMA SDK or when validating any individual GMA SDK integration checks, such as when validating ad unit IDs and ad formats, SKAdNetwork IDs, mediation…

google/skills · 84 tokens

competition-ios-runtime

Internal downstream skill for ctf-sandbox-orchestrator. CTF-sandbox workflow for IPA runtime analysis, Frida hooks, Objective-C or Swift method tracing, Keychain inspection, SSL pinning bypass, URL scheme handling, and iOS request-signing recovery. Use when the user asks to hook an IPA, trace Objective-C or Swift…

zhaoxuya520/reverse-skill · 123 tokens

swiftui-performance-audit

SwiftUI performance: render, scroll, CPU/memory, updates, layout, Instruments.

steipete/agent-scripts · 24 tokens

android-tombstone-symbolication

Symbolicate the .NET runtime frames in an Android tombstone file. Extracts BuildIds and PC offsets from the native backtrace, downloads debug symbols from the Microsoft symbol server, and runs llvm-symbolizer to produce function names with source file and line numbers. USE FOR triaging a .NET MAUI or Mono Android app…

dotnet/skills · 176 tokens

node-connect

Diagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps. Use when QR/setup code/manual connect fails, local Wi-Fi works but VPS/tailnet does not, or errors mention pairing required, unauthorized, bootstrap token invalid or expired, gateway.bind, gateway.remote.url, Tailscale…

the-open-agent/openagent · 81 tokens