/android-r8-analyzer:r8-analyzerfrom android-r8-analyzer
Analyzes Android R8/ProGuard keep rules to find redundancies, broad package-wide rules, and rules that subsume library consumer keep rules. Helps optimize app size and troubleshoot shrinking configurations.
Ships in android-r8-analyzer. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
build.gradle, build.gradle.kts, and gradle.properties.optimization {} DSL and the Configuration Analyzer task.android.enableR8.fullMode=false is removed from the gradle.properties file.Inspect build.gradle, build.gradle.kts, settings.gradle, settings.gradle.kts, gradle.properties, and libs.versions.toml to get the AGP and R8 versions. An R8 version pinned in settings.gradle(.kts) replaces the R8 bundled with AGP.
Find the app module (usually app) and a build variant with R8 enabled (usually release). The following commands use them as <module> and <Variant>, for example :app:minifyReleaseWithR8.
The helper scripts are in this skill's scripts/ directory. In the following
commands, <skill_dir> is this skill's directory. Run every command from the
project root.
If AGP >= 9.3.0 : Proceed to Path A (Standalone Task).
If AGP < 9.3.0 : Proceed to Path B (Quantitative).
protobuf package 6.33.4 or later are mandatory (used by scripts/keep_radius_pb2.py). Install it with pip install "protobuf>=6.33.4"; versions lower than 6.33.4 fail on import with a VersionError or ImportError../gradlew :<module>:analyze<Variant>R8Config (for example, ./gradlew :app:analyzeReleaseR8Config). It generates the report in <module>/build/reports/r8/ (for example, app/build/reports/r8/r8-config-analyzer-release.pb). You must wait for this command to finish before proceeding.scripts/convert_pb_to_json.py as python3 <skill_dir>/scripts/convert_pb_to_json.py with arguments <module>/build/reports/r8 and tmp/keepradius/keepruleradius.json. Wait for this command to finish.scripts/analyze.py by executing python3 <skill_dir>/scripts/analyze.py tmp/keepradius/keepruleradius.json. This outputs tmp/keepradius/analysis_result.txt. Wait for this command to finish.protobuf package 6.33.4 or later are mandatory: pip install "protobuf>=6.33.4".settings.gradle(.kts) to 9.4.34 or later (so R8 generates the report), generate the proto report in tmp/r8analysis/, convert it to tmp/r8analysis/keepruleradius.json, analyze the result, and revert the temporary settings.gradle(.kts) change.tmp/r8analysis/analysis_result.txt for scores and rule impact metrics.tmp/keepradius/analysis_result.txt if using Path A, or tmp/r8analysis/analysis_result.txt if using Path B.tmp/ (analysis output, the settings backup, and any scratch scripts), and never write the report to a file. The one exception is the temporary R8 classpath in settings.gradle(.kts) that Path B needs when the project doesn't already pin R8 9.4.34 or later: ask the user first when running interactively, and revert it after the analysis (see references/FULL_BUILD_CONFIG_ANALYZER.md). If that change is needed but the user says no, or asks you not to edit build files, report rule-level and build file findings without scores and say why.N/A% as a score.references/CONFIGURATION.md (opens in a new tab)references/FULL_BUILD_CONFIG_ANALYZER.md (opens in a new tab)references/INSPECT-RULES.md (opens in a new tab)references/REPORT_FORMAT.md (opens in a new tab)references/android/topic/performance/app-optimization/enable-app-optimization.md (opens in a new tab)scripts/analyze.py (opens in a new tab)scripts/convert_pb_to_json.py (opens in a new tab)scripts/keep_radius_pb2.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub premex-ab/claude-marketplace --plugin android-r8-analyzer3 plugins ship this exact skill · first indexed Oct 29, 2026
Other plugins' skills for the same job