r8-analyzer

Analyze Android build files and R8 keep rules to detect redundant preservation.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/soygabimoreno/Los-ANDROIDES --skill r8-analyzer-soygabimoreno
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: r8-analyzer
Source: https://github.com/soygabimoreno/Los-ANDROIDES/tree/main/.agents/skills/r8-analyzer
Command: npx skills add https://github.com/soygabimoreno/Los-ANDROIDES --skill r8-analyzer-soygabimoreno

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you identify redundant, overly broad, or subsuming R8 keep rules that prevent effective code shrinking, so you can reduce APK size and troubleshoot Proguard/R8 configurations.

Core Features & Use Cases

  • Configuration review: Inspects Gradle build files and gradle.properties to confirm R8 release optimization and resource shrinking settings are configured correctly.
  • Keep-rule auditing: Evaluates keep rules in a structured order, including library-consumer redundancies and an impact hierarchy to find unnecessary breadth.
  • Refinement guidance: Suggests narrower keep rules, flags reflection-driven scenarios, and recommends targeted actions to preserve only what’s required.

Quick Start

Run the r8-analyzer skill to analyze your codebase’s build configuration and Proguard/R8 keep rules and produce a keep-rule audit with removal/refinement recommendations.

Frequently Asked Questions about r8-analyzer

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

FAQPage Schema
Why does R8 keep rules not shrinking my Android app size as expected?

Overly broad R8 keep rules can prevent code shrinking by preserving unnecessary classes and members. An R8 keep-rule audit applies an impact hierarchy to detect subsuming rules and library-consumer redundancies that block the shrinker from removing code.

How do I find redundant Proguard keep rules in my Android build?

To find redundant Proguard keep rules, run an R8 keep-rule audit that evaluates your configuration in a structured order. The audit checks for library-consumer redundancies and applies an impact hierarchy to identify subsuming rules that unnecessarily preserve code.

Can I make my R8 keep rules narrower without breaking reflection?

Narrowing R8 keep rules safely requires proposing reflection-aware, targeted rules instead of broad preservation. An audit flags reflection-driven scenarios and recommends validating changes via UI testing to ensure reflection-dependent code remains functional.

What is the best way to troubleshoot why R8 is not removing my code?

Troubleshooting R8 not removing code requires inspecting Gradle build files and keep rules for overly broad preservation. An audit checks R8 release optimization settings and identifies subsuming rules that prevent effective code shrinking.

Do I need to check gradle.properties before optimizing R8 shrinking?

Checking gradle.properties is required before optimizing R8 shrinking to confirm release optimization and resource shrinking settings are configured correctly. A configuration review inspects these build files to ensure the environment supports effective code removal.

When should I not use broad keep rules in my Proguard configuration?

You should not use broad keep rules when they subsume narrower rules and block code shrinking. An R8 audit detects subsuming rules and library-consumer redundancies, proposing reflection-aware alternatives that preserve only what is required.