android-bug-hunting-compose-correctness

Detect runtime defects and antipatterns in Jetpack Compose Kotlin code.

Updated Jan 2, 2024
One-click install
npx skills add https://github.com/Mithrandir21/game-deals-android-app --skill android-bug-hunting-compose-correctness
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-bug-hunting-compose-correctness
Source: https://github.com/Mithrandir21/game-deals-android-app/tree/main/.claude/skills/android-bug-hunting-compose-correctness
Command: npx skills add https://github.com/Mithrandir21/game-deals-android-app --skill android-bug-hunting-compose-correctness

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Detects runtime defects and antipatterns in Jetpack Compose code that lead to UI bugs such as duplicated effects, stale state, and unnecessary recomposition.

Core Features & Use Cases

  • Bug Detection in Compose Functions: Scans code for common antipatterns like side effects outside effect handlers and improper state reads.
  • Code Auditing for Best Practices: Evaluates use of LaunchedEffect, rememberSaveable, and collectAsState to prevent common mistakes.
  • Use Case: When a developer encounters unexpected UI flickering or repeated network calls during recomposition, this skill identifies problematic patterns causing the issues.

Quick Start

Run the analyzer to scan project files for Compose problems and generate a report highlighting potential defects.

Frequently Asked Questions about android-bug-hunting-compose-correctness

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

FAQPage Schema
How do I find Jetpack Compose antipatterns causing UI flickering and unnecessary recomposition?

You can detect Compose UI bugs through static code analysis, which scans Kotlin source files to identify antipatterns like improper state reads and side effects outside effect handlers that cause duplicated effects and unnecessary recomposition.

What causes stale state and duplicated effects in Jetpack Compose functions?

Stale state and duplicated effects in Compose functions are caused by misusing state holders and effect handlers. Static analysis detects these antipatterns by evaluating API usage like `LaunchedEffect` and `collectAsState` against best practices.

Can I use static analysis to audit my Android app for improper use of LaunchedEffect and rememberSaveable?

Yes, this static analysis approach audits Kotlin code by evaluating the use of `LaunchedEffect` and `rememberSaveable` to prevent common mistakes that lead to runtime defects and app instability.

What is the best way to scan a Kotlin project for Compose performance issues?

The best way to scan for Compose performance issues is to run a static analyzer that applies pattern detection to Kotlin source files, generating a report that highlights design defects and common antipatterns affecting app stability.

Does static code analysis work for detecting repeated network calls during Compose recomposition?

Yes, static code analysis works for detecting repeated network calls during recomposition by identifying problematic Compose patterns where side effects are improperly placed outside designated effect handlers.

When do I need static analysis for Android Compose codebases?

You need static analysis for Android Compose codebases when you encounter unexpected UI bugs, duplicated effects, or stale state. It ensures best practices are followed for UI stability and efficiency during development.