https://developer.android.com/agents/skills/r8-analyzer/skill

Community

Refine ProGuard keep rules for safer shrinking

Authorfornewid
Version1.0.0
Installs0

System Documentation

What problem does it solve?

R8/ProGuard keep rules often grow overly broad and prevent effective shrinking, leading to larger APKs and weaker optimization while still risking broken runtime behavior.

Core Features & Use Cases

  • Detects redundant and harmful keep rules: Flags library-wide keep patterns (e.g., AndroidX/Kotlin) that are typically unnecessary because dependencies ship their own consumer rules.
  • Refines keep rules using an impact hierarchy: Evaluates remaining rules and identifies broader rules that can be narrowed to reduce code retention.
  • Guides reflective retention precisely: Inspects code and adjacent usage patterns to suggest narrow keep rules aligned to reflection scenarios.

Quick Start

Run the r8-analyzer on your project to generate an R8 keep-rule analysis report and actionable removal/refinement recommendations.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: https://developer.android.com/agents/skills/r8-analyzer/skill
Download link: https://github.com/fornewid/android-developers-changelog/archive/main.zip#https-developer-android-com-agents-skills-r8-analyzer-skill

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.