android-modernization-upgrade
Skill14 starsChanged 8 months agoMITView on GitHub
Bring very old Android projects to a current supported baseline with staged upgrades, deprecated API replacement, 16 KB alignment checks, and explicit handoff to specialized skills.
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-gradle-build-performanceSkill
- android-kotlin-coreSkill
- android-local-persistence-datastoreSkill
- android-material3-design-systemSkill
- android-media-files-sharingSkill
- android-mobile-frontend-designSkill
- 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
5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
0
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: upgrade old android project, fix android build after agp or kotlin bump, replace deprecated …
- Distinctive: line 35
Verify native packaging and 16 KB alignment readiness before release.
- Distinctive: line 51
Only auto-apply changes that are deterministic and reviewable.
- Distinctive: line 53
Treat AGP, Gradle, Kotlin, SDK, AndroidX, and native packaging as one compatibility graph.
- Distinctive: line 54
Never silently drop deprecated behavior without documenting the replacement and verification path.
≈ “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 Modernization Upgrade
When To Use
- Use this skill when the request is about: upgrade old android project, fix android build after agp or kotlin bump, replace deprecated android classes.
- Primary outcome: Bring very old Android projects to a current supported baseline with staged upgrades, deprecated API replacement, 16 KB alignment checks, and explicit handoff to specialized skills.
- Purpose: end-to-end guidance for bringing very old Android projects to a current supported baseline.
- Reach for this skill when the request is repo-wide compatibility and staged upgrade sequencing, not isolated Kotlin cleanup or one-library refactoring.
- Trigger language: requests about upgrading old Android codebases, fixing breakage after version bumps, migrating deprecated Android patterns, replacing deprecated classes, resolving old Gradle/AGP/Kotlin issues, handling 16 KB alignment, or modernizing architecture/setup.
- Handoff skills when the scope expands:
android-gradle-build-logicandroid-viewsystem-foundationsandroid-compose-xml-interoperabilityandroid-security-best-practicesandroid-performance-observabilityandroid-rxjava-to-coroutines-migration
Responsibilities
- Diagnose the repository shape: AGP, Gradle, Kotlin, AndroidX/support libraries, SDK levels, native artifacts, and deprecated APIs/classes.
- Generate a safe upgrade sequence instead of bumping everything at once.
- Branch the migration path for Compose-heavy, View-system, and mixed interoperability projects.
- Replace deprecated imports and classes when the fix is deterministic; otherwise emit an explicit remediation item.
- Verify native packaging and 16 KB alignment readiness before release.
- Hand off focused follow-up work to the right specialized Android skills once the main upgrade blockers are isolated.
Workflow
- Scan the project to understand toolchain age, AndroidX status, native packaging, and deprecated APIs.
- Generate an ordered modernization plan that isolates mechanical fixes from risky semantic changes.
- Apply deterministic upgrades in small stages and rerun build, test, and lint after each stage.
- Route remaining failures to the owning specialized skills with exact issue signatures and file paths, including RxJava chains that should move to the dedicated migration skill.
- Produce a final remediation report that leaves no hidden migration debt.
Automation Modes
audit: inspect the repo and emit a structured diagnosis report without editing files.safe-apply: perform deterministic edits such as repository cleanup, version bumps, obvious support-library replacements, manifest normalization, and straightforward deprecated API replacements.report: summarize unresolved blockers, file paths, issue signatures, and the next specialized skill to use.
Guardrails
- Only auto-apply changes that are deterministic and reviewable.
- Preserve working behavior whenever a migration can be staged instead of rewritten.
- Treat AGP, Gradle, Kotlin, SDK, AndroidX, and native packaging as one compatibility graph.
- Never silently drop deprecated behavior without documenting the replacement and verification path.
Anti-Patterns
- Bumping every version at once with no staged validation.
- Applying Compose migration advice to a legacy View-only app by default.
- Ignoring native libraries, ABI packaging, or page-size alignment in old apps.
- Calling a project modernized while deprecated classes and support libraries still ship.
Required Tooling
scripts/scan_project.pyscripts/build_compat_matrix.pyscripts/generate_remediation_checklist.pyscripts/apply_safe_upgrades.pyscripts/check_16kb_alignment.py
Required References
references/agp-upgrade-notes.mdreferences/kotlin-compatibility.mdreferences/androidx-migration.mdreferences/gradle-compatibility.mdreferences/sdk-behavior-changes.mdreferences/jetpack-release-notes.mdreferences/deprecated-replacements.mdreferences/upgrade-matrix.mdreferences/issue-signature-catalog.md
Examples
Happy path
- Scenario: Scan a support-library era project and generate an ordered upgrade checklist.
- Command:
python3 skills/android-modernization-upgrade/scripts/scan_project.py examples/fixtures/legacy-support-app
Edge case
- Scenario: Recover a project stuck between old AGP and Kotlin versions and verify staged fixes.
- Command:
python3 skills/android-modernization-upgrade/scripts/generate_remediation_checklist.py examples/fixtures/legacy-mismatch-app
Failure recovery
- Scenario: Auto-detect native packaging and 16 KB alignment issues before release.
- Command:
python3 skills/android-modernization-upgrade/scripts/check_16kb_alignment.py examples/fixtures/native-misaligned-app/app-release.apk
Done Checklist
- The implementation path is explicit, minimal, and tied to the right Android surface.
- Relevant example commands and benchmark prompts have been exercised or updated.
- Handoffs to adjacent skills are documented when the request crosses boundaries.
- Official references cover the chosen pattern and the main migration or troubleshooting path.
- Known safe fixes are applied automatically; ambiguous migrations are reported instead of silently changed.
- Deprecated classes are replaced or listed with exact file paths and replacement guidance.
- 16 KB alignment is verified, or the exact third-party/native blocker is called out.
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.

