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

Audit ProGuard/R8 keep-rule impact on Android shrinking and obfuscation.

5|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/fornewid/android-developers-changelog --skill https-developer-android-com-agents-skills-performance-r8-analyzer-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: https://developer.android.com/agents/skills/performance/r8-analyzer/skill
Source: https://github.com/fornewid/android-developers-changelog/tree/main/docs/agents/skills/performance/r8-analyzer
Command: npx skills add https://github.com/fornewid/android-developers-changelog --skill https-developer-android-com-agents-skills-performance-r8-analyzer-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you identify which ProGuard/R8 keep rules unnecessarily block optimizations, so your Android app can reclaim shrinking, obfuscation, and optimization opportunities.

Core Features & Use Cases

  • Configuration validation: Checks Gradle and R8 settings for common performance blockers (e.g., AGP version, full mode flags).
  • Quantitative analysis path: Uses the R8 configuration analyzer to generate an evidence-based report of keep-rule impact when the R8 version meets requirements.
  • Heuristic fallback path: When quantitative analysis isn’t possible, evaluates keep rules manually for redundancy and breadth using provided reference guidance.
  • Strict reporting output: Produces a raw Markdown report following the required report schema for consistent review and tracking.

Use Case: You have a large proguard-rules.pro and want to remove or refine keep rules that are reducing R8 effectiveness, while ensuring reflective and runtime-loaded code still works.

Quick Start

Ask the skill to analyze your project’s R8 configuration and keep rules and return the strict Markdown report with optimization, obfuscation, and shrinking impact.

Frequently Asked Questions about https://developer.android.com/agents/skills/performance/r8-analyzer/skill

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

FAQPage Schema
How do I identify which ProGuard or R8 keep rules are blocking Android build optimization?

You can audit your R8 configuration to quantify keep-rule impact on shrinking, obfuscation, and optimization. By scanning Gradle files and analyzing build output artifacts, this approach pinpoints unnecessary ProGuard or R8 keep rules that reduce optimization effectiveness in release builds.

What is a quantitative R8 configuration analyzer and when is it needed?

A quantitative R8 configuration analyzer is a tool that generates evidence-based reports of keep-rule impact on code shrinking. It is needed when you want to remove or refine broad keep rules in your proguard-rules.pro file to reclaim optimization opportunities while ensuring runtime-loaded code still works.

Does the R8 analyzer work with older Android Gradle Plugin versions or unsupported R8 versions?

When quantitative analysis is not possible due to unsupported R8 versions, a heuristic fallback evaluates keep rules manually for redundancy and breadth. It checks Gradle settings for common performance blockers like AGP version and full mode flags to guide configuration improvements.

How do I audit my Android release configuration for shrinking and obfuscation performance?

You audit release configuration by scanning Gradle files and flags to validate settings, then generating analysis output artifacts. This produces a strictly formatted raw Markdown report detailing optimization, obfuscation, and shrinking impacts caused by your current keep rules.

What are the limitations of using heuristic rule-review for R8 keep rules?

Heuristic rule-review relies on manual evaluation of redundancy and breadth using reference guidance rather than generating evidence-based quantitative analysis. This fallback is used only when the R8 version does not support the quantitative configuration analyzer path.