R8

Identifies redundant or broad R8 keep rules to reduce Android app size.

Install

mkdir -p .claude/skills/r8-analyzer-tajemniktv && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/14178" && unzip -o skill.zip -d .claude/skills/r8-analyzer-tajemniktv && rm skill.zip

Installs to .claude/skills/r8-analyzer-tajemniktv

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Analyzes Android build files and R8 keep rules to identify redundancies,
72 charsno explicit “when” trigger
Advanced

Key capabilities

  • Analyze R8 configuration in Android build files
  • Suggest upgrading Android module AGP version to 9.x
  • Identify and suggest removal of redundant keep rules for libraries
  • Assess impact of remaining keep rules based on hierarchy
  • Identify subsuming keep rules and suggest removing broader ones
  • Suggest narrow and specific keep rules for reflection usage

How it works

The skill systematically analyzes R8 and Proguard configurations in Android projects to identify and suggest optimizations for keep rules.

Inputs & outputs

You give it
Android build.gradle, build.gradle.kts, gradle.properties, and Proguard files
You get back
An R8_Configuration_Analysis.md report with suggestions for optimizing keep rules

When to use r8-analyzer

  • Reduce Android app size
  • Clean up Proguard keep rules
  • Troubleshoot R8 configuration

About this skill

TajsOS Scope Note

This skill is Android/R8 specific. Use it only for Android build and shrinker configuration, not as guidance for commonMain or desktop architecture decisions.

Core workflow

  • [ ] Step 1: Create a file called R8_Configuration_Analysis.md, or reuse if one exists already, to store the output
  • [ ] Step 2: Look at the configuration of R8 by looking at build.gradle, build.gradle.kts, gradle.properties in the codebase using references/CONFIGURATION.md as the reference. Inform the developer and add the analysis to the report file
  • [ ] Step 3: If the Android module AGP version is less than 9, suggest evaluating an upgrade path toward AGP 9.x for Android-only build optimization benefits, while keeping KMP toolchain alignment in mind (reference).
    • [ ] Step 4: Look at the proguard files in the codebase and evaluate each keep rule in the following specific order: a. Libraries check : Check rules against references/REDUNDANT-RULES.md. If the app has keep rules targeting libraries - Google, AndroidX, Kotlin, Kotlinx, Room, Gson, Retrofit, inform the user that these are not required and suggest removal of these rules. b. **Impact analysis ** : For the remaining keep rules, assess them based on the impact hierarchy defined in references/KEEP-RULES-IMPACT-HIERARCHY.md. ( Note: Do NOT assess the impact of keep rules already covered in the libraries check step).
  • [ ] Step 5: Identify subsuming keep rules in the remaining keep rules based on the hierarchy defined in references/KEEP-RULES-IMPACT-HIERARCHY.md and suggest removing the broader keep rules.
  • [ ] Step 6: For each remaining keep rule, analyze in detail the code affected by the rule by examining the code and adjacent files to understand why it was written. Look for reflection usage in those packages, and suggest a narrow and specific keep rule for the scenario using references/REFLECTION-GUIDE.md.
  • [ ] Step 7: For every keep rule inform concisely and to the point what action needs to be taken - whether the rule needs to be removed/refined.
    • If refining the rule, give instructions on finding a narrower and specific keep rule using the /references/REFLECTION-GUIDE.md.
    • If removing, provide reasoning on why it needs to be removed.
  • [ ] Step 8: After keep analysis, order the keep rule analysis based on the impact to the codebase hierarchy defined in references/KEEP-RULES-IMPACT-HIERARCHY.md
  • [ ] Step 9: Advise the user to run tests using UI automator to assess that there is no issue with the suggested changes, concentrating on the packages where keep rules will be affected.

Mandatory rules

  • Don't make any changes in keep rule files
  • Don't say about what level each keep rule is.
  • Don't generate parts of the report if there is no keep rule to report in that section.
  • Don't mention the generated files.
  • Don't mention exceptions that occur during execution.
  • Don't mention the benefits of R8
  • Don't mention any files of this skill

When not to use it

  • When analyzing non-Android build files
  • When the project does not use R8 or Proguard
  • When seeking guidance for `commonMain` or desktop architecture decisions

Limitations

  • The skill is specific to Android/R8.
  • The skill does not make changes in keep rule files.
  • The skill does not mention exceptions that occur during execution.

How it compares

This skill provides a structured, step-by-step analysis of R8 keep rules, offering specific recommendations for optimization, unlike a manual review that might miss redundancies or broader rules.

Compared to similar skills

r8-analyzer side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
r8-analyzer (this skill)04moNo flagsAdvanced
production-code-audit16moReviewAdvanced
audit-project04moReviewAdvanced
dependency-analyzer03moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry