Skip to main content
skill CX Codex

agp-9-upgrade — Claude Code skill: what it does, how to install

Moves an Android project from AGP 8 to Android Gradle Plugin 9 step by step: dependency bumps, built-in Kotlin, the new DSL, kapt cleanup.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add android/skills --skill agp-9-upgrade -a claude-code
Open on GitHub

What agp-9-upgrade does

The skill takes an Android project from AGP 8 to Android Gradle Plugin 9. It reads the plugin version in your build first. Anything below 9 and it stops, telling you to run the AGP Upgrade Assistant in Android Studio and confirm when the update lands. You can ask it to skip that and bump the version itself.

Past that gate the work runs in a fixed order. KSP to 2.3.6 or higher, Hilt to 2.59.2 or higher, migration to built-in Kotlin, a rewrite of the build scripts onto the new AGP DSL, kapt swapped for KSP or legacy-kapt, custom BuildConfig fields, then removal of four temporary flags from gradle.properties. Each step points at its own reference file, and references/recipes.md holds before-and-after examples.

Two limits are worth knowing up front. Kotlin Multiplatform projects are unsupported, the skill says so in its own description. Paparazzi v2.0.0-alpha04 and older has issues under AGP 9, so a screenshot-test setup is the first thing to check before running this. Verification is plain: IDE sync, ./gradlew help, ./gradlew build --dry-run.

What it helps with

  • carry a build from AGP 8 to AGP 9 without reading every breaking change
  • move modules onto built-in Kotlin
  • rewrite build scripts for the new AGP DSL
  • swap kapt for KSP
  • clear the temporary migration flags out of gradle.properties

Example prompts for the agent

  • Migrate this project to Android Gradle Plugin 9 using the agp-9-upgrade steps
  • Check the AGP version here and tell me what to do if it is below 9
  • Bump KSP and Hilt to the required versions and clean up gradle.properties after the migration

How to install agp-9-upgrade

1Skills CLI (Vercel)

npx skills add android/skills --skill agp-9-upgrade -a claude-code

2Manually: put the files in place

~/.claude/skills/agp-9-upgrade/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/agp-9-upgrade/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about agp-9-upgrade

How do I install agp-9-upgrade in Claude Code?

Run npx skills add android/skills --skill agp-9-upgrade -a claude-code. The skill file ends up at ~/.claude/skills/agp-9-upgrade/SKILL.md.

What does agp-9-upgrade do?

It drives an Android project to AGP 9: higher KSP and Hilt versions, built-in Kotlin, the new DSL, plus kapt and BuildConfig work.

Which KSP and Hilt versions does AGP 9 require?

KSP 2.3.6 or higher and Hilt 2.59.2 or higher. That check is the first step the skill runs.

Source text

SKILL.md · Apache-2.0
---
name: agp-9-upgrade
description: Upgrades, or migrates, an Android project to use Android Gradle Plugin
  (AGP) version 9. Do not use this skill for migrating Kotlin Multiplatform (KMP)
  projects.
license: Complete terms in LICENSE.txt
metadata:
  author: Google LLC
  last-updated: '2026-09-18'
  keywords:
  - Android Gradle Plugin 9
  - AGP 9
  - AGP Upgrade
  - AGP Migration
  - New AGP DSL
  - Migrate to built-in Kotlin
---

## Migration guide

See the [AGP 9 migration guide](references/android/build/releases/agp-9-0-0-release-notes.md) for the major changes, many
breaking, in AGP 9 compared to AGP 8.

## Requirements

If the user requests to update or migrate to AGP 9, first check the AGP version
used in the project. If it is lower than 9, stop and ask the user to run the AGP
Upgrade Assistant in Android Studio to update to the latest stable version of
AGP, and confirm when done. The user may also request that this requirement be
skipped; if this is the case, you should update the version of AGP to the latest
stable version as part of the AGP 9 migration. See the
[AGP 9 migration guide](references/android/build/releases/agp-9-0-0-release-notes.md) for how to do this.

