r8-analyzer

Analyze Android R8 keep rules for redundancies and broad package-wide rules.

4|Updated Jun 10, 2026
One-click install
npx skills add https://github.com/mymx2/foreman --skill r8-analyzer-mymx2
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: r8-analyzer
Source: https://github.com/mymx2/foreman/tree/main/.qoder/skills.collected/skills/r8-analyzer
Command: npx skills add https://github.com/mymx2/foreman --skill r8-analyzer-mymx2

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires python, protobuf, and includes references (resource) components.

What problem does it solve?

This skill addresses the bloat caused by overly broad or redundant R8 keep rules, which prevent the Android compiler from effectively shrinking, obfuscating, and optimizing your application code.

Core Features & Use Cases

  • Quantitative Analysis: Uses R8 configuration analyzer data to generate precise impact scores for your keep rules.
  • Heuristic Recommendations: Provides actionable advice on removing redundant rules for standard libraries like Gson, Retrofit, and Room.
  • Use Case: When your release build size is unexpectedly large, use this skill to identify which ProGuard rules are preventing the removal of unused classes or methods and refine them for a smaller, faster app.

Quick Start

Use the r8-analyzer skill to inspect the current build configuration and generate a report on redundant keep rules.

Frequently Asked Questions about r8-analyzer

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

FAQPage Schema
Why does my Android app size stay large even after enabling R8 shrinking?

Overly broad or redundant R8 keep rules prevent the Android compiler from effectively shrinking and obfuscating your application code. Analyzing your build files identifies which ProGuard rules are blocking the removal of unused classes.

How do I find redundant ProGuard keep rules in my Android project?

You can find redundant ProGuard keep rules by analyzing Android build files and R8 configuration data to identify broad package-wide rules and configurations that subsume library consumer keep rules, generating precise impact scores.

Do I need Python to analyze R8 keep rules for my Android build?

Yes, analyzing R8 keep rules requires Python and protobuf support to process the R8 configuration analyzer output and generate actionable optimization reports for your Android project.

What is the best way to optimize ProGuard rules for standard libraries like Gson and Retrofit?

The best way to optimize ProGuard rules for standard libraries like Gson and Retrofit is to use heuristic recommendations generated from quantitative R8 analysis data to remove redundant keep rules.

Can R8 configuration analysis identify keep rules that subsume library consumer rules?

Yes, R8 configuration analysis can identify rules that subsume library consumer keep rules by inspecting your Android build configuration and detecting broad package-wide rules that prevent code optimization.

When should I not use broad package-wide keep rules in my Android project?

You should not use broad package-wide keep rules when your release build size is unexpectedly large, as these rules prevent the Android compiler from removing unused classes or methods during the shrinking process.