r8-shrink-pro

r8-shrink-pro is a skill for Claude Code from kelvinkosbab/AppBootstrapAI. It costs 87 tokens per session (1,561 once invoked), scanned A, original, MIT.

An Android build-configuration reviewer for R8 and ProGuard, tools that remove unused code, optimize release builds, and rename code to make it harder to inspect. It checks rules that must preserve code used indirectly, such as through reflection.

In plain words
What is it for?
Use it to review R8 and ProGuard files, library consumer rules, reflection-related setup for libraries such as Room or Retrofit, mapping-file handling, and release-only missing-class crashes.
Why use it?
It helps avoid oversized release apps, overly broad keep rules, and crashes that appear only after code shrinking or obfuscation. It also checks whether crash stack traces can be decoded later.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it to review R8 and ProGuard files, library consumer rules, reflection-related setup for libraries such as Room or Retrofit, mapping-file handling, and release-only missing-class crashes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kelvinkosbab/appbootstrapai/r8-shrink-pro
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add kelvinkosbab/AppBootstrapAI --skill r8-shrink-pro
Clone the repo
git clone --depth 1 https://github.com/kelvinkosbab/AppBootstrapAI

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for r8-shrink-pro

README.md
[![agentmods](https://agentmods.dev/badge/skills/kelvinkosbab/appbootstrapai/r8-shrink-pro/github.svg)](https://agentmods.dev/skills/kelvinkosbab/appbootstrapai/r8-shrink-pro)
Your own site
<a href="https://agentmods.dev/skills/kelvinkosbab/appbootstrapai/r8-shrink-pro"><img src="https://agentmods.dev/badge/skills/kelvinkosbab/appbootstrapai/r8-shrink-pro/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for r8-shrink-pro

Your own site · 80×15
<a href="https://agentmods.dev/skills/kelvinkosbab/appbootstrapai/r8-shrink-pro"><img src="https://agentmods.dev/badge/skills/kelvinkosbab/appbootstrapai/r8-shrink-pro.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 87 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,561 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00087 $0.01561
Opus 5.5 $0.00035 $0.00624
Sonnet 5.5 $0.00017 $0.00312
Haiku 4.5 $0.00009 $0.00156

Measured 2mo ago against content hash 9d8bdb6612b6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

r8-shrink-pro scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/r8-shrink-pro/SKILL.md · 98 lines

How it starts

The opening of the file, as written. The whole thing — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Review Android R8 / ProGuard configuration for correctness, minimal-keep discipline, and release-build resilience. R8 is the default code shrinker in AGP 8.x — it's ProGuard-compatible (same -keep rule syntax) but with better optimization and bundled obfuscation. Report only genuine problems; don't add -keep rules speculatively.

Review process:

  1. Frame what R8 is doing using references/fundamentals.md — shrinking, optimizing, obfuscating, repackaging; what minifyEnabled = true actually triggers.
  2. Validate -keep rule discipline using references/keep-rules.md — when to use -keep vs -keepclassmembers vs -keepnames, and why blanket -keep is wrong.
  3. For library modules, check consumer-rules.pro using references/consumer-rules.md — what libraries owe their consumers.
  4. Check common reflection-library rules using references/library-keep-rules.md — Moshi, Room, Retrofit, Hilt, Glide, kotlinx-serialization.
  5. Validate mapping-file workflow using references/mapping-files.md — keeping mapping.txt, deobfuscating stack traces, Crashlytics integration.
  6. Diagnose release-build crashes using references/common-crashes.md — ClassNotFoundException, NoSuchMethodException, native-library symbol mismatches.

If doing a partial review, load only the relevant reference files.

Core Instructions

  • R8 is default in AGP 3.4+. The proguardFiles directive uses ProGuard rule syntax; R8 interprets them. There's no separate "use R8" flag — minifyEnabled = true turns it on.
  • Default to proguard-android-optimize.txt + your proguard-rules.pro. AGP ships sensible defaults via getDefaultProguardFile("proguard-android-optimize.txt").
  • Library modules use consumer-rules.pro, not proguardFiles. Rules in consumer-rules.pro are inherited by every consumer that depends on the library. See consumer-rules.md.
  • -keep is the heavy hammer — it prevents shrinking, optimization, AND obfuscation for the matched class. Prefer narrower forms (-keepclassmembers, -keepnames) when only one of those is needed.
  • Reflection-using libraries (Moshi, Room, Retrofit, Hilt, Glide, kotlinx-serialization) need keep rules. Most ship their own consumer-rules.pro, but some (or custom uses) require app-level additions.
  • Always test release builds with minifyEnabled = true before shipping. Many R8 crashes only surface in release.
  • Keep the mapping.txt from every release. Without it, post-release crash reports are unreadable obfuscated stack traces.

Read the full file on GitHub · 98 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 98 lines · 87 tokens per session scan A 9d8bdb6612b6

Subscribe to this mod's changes

r8-shrink-pro is a skill published in the GitHub repository kelvinkosbab/AppBootstrapAI (8 stars, last pushed today), licensed MIT. It adds 87 tokens to every session and 1,561 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

r8-shrink-pro compared with skills from other repositories

r8-shrink-pro next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
r8-shrink-prokelvinkosbab/AppBootstrapAISkill8todayMITA87Claude Code
kmp-glassmorphism-uiAks-4125/kmp-glassmorphism-skillSkill53mo agoMITA81Claude Code, Codex
argent-settings-permissionssoftware-mansion/argentSkill3.2kyesterdayApache-2.0A140Claude Code, Codex
argent-react-native-optimizationsoftware-mansion/argentSkill3.2kyesterdayApache-2.0A71Claude Code, Codex
mobile-automationmobile-next/mobile-mcpSkill10k4d agoApache-2.0A58Claude Code, Codex
sceneviewsceneview/sceneviewSkill1.4kyesterdayApache-2.0A156Codex
argent-tv-interactsoftware-mansion/argentSkill3.2kyesterdayApache-2.0A107Claude Code, Codex