agp-9-upgrade — скилл для Claude Code: что делает и как установить
Ведёт Android-проект с AGP 8 на Android Gradle Plugin 9: поднимает зависимости, переводит сборку на встроенный Kotlin и новый DSL.
npx skills add android/skills --skill agp-9-upgrade -a claude-codeЧто делает agp-9-upgrade
Скилл проводит Android-проект с AGP 8 на Android Gradle Plugin 9. Сначала он смотрит версию плагина в сборке. Если она ниже 9, работа останавливается: нужно прогнать AGP Upgrade Assistant в Android Studio и подтвердить, что обновление прошло. Этот шаг можно пропустить, если попросить агента поднять версию самому.
Дальше идут шаги по порядку. KSP до 2.3.6 или выше, Hilt до 2.59.2 или выше, переход на встроенный Kotlin, переписывание скриптов под новый AGP DSL, замена kapt на KSP или legacy-kapt, разбор кастомных полей BuildConfig, чистка временных флагов в gradle.properties. Каждый шаг ссылается на свой файл в references/, а references/recipes.md даёт примеры «до и после».
Ограничения лучше знать заранее. KMP-проекты не поддерживаются, об этом сказано в описании скилла. Paparazzi v2.0.0-alpha04 и ниже конфликтует с AGP 9, так что если на нём висят скриншот-тесты, это повод проверить их до запуска. Ещё агент не должен выполнять задачу clean и добавлять android.disallowKotlinSourceSets=false в gradle.properties. Проверка после миграции простая: синхронизация в IDE, ./gradlew help, ./gradlew build --dry-run.
Какие задачи решает
- довести сборку с AGP 8 до AGP 9 без ручного разбора breaking changes
- перевести модули на встроенный Kotlin
- переписать build-скрипты под новый AGP DSL
- заменить kapt на KSP в проекте на Kotlin
- убрать временные флаги миграции из
gradle.properties
Примеры запросов агенту
- Переведи проект на Android Gradle Plugin 9 по шагам скилла agp-9-upgrade
- Проверь версию AGP в проекте и, если она ниже 9, скажи, что делать дальше
- Обнови KSP и Hilt до нужных версий и убери флаги из
gradle.propertiesпосле миграции
Как установить agp-9-upgrade
1Через Skills CLI (Vercel)
npx skills add android/skills --skill agp-9-upgrade -a claude-code2Вручную: положить файлы
~/.claude/skills/agp-9-upgrade/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/agp-9-upgrade/
1Через Skills CLI (Vercel)
npx skills add android/skills --skill agp-9-upgrade -a codex2Вручную: положить файлы
.agents/skills/agp-9-upgrade/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add android/skills --skill agp-9-upgrade -a cursor2Вручную: положить файлы
.cursor/skills/agp-9-upgrade/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install android/skills agp-9-upgrade2Вручную: положить файлы
.github/skills/agp-9-upgrade/SKILL.md1Через Skills CLI (Vercel)
npx skills add android/skills --skill agp-9-upgrade -a gemini-cli2Командой платформы
gemini skills install https://github.com/android/skills --path build-system/agp/agp-9-upgradeВручную: положить файлы
.devin/skills/agp-9-upgrade/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add android/skills --skill agp-9-upgrade -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Из того же набора24
Похожие
Рядом в теме «Мобильная разработка»
Всё по теме «Мобильная разработка» →Вопросы о agp-9-upgrade
Как установить agp-9-upgrade в Claude Code?
Выполните npx skills add android/skills --skill agp-9-upgrade -a claude-code. Файл скилла окажется в ~/.claude/skills/agp-9-upgrade/SKILL.md.
Что делает agp-9-upgrade?
Ведёт миграцию Android-проекта на AGP 9: поднимает KSP и Hilt, переводит сборку на встроенный Kotlin и новый DSL, разбирается с kapt и BuildConfig.
Какие версии KSP и Hilt нужны для AGP 9?
KSP должен быть на 2.3.6 или выше, Hilt на 2.59.2 или выше. Скилл проверяет это первым шагом.
Исходный текст
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