mobile-toolchain-unifier
БесплатноБез исполняемых скриптовНе проверенAudits, unifies, and optimizes mobile development environments and toolchains across a drive (Android, Flutter, iOS). Consolidates fragmented NDKs, SDK…
от Harishwarrior★ 72 звезды на GitHubОб этом скилле
Mobile Toolchain Unifier
A comprehensive skill for auditing, unifying, and reclaiming disk space across multi-project mobile development workspaces (Flutter, Android native, and iOS).
Overview
Over time, active mobile development machines accumulate duplicate SDKs, conflicting Gradle versions, multiple Java daemons, redundant NDKs, bloated system images, and gigabytes of orphaned simulator runtimes.
This skill provides an automated, non-destructive workflow to:
- Audit & Discover: Find all mobile projects across the drive and inventory their toolchain versions.
- Unify & Pin: Align all projects onto the latest stable common denominators (Gradle wrapper, AGP, Java LTS, NDK, SDK platforms, Flutter FVM).
- Verify Builds: Test compilation across all projects to ensure zero breaking changes.
- Purge Obsolete Assets: Remove older toolchain copies, Gradle caches, and legacy simulator runtimes, saving 20–80+ GB of disk space.
- Optimize Emulators: Build ultra-lightweight Android emulators with
avdslim, uninstall bloatware while keeping Google Play Services & Play Store, and bake<1.5sGolden Snapshots.
Reference Guides
| Domain | Reference file |
|---|---|
| AGP, Gradle, Java, NDK & compileSdk Matrix | references/android_toolchain_matrix.md |
Bloatware Removal, Play Store & avdslim Guide |
references/emulator_slimming_guide.md |
Apple Simulator Slimming & simslim Guide |
references/simslim_optimization_guide.md |
6-Phase Workflow
Phase 1: Audit & Discovery
Scan the drive for all active mobile projects and toolchains.
1. Discover Projects
# Locate Gradle and Flutter configurations across Developer directories
find ~/Developer -maxdepth 5 \( -name "build.gradle" -o -name "build.gradle.kts" -o -name ".fvmrc" \) -not -path "*/build/*" -not -path "*/.gradle/*"
2. Inventory Installed Toolchains
# Android SDK components
sdkmanager --list_installed
# Flutter FVM versions
ls -lh ~/fvm/versions/
# Java runtimes and daemon JVMs
java -version
/usr/libexec/java_home -V
cat ~/.gradle/gradle.properties
# iOS CoreSimulator runtimes and disk images
xcrun simctl runtime list
Phase 2: Toolchain Unification
Consolidate all discovered projects onto unified versions:
1. Android NDK
- Inspect pinned
ndkVersionin everybuild.gradle.kts/build.gradle. - Pin to the latest installed stable release (e.g.
30.0.16248370/ NDK r30). - Ensure projects without explicit
ndkVersiondeclare it to prevent Android Gradle Plugin from auto-downloading legacy fallbacks.
2. Gradle Wrapper & Android Gradle Plugin (AGP)
- Upgrade
gradle/wrapper/gradle-wrapper.propertiesin all projects to the latest stable release (e.g.gradle-9.8.2-bin.zip). - Align AGP in
settings.gradle.kts/ rootbuild.gradle(e.g. AGP9.4.x/9.5.x) to ensure compatibility with Gradle 9.6+. - Align Kotlin Gradle Plugin (
org.jetbrains.kotlin.android) to2.4.xto match AGP 9.
3. Java / JVM Daemon Alignment
Prevent Gradle from spawning multiple incompatible daemon JVMs:
- In
~/.zshrc, pointJAVA_HOMEandPATHto the latest LTS JDK (e.g. Java 21 LTS):export JAVA_HOME="$HOME/.gradle/jdks/eclipse_adoptium-21-aarch64-os_x.2/jdk-21.0.7+6/Contents/Home" export PATH="$JAVA_HOME/bin:$PATH" - In
~/.gradle/gradle.properties, set matching daemon JVM:org.gradle.java.home=/path/to/jdk-21/Contents/Home - In each project's
build.gradle.kts, standardize compatibility:compileOptions { sourceCompatibility = JavaVersion.VERSION_21 targetCompatibility = JavaVersion.VERSION_21 } tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach { compilerOptions { jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_21) } }
4. Flutter SDK (FVM)
- Update all
.fvmrcfiles to point to the latest installed Flutter release (e.g.3.47.8). - Update
pubspec.yamlenvironment constraints:environment: sdk: 3.13.7 flutter: 3.47.8 - Update
local.propertiesin Flutter Android modules:flutter.sdk=/Users/<user>/fvm/versions/3.47.8
Phase 3: Build Verification
Never delete or finalize before verifying that all projects build cleanly:
# 1. Flutter dependencies
cd <project> && fvm flutter pub get
# 2. Native Android compilation
cd <project>/android && ./gradlew assembleDebug
# 3. Verify Daemon JVM reuse
./gradlew --status
Look for: Launcher JVM: 21.x and Daemon JVM: 21.x matching across every run.
Phase 4: Disk Reclamation & Pruning
Once builds are verified, safely eliminate redundant older assets:
# 1. Remove older NDK directories
rm -rf ~/Library/Android/sdk/ndk/<older-version>
# 2. Remove older SDK platforms and system images
rm -rf ~/Library/Android/sdk/platforms/android-{34,35,36}
rm -rf ~/Library/An
Установить mobile-toolchain-unifier в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл mobile-toolchain-unifier?
Audits, unifies, and optimizes mobile development environments and toolchains across a drive (Android, Flutter, iOS). Consolidates fragmented NDKs, SDK platforms, Gradle distributions, Flutter SDKs (FVM), and Java/JVM daemon versions to the latest stable releases, verifies project builds, reclaims tens of gigabytes of disk space, aggressively trims emulator bloatware using avdslim while preserving Play Store, and creates instant-boot Golden Snapshots. Use whenever the user asks to clean, unify, upgrade, or optimize Android SDKs, NDKs, Gradle wrappers, Java/JVM daemons, iOS simulator runtimes, or mobile emulator environments.
Как установить скилл mobile-toolchain-unifier?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл mobile-toolchain-unifier запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic