android-gradle-build-performance
Skill14 starsChanged 8 months agoMITView on GitHub
Diagnose and improve Android and Gradle build performance with scans, cache checks, and bottleneck audits.
In this repository68 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/android-architecture-clean.mdcCursor rule
- .cursor/rules/android-ci-cd-release-playstore.mdcCursor rule
- .cursor/rules/android-coil-compose.mdcCursor rule
- .cursor/rules/android-compose-accessibility.mdcCursor rule
- .cursor/rules/android-compose-foundations.mdcCursor rule
- .cursor/rules/android-compose-performance.mdcCursor rule
- .cursor/rules/android-compose-state-effects.mdcCursor rule
- .cursor/rules/android-compose-xml-interoperability.mdcCursor rule
- .cursor/rules/android-coroutines-flow.mdcCursor rule
- .cursor/rules/android-di-hilt.mdcCursor rule
- .cursor/rules/android-emulator-automation.mdcCursor rule
- .cursor/rules/android-gradle-build-logic.mdcCursor rule
- .cursor/rules/android-gradle-build-performance.mdcCursor rule
- .cursor/rules/android-kotlin-core.mdcCursor rule
- .cursor/rules/android-local-persistence-datastore.mdcCursor rule
- .cursor/rules/android-material3-design-system.mdcCursor rule
- .cursor/rules/android-media-files-sharing.mdcCursor rule
- .cursor/rules/android-mobile-frontend-design.mdcCursor rule
- .cursor/rules/android-modernization-upgrade.mdcCursor rule
- .cursor/rules/android-modularization.mdcCursor rule
- .cursor/rules/android-navigation-deeplinks.mdcCursor rule
- .cursor/rules/android-networking-retrofit-okhttp.mdcCursor rule
- .cursor/rules/android-performance-observability.mdcCursor rule
- .cursor/rules/android-permissions-activity-results.mdcCursor rule
- .cursor/rules/android-room-database.mdcCursor rule
- .cursor/rules/android-rxjava-to-coroutines-migration.mdcCursor rule
- .cursor/rules/android-security-best-practices.mdcCursor rule
- .cursor/rules/android-serialization-offline-sync.mdcCursor rule
- .cursor/rules/android-state-management.mdcCursor rule
- .cursor/rules/android-testing-ui.mdcCursor rule
- .cursor/rules/android-testing-unit.mdcCursor rule
- .cursor/rules/android-ui-states-validation.mdcCursor rule
- .cursor/rules/android-viewsystem-foundations.mdcCursor rule
- .cursor/rules/android-workmanager-notifications.mdcCursor rule
- android-architecture-cleanSkill
- android-ci-cd-release-playstoreSkill
- android-coil-composeSkill
- android-compose-accessibilitySkill
- android-compose-foundationsSkill
- android-compose-performanceSkill
- android-compose-state-effectsSkill
- android-compose-xml-interoperabilitySkill
- android-coroutines-flowSkill
- android-di-hiltSkill
- android-emulator-automationSkill
- android-gradle-build-logicSkill
- android-kotlin-coreSkill
- android-local-persistence-datastoreSkill
- android-material3-design-systemSkill
- android-media-files-sharingSkill
- android-mobile-frontend-designSkill
- android-modernization-upgradeSkill
- android-modularizationSkill
- android-navigation-deeplinksSkill
- android-networking-retrofit-okhttpSkill
- android-performance-observabilitySkill
- android-permissions-activity-resultsSkill
- android-room-databaseSkill
- android-rxjava-to-coroutines-migrationSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Use this skill when the request is about: android gradle build performance, configuration cache android build, ksp vs kapt android.
- Distinctive: line 19
Use this skill when the problem is build speed, task churn, cache misses, or CI wall time rather than build-logic structure.
- Very specific: line 20
Read references/patterns.md when you need the measurement ladder or the most common Gradle performance smells.
- Very specific: line 21
Read references/scenarios.md for audit-first entry points on the example projects.
- Very specific: line 29
Check gradle.properties, plugin wiring, dependency declarations, task registration style, and module conventions for common performance …
- Distinctive: line 34
Do not recommend broad rewrites when a single cache, plugin, or dependency pattern is the real bottleneck.
- Distinctive: line 36
Prefer KSP, configuration cache, and lazy task configuration when the toolchain supports them.
- Distinctive: line 37
Treat dynamic dependency versions, changing modules, and eager task creation as performance regressions unless there is a deliberate reason.
- Distinctive: line 38
Keep CI guidance reproducible on the example projects before suggesting org-wide rollout.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Android Gradle Build Performance
When To Use
- Use this skill when the request is about: android gradle build performance, configuration cache android build, ksp vs kapt android.
- Primary outcome: Diagnose and improve Android and Gradle build performance with scans, cache checks, and bottleneck audits.
- Use this skill when the problem is build speed, task churn, cache misses, or CI wall time rather than build-logic structure.
- Read
references/patterns.mdwhen you need the measurement ladder or the most common Gradle performance smells. - Read
references/scenarios.mdfor audit-first entry points on the example projects. - Handoff skills when the scope expands:
android-gradle-build-logicandroid-ci-cd-release-playstore
Workflow
- Identify whether the problem is local developer feedback time, CI build duration, or both.
- Measure one build path at a time with
--profile,--scan, configuration-cache diagnostics, or the bundled audit script before proposing a fix. - Check
gradle.properties, plugin wiring, dependency declarations, task registration style, and module conventions for common performance smells. - Apply one high-confidence optimization at a time, then compare before and after behavior instead of stacking changes.
- Hand off structural Gradle refactors or release-pipeline changes once the performance bottleneck is isolated.
Guardrails
- Do not recommend broad rewrites when a single cache, plugin, or dependency pattern is the real bottleneck.
- Separate measurement from speculation; call out what was observed vs inferred.
- Prefer KSP, configuration cache, and lazy task configuration when the toolchain supports them.
- Treat dynamic dependency versions, changing modules, and eager task creation as performance regressions unless there is a deliberate reason.
- Keep CI guidance reproducible on the example projects before suggesting org-wide rollout.
Anti-Patterns
- Turning on every Gradle flag without checking compatibility or failures.
- Blaming AGP upgrades for slow builds without measuring task hot spots.
- Mixing build-logic architecture advice with build-time diagnosis in one pass.
- Using dynamic dependency versions that force repeated resolution work.
Review Focus
- Configuration time vs execution time vs dependency resolution vs test wall time.
- Configuration cache compatibility and lazy task registration.
- KSP vs kapt and annotation-processor hotspots.
- Remote/local cache value, dynamic dependencies, and CI-specific bottlenecks.
Examples
Happy path
- Scenario: Audit the Compose fixture for build cache, configuration cache, KSP, and eager task creation smells.
- Command:
python3 skills/android-gradle-build-performance/scripts/audit_build_performance.py examples/orbittasks-compose --json
Edge case
- Scenario: Compare XML and Compose fixture build settings before choosing a CI build optimization.
- Command:
bash skills/android-gradle-build-performance/scripts/run_examples.sh
Failure recovery
- Scenario: Re-check a project after enabling performance flags so regressions are caught before rollout.
- Command:
python3 skills/android-gradle-build-performance/scripts/audit_build_performance.py examples/orbittasks-xml
Done Checklist
- The bottleneck is tied to a specific phase, flag, plugin, or dependency pattern.
- Proposed optimizations are measurable and reversible.
- The recommended fix is compatible with the current Android and Gradle toolchain.
- Structural Gradle work is handed off separately from performance tuning.
Official References
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

