shekhar23/claude-zero-to-hero-android-kmp/android-dynamic-feature-modules
Claude Code and agent skill by shekhar23/claude-zero-to-hero-android-kmp
- community
Checking that the SKILL.md file is still in the repository.
Dynamic feature modules for Android - on-demand vs install-time vs fast-follow delivery, build.gradle setup with com.android.dynamic-feature plugin, SplitInstallManager request and state monitoring, navigation to dynamic feature destinations, install failure handling, local testing with bundletool, and SplitInstallManager fakes for tests. Use this skill whenever splitting app features into on-demand modules, reducing base APK size, using Play Feature Delivery, or navigating to dynamically installed code. Trigger on phrases like "dynamic feature", "on-demand module", "Play Feature Delivery", "SplitInstallManager", "dynamic delivery", "install on demand", "modular APK", "feature split".
Install
npx vskill@latest install shekhar23/claude-zero-to-hero-android-kmp/android-dynamic-feature-modulesSKILL.md
Android Dynamic Feature Modules
Overview
Dynamic Feature Modules (DFMs) let you ship features as separate APK splits installed on demand via Play Feature Delivery. This reduces base APK size and defers download of rarely used features.
DFMs are not the same as multi-module architecture. Multi-module is a build-time concern (faster builds, clear boundaries). DFMs are a delivery concern (smaller installs, on-demand code). A feature can be in its own Gradle module AND be a dynamic feature — these are orthogonal.
Related skills: android-module-structure, android-navigation, android-di-koin.
When to Use Dynamic Features
Use DFMs when:
- A feature is used by < 20% of users (e.g. AR mode, admin panel, onboarding wizard)
- A feature adds > 2 MB to the download size
- You want to offer optional capabilities (e.g. language packs, game levels)
Do NOT use DFMs for:
- Core navigation paths (login, main feed)
- Features needed on first launch
- Reducing build complexity (use regular modules for that)
Delivery Types
| Type | When installed | Use case | |
|---|---|---|---|
on-demand | App requests it at runtime | Rarely used features | |
install-time | With the base APK (but still a separate split) | Locale splits, density splits | |
fast-follow | Shortly after base install, in background | Features needed in first session |
Gradle Setup
App module (build.gradle.kts :app)
Dynamic feature module (build.gradle.kts :feature-camera)
AndroidManifest.xml (dynamic feature)
SplitInstallManager: Requesting a Module
Error Codes
Handle the most common failure states:
Navigation to Dynamic Feature Destinations
Option A — manual class loading after install:
Option B — DynamicNavHostFragment (if using Jetpack Navigation with XML graphs):
Option C — Compose with manual install gate (recommended for Compose projects):
Local Testing with bundletool
Build and test locally without uploading to Play:
The --local-testing flag makes SplitInstallManager serve modules from the device's local storage instead of Play servers.
Fake for Tests
Checklist
- [ ] Dynamic feature manifest declares
dist:on-demand(or correct delivery type) - [ ] Feature module depends on
:app, not vice versa - [ ] Install failure states handled (network, storage, unavailable)
- [ ] Large installs (> 10 MB) handle
REQUIRES_USER_CONFIRMATION - [ ] Tested locally with
bundletool --local-testing - [ ] Loading/progress UI shown during download
- [ ] Module name in
SplitInstallRequestmatches the Gradle module name exactly
Anti-Patterns
| Anti-pattern | Why it's wrong | Instead | |
|---|---|---|---|
| Using DFMs to reduce build complexity | DFMs add release complexity (bundletool, Play delivery) | Use regular Gradle modules for build boundaries | |
| Putting core auth or main nav in a DFM | User can't launch the app if install fails | Only use DFMs for non-critical features | |
Ignoring REQUIRES_USER_CONFIRMATION | Install silently fails for large modules | Show the system confirmation dialog | |
| Not testing with bundletool | Install works in debug APK but fails in AAB | Always test the AAB path locally | |
| Accessing DFM classes before install confirmed | ClassNotFoundException at runtime | Gate all class access behind install state check |
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/android-dynamic-feature-modules/SKILL.md
Popularity
- Repository stars
- 9
- Repository forks
- 5
- 7-day trend score
- 12
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/shekhar23/claude-zero-to-hero-android-kmp/android-dynamic-feature-modules)