Each version of AGP has its own set of compatibilities with other tools, such as
Gradle, JDK, and Kotlin. The release notes for each of these versions will
include a **Compatibility** table indicating the minimum versions for these
tools.

Do not use this skill for KMP projects, as they are unsupported.

## Steps

If AGP is already at 9 or higher, then do the following:

### Step 1: Update dependencies

If KSP (`com.google.devtools.ksp`) is used in the project, ensure it is on
version 2.3.6 or higher.

If Hilt is used in the project, ensure it is on version 2.59.2 or higher.

### Step 2: Migrate to built-in Kotlin

See [the guide](references/android/build/migrate-to-built-in-kotlin.md) for detailed information.

### Step 3. Migrate to the new AGP DSL

See [the guide](references/android/build/releases/agp-9-0-0-release-notes.md) for detailed information.

See also [gradle-recipes](references/recipes.md) for examples on how to migrate old code to code
that is compatible with AGP 9 and the new DSL.

### Step 4. Migrate kapt to KSP or legacy-kapt

If KSP (`com.google.devtools.ksp`) or kapt (`org.jetbrains.kotlin.kapt`) are
used in the project, see [KSP, kapt, and legacy-kapt](references/ksp-kapt.md) for detailed migration
steps.

### Step 5. BuildConfig

If any Android module contains custom BuildConfig fields, see [BuildConfig](references/buildconfig.md)
for detailed information.

### Step 6. Update gradle.properties

After the migration, check gradle.properties. Remove the following flags:

1. android.builtInKotlin
2. android.newDsl
3. android.uniquePackageNames
4. android.enableAppCompileTimeRClass

Additionally, delete all temporary files you've created.

## Guidelines

- Never write or run python scripts.
- Only search the Gradle dependency cache when inspecting external dependencies, and only as a last resort.
- Never add `android.disallowKotlinSourceSets=false` to `gradle.properties`.
- When verifying changes, don't run the `clean` task. This is a waste of time.

## Verification

After migration, verify the following:

1. Gradle IDE sync succeeds.
2. `./gradlew help` succeeds.
3. `./gradlew build --dry-run` succeeds.

## Troubleshooting

Paparazzi v2.0.0-alpha04 and lower versions have issues with AGP 9. See
[references/paparazzi-gradle-9.md](references/paparazzi-gradle-9.md) for details.

© Google LLC · Apache-2.0 · android/skills

Similar skills

Everything for Mobile →

From the same set24

verified-email Walks your agent through adding verified email retrieval on Android Credential Manager, with no OTP step. Useful when sign-up or account recovery needs less friction. CX Codex +1 1,500installs play-policy-insights Audits Android applications against Google Play Policy rules before submission. It flags undeclared data collection, permission hygiene risks, and account handling issues. CX Codex +1 1,300installs wear-compose-m3 Teaches the agent Wear OS Compose Material3: migrating off Material 2.5 and Horologist, canonical component samples, and the toolchain floors you need. CX Codex +1 1,200installs camerax Guides Android camera development using CameraX, Jetpack, and Media3. Useful when wiring video capture, handling foldables, or migrating from Camera2. CX Codex +1 1,200installs android-profiler Captures and inspects Android performance metrics, from Perfetto traces and memory leaks to frame drops and battery drain. CX Codex +1 1,000installs leanback-to-compose-tv-migration A skill that guides the move from Leanback and Android Views to Jetpack Compose for TV. Useful when a browse, settings or playback screen needs rewriting. CX Codex +1 772installs media3-cast-integration Adds Google Cast capabilities to Android projects using Jetpack Media3. It configures dependencies, manifest entries, CastPlayer or RemoteCastPlayer, and Compose UI controls. CX Codex +1 771installs restore-credentials This skill guides Android Restore Credentials integration with androidx.credentials for silent sign-in after an app is restored on a new device. CX Codex +1 638installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor