Przejdź do treści
Biblioteka skilli
Programowanie · Przegląd i audyt

r8-analyzer

/r8-analyzer

Analizuje pliki budowania Androida i reguły keep R8, wskazując redundancje, zbyt szerokie reguły pakietowe i reguły obejmujące reguły biblioteczne, aby zmniejszyć aplikację i naprawić konfigurację Proguard.

Repozytorium
kmp-ios-skills ↗
Licencja
MIT
Ostatnia zmiana repozytorium
25.08.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
9
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 25.08.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Analizuje pliki budowania Androida i reguły keep R8, wskazując redundancje, zbyt szerokie reguły pakietowe i reguły obejmujące reguły biblioteczne, aby zmniejszyć aplikację i naprawić konfigurację Proguard.

Oryginalny opis (EN)

Analyzes Android build files and R8 keep rules to identify redundancies, broad package-wide rules, and rules that subsume library consumer keep rules. Use when developers want to optimize their app's size, remove redundant or overly broad keep rules, or troubleshoot Proguard configurations.

Jak działa

  1. Step 1. Setup and configuration check
  2. Step 2. Analysis path selection
  3. Step 3. Report generation
  4. Constraints
Sekcje z nagłówków SKILL.md, w oryginale · 52 linii, 489 słów
Podgląd SKILL.md
---
name: r8-analyzer
description: Analyzes Android build files and R8 keep rules to identify redundancies,
  broad package-wide rules, and rules that subsume library consumer keep rules. Use
  when developers want to optimize their app's size, remove redundant or overly broad
  keep rules, or troubleshoot Proguard configurations.
license: Complete terms in LICENSE.txt
metadata:
  author: Google LLC
  last-updated: '2026-08-15'
  keywords:
  - R8
  - proguard
  - keep rules
  - app size
  - optimization
---

## Step 1. Setup and configuration check

- Inspect `build.gradle`, `build.gradle.kts`, and `gradle.properties`.
- Use [references/CONFIGURATION.md](references/CONFIGURATION.md) to identify missing optimizations.
- **AGP** : If version is lower than 9.0, suggest migration to 9.0 for [build-time performance improvement](references/android/topic/performance/app-optimization/enable-app-optimization.md).
- **Full Mode** : Verify `android.enableR8.fullMode=false` is removed from gradle.properties.

## Step 2. Analysis path selection

- Inspect `build.gradle`, `build.gradle.kts`, and `gradle.properties` and
  `libs.versions.toml` to get the AGP and R8 versions.

- **If AGP \>= 9.3.0** : Proceed to **Path A (Standalone Task)**.

- **If AGP \< 9.3.0 and R8 \>= 9.3.7-dev** : Proceed to **Path B (Quantitative)**.

- If none of the conditions are met, proceed to **Path C (Heuristic)**.

### Path A: Standalone Gradle task (AGP \>= 9.3.0)

- **Step 1: Run standalone task** : Run `./gradlew :app:analyzeReleaseR8Config` to evaluate the R8 configuration. You MUST wait for this command to finish before proceeding.
- **Step 2: Convert and analyze** : The report is generated at `app/build/reports/r8/r8-config-analyzer-release.pb`. Convert it to JSON and analyze it using the conversion and analysis scripts in [references/CONFIGURATION-ANALYZER.md](references/CONFIGURATION-ANALYZER.md), producing `analysis_result.txt`. Wait for each command to finish.

### Path B: Quantitative data generation (R8 \>= 9.3.7-dev and AGP \< 9.3.0)

- **Step 1: Check requirements** : Python and `protobuf` package are mandatory.
- **Step 2: Generate and analyze** : You MUST run the shell commands described in [references/CONFIGURATION-ANALYZER.md](references/CONFIGURATION-ANALYZER.md) to generate the proto file using R8 configuration analyzer, convert it to JSON and analyze the result.
- **Step 3: Analyze** : You MUST ensure the analysis produces `analysis_result.txt` for scores and rule impact metrics.

### Path C: Heuristic evaluation and recommendation (R8 \< 9.3.7-dev)

*(Use ONLY if quantitative data generation is not possible)*

- **Step 1: Manual evaluation** : Inspect `proguard-rules.pro`.
- **Step 2: Library check** : Compare rules against [references/REDUNDANT-RULES.md](references/REDUNDANT-RULES.md). Suggest **Remove** for bundled rules.
- **Step 3: Custom rule check** : Use [references/KEEP-RULES-IMPACT-HIERARCHY.md](references/KEEP-RULES-IMPACT-HIERARCHY.md) and [references/REFLECTION-GUIDE.md](references/REFLECTION-GUIDE.md) to prioritize and evaluate. Suggest **Refine** for broad rules (for example, package-wide).
- **Step 4: Validation** : Suggest Macrobenchmark tests using [UI Automator](references/android/training/testing/other-components/ui-automator.md) for any proposed changes. Proceed to Step 3.

## Step 3. Report generation

- **Format** : Follow [references/REPORT_FORMAT.md](references/REPORT_FORMAT.md) strictly.
- **Input**: Extract metrics (Scores, Impacts, Example Classes) directly from generated file analysis_result.txt if using Path A or B, or from manual findings if using Path C.
- **Output** : Output ONLY the raw Markdown report in the chat. Do NOT output conversational filler (for example, "Here is your report..."). Do NOT provide recommendations, next steps, or any other text outside of the sections defined in [references/REPORT_FORMAT.md](references/REPORT_FORMAT.md) Do NOT mention the path used for analysis of the configuration

## Constraints

- **Strict output limit**: The final output MUST strictly be the Markdown report and nothing else.
- **No code changes**: Research and suggest only; Do not modify files.
- **No redundancy**: Do not explain R8 benefits or reference skill internal files in the report.
- **Focus**: Omit sections (for example, Subsumed Rules, Configuration) if no issues or items are found.
Pliki w paczce (9)
  • SKILL.md 4 KB
  • references/CONFIGURATION-ANALYZER.md 17 KB
  • references/CONFIGURATION.md 2 KB
  • references/KEEP-RULES-IMPACT-HIERARCHY.md 3 KB
  • references/REDUNDANT-RULES.md 8 KB
  • references/REFLECTION-GUIDE.md 4 KB
  • references/REPORT_FORMAT.md 2 KB
  • references/android/topic/performance/app-optimization/enable-app-optimization.md 16 KB
  • references/android/training/testing/other-components/ui-automator.md 14 KB

Wersje

RepozytoriumWynikLicencja
Ta strona · TalissonVitorino/kmp-ios-skills100MIT
android/skills100Apache-2.0
hamzabellouch/agent-skills100MIT
hanamizuki/solopreneur100MIT

Migawka bazy z 13.11.2026 · wersja paczki 700e4f1148d7 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100complexity-analyzer
    Analizuje złożoność cyklomatyczną i kognitywną, wskazując funkcje zbyt złożone i wymagające uproszczenia.
  • 95android-native
    Opisuje natywne API platformy Android poza UI: cykl życia Activity i Fragment, Keystore, BiometricPrompt, EncryptedSharedPreferences, WorkManager, NFC, usługi pierwszoplanowe, ContentProvider, App Links, reguły ProGuard/R8 i model uprawnień.
  • 100bundle-size-analyzer
    Analizuje rozmiar paczki (bundle) w projekcie frontendowym i pomaga znaleźć elementy, które ją powiększają.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.