r8-analyzer
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.zipInstalls 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,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
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.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| r8-analyzer (this skill) | 0 | 4mo | No flags | Advanced |
| production-code-audit | 1 | 6mo | Review | Advanced |
| audit-project | 0 | 4mo | Review | Advanced |
| dependency-analyzer | 0 | 3mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by tajemniktv
View all by tajemniktv →You might also like
production-code-audit
davila7
Autonomously deep-scan entire codebase line-by-line, understand architecture and patterns, then systematically transform it to production-grade, corporate-level professional quality with optimizations
audit-project
agent-sh
Use when user asks to 'review my code', 'audit the codebase', 'run code review', 'check for issues', 'find bugs', 'security review', 'performance review', or wants multi-agent iterative review. Spawns role-based reviewers (code-quality-reviewer, security-expert, performance-engineer, test-quality-gu
dependency-analyzer
InugamiDev
Dependency tree analysis, version conflict resolution, update planning, and bundle size optimization
superpowers-review
anthonylee991
Reviews changes for correctness, edge cases, style, security, and maintainability with severity levels (Blocker/Major/Minor/Nit). Use before finalizing changes.
contrib-pr-review
homeassistant-ai
Review a contribution PR for safety, quality, and readiness. Checks for security concerns, test coverage, size appropriateness, and intent alignment. Use when reviewing external contributions.
tech-debt
vm0-ai
Technical debt management - scan codebase for bad smells and create tracking issues