r8-analyzer

Analyze Android R8 configurations and keep rules to identify optimization blockers.

Updated Jun 26, 2026
One-click install
npx skills add https://github.com/yash-garg/pi-config --skill r8-analyzer-yash-garg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: r8-analyzer
Source: https://github.com/yash-garg/pi-config/tree/main/skills/r8-analyzer
Command: npx skills add https://github.com/yash-garg/pi-config --skill r8-analyzer-yash-garg

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps Android developers identify inefficient R8 and ProGuard configurations that block shrinking, optimization, and obfuscation, improving app size and build performance.

Core Features & Use Cases

  • R8 Configuration Analysis: Inspects Android build files, Gradle settings, and keep rules to detect optimization issues.
  • Keep Rule Optimization: Finds redundant, overly broad, or subsumed keep rules and suggests removal or refinement strategies.
  • Performance Troubleshooting: Analyzes R8 setup for app size optimization workflows and validates configuration quality with actionable reports.

Quick Start

Use the r8-analyzer skill to inspect my Android project configuration and generate a report on unnecessary or overly broad R8 keep rules.

Frequently Asked Questions about r8-analyzer

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

FAQPage Schema
How do I find redundant R8 keep rules in my Android project?

To find redundant R8 keep rules, inspect your Android Gradle build files and ProGuard configurations to identify overly broad or subsumed preservation rules that block code shrinking. Removing these unnecessary restrictions improves app size and build performance.

What is R8 code shrinking and how do keep rules affect Android app size?

R8 code shrinking removes unused code and resources to reduce Android app size, but keep rules explicitly preserve specified classes and members from removal. Overly broad keep rules prevent R8 from safely shrinking, optimizing, and obfuscating the codebase.

How do I troubleshoot ProGuard configuration issues blocking release build optimization?

Troubleshoot ProGuard configuration issues by analyzing R8 setup and evaluating keep rule impacts to detect optimization blockers. This process identifies inefficient rules that prevent code shrinking, generating a structured report for actionable refinement.

Can I analyze an existing Gradle project to detect subsumed ProGuard keep rules?

Yes, you can analyze an existing Gradle project to detect subsumed ProGuard keep rules by inspecting Android build files and evaluating R8 configurations. This analysis identifies redundant preservation rules and generates a structured report for optimization.

What's the best way to review Android release build configurations for app size reduction?

The best way to review Android release build configurations for app size reduction is to perform R8 configuration analysis and keep rule optimization. Evaluating rule impacts identifies optimization blockers and redundant preservation rules, yielding a structured Markdown report.

Why does my Android app size remain large after enabling R8 shrinking?

Your Android app size may remain large after enabling R8 shrinking due to overly broad keep rules blocking code shrinking and obfuscation. Analyzing R8 configurations identifies these redundant preservation rules and optimization blockers for targeted removal.