android-network-bug-debugger

Diagnose Android network bugs across request lifecycle, auth, retry, parsing, and concurrency layers.

1|Updated Jun 27, 2026
One-click install
npx skills add https://github.com/TE-QuanBZhang/skills-pool --skill android-network-bug-debugger-te-quanbzhang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-network-bug-debugger
Source: https://github.com/TE-QuanBZhang/skills-pool/tree/main/ai-coding/skills/android-network-bug-debugger
Command: npx skills add https://github.com/TE-QuanBZhang/skills-pool --skill android-network-bug-debugger-te-quanbzhang

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Android network bugs like intermittent loading failures, token refresh loops, and stale responses overwriting newer UI state are hard to trace because they span transport, auth, parsing, caching, and concurrency layers. This Skill provides a structured workflow to classify the failure type, trace the full request lifecycle, and recommend robust fixes with regression tests. ## Core Features & Use Cases - Failure Classification: Categorizes bugs as connectivity, timeout, TLS, auth, server error, parsing, caching, concurrency, duplicate request, or offline UX issues. - Request Lifecycle Tracing: Inspects the path from trigger point through repository, interceptors, auth refresh, parser, and UI state update, with optional CodeGraph integration for code exploration. - Fix Recommendations & Validation: Suggests patterns like single-flight token refresh, idempotent retries, stale-result protection, and defines tests for airplane mode, slow networks, expired tokens, and out-of-order responses. - Use Case: A user reports that the app shows stale data after a pull-to-refresh on a weak network. Use this Skill to trace the request path, identify a race where an old response overwrites newer state, and get a fix plus regression test plan. ## Quick Start Debug this Android bug where the screen shows outdated data after retrying a failed API request on a slow network.

Frequently Asked Questions about android-network-bug-debugger

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug Android network request failures?

Start by classifying the failure as connectivity, timeout, TLS, auth, server error, parsing, caching, or concurrency related. Then trace the request lifecycle from the trigger point through the repository, OkHttp interceptors, parser, and UI state update to locate the root cause.

How to fix token refresh race conditions in Android?

Serialize token refresh using a single-flight pattern so concurrent requests share one refresh call instead of racing. Avoid blocking the main thread during refresh and ensure failed refresh attempts do not trigger infinite retry loops.

Why does my Android app show stale data after a network retry?

Stale data appears when a slow older response arrives after a newer request and overwrites the current UI state. Fix this with stale-result protection that ignores responses from obsolete requests and clears loading state on success, failure, and cancellation.

Does this debugging workflow work with any Android project?

Yes, it works with any Android project using common stacks like OkHttp, Retrofit, and coroutines. CodeGraph integration is optional; if it returns no results, fall back to rg or grep for manual request-flow searching.

What are the limitations of CodeGraph for Android network debugging?

CodeGraph does not reliably index AndroidManifest.xml, Gradle build scripts, or XML resources like base URLs in string resources. For bugs involving manifest config or dependency versions, supplement with manual searches on AndroidManifest.xml and build.gradle files.