android-navigation
Skill18 starsChanged 4 months agoMITView on GitHub
Type-safe Compose Navigation for Android/KMP - route objects, feature nav graphs, cross-feature callbacks, and wiring in :app. Use this skill whenever setting up navigation, defining routes, adding a new screen to a nav graph, navigating between features, or wiring nav graphs in the app module. Trigger on phrases like "set up navigation", "add a route", "navigate between screens", "nav graph", "NavController", "type-safe nav", "cross-feature navigation", or "NavGraphBuilder".
2 other projects use a version of this.
Adopted by
Most recently taken up by
- geertberkers/claude-skillsword for word, first seen Oct 11, 2026
- Shekhar23/claude-zero-to-hero-android-KMPword for word, first seen Mar 29, 2026
Other versions2 projects use a version of this.
Word for word · 2
- Shekhar23/claude-zero-to-hero-android-KMP★ 9100% same
- geertberkers/claude-skills★ 0100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository67 other files it gives its agents.
- agent-onboardingSkill
- android-backgroundSkill
- android-cliSkill
- android-compose-architectureSkill
- android-compose-componentsSkill
- android-data-layerSkill
- android-di-koinSkill
- android-error-handlingSkill
- android-integration-testingSkill
- android-jacoco-setupSkill
- android-jvm-test-coverageSkill
- android-module-structureSkill
- android-presentation-mviSkill
- android-preview-figma-verifySkill
- android-ui-screenshot-verifySkill
- android-ui-testingSkill
- android-ui-verifySkill
- android-unit-testingSkill
- android-version-catalogSkill
- architecture-decision-recordSkill
- careful-planningSkill
- compose-adaptive-layoutsSkill
- figma-to-android-vectorSkill
- finalizeSkill
- git-commitSkill
- handoffSkill
- kmp-compose-architectureSkill
- kmp-compose-componentsSkill
- kmp-data-layerSkill
- kmp-di-koinSkill
- kmp-error-handlingSkill
- kmp-integration-testingSkill
- kmp-migration-analyzerSkill
- kmp-module-structureSkill
- kmp-navigationSkill
- kmp-presentation-mviSkill
- kmp-ui-testingSkill
- kmp-unit-testingSkill
- kotlin-coroutinesSkill
- kotlin-flowsSkill
- kotlin-mutation-testingSkill
- openspec-artifact-review-lightSkill
- openspec-artifact-reviewSkill
- project-breakdownSkill
- react-data-layerSkill
- react-error-handlingSkill
- react-integration-testingSkill
- react-presentation-mviSkill
- react-project-structureSkill
- react-routingSkill
- react-screen-architectureSkill
- react-securitySkill
- react-server-stateSkill
- react-ui-componentsSkill
- react-unit-testingSkill
- speckit-parallelize-agent-teamsSkill
- speckit-parallelize-subagentsSkill
- spring-api-layerSkill
- spring-di-configurationSkill
- spring-integration-testingSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 29
Use data object for screens with no parameters, data class for screens with arguments.
- Distinctive: line 64
All feature nav graphs are assembled in one place:
- Distinctive: line 98
Avoid passing complex objects via navigation — pass IDs and load data in the destination ViewModel.
≈ “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 / KMP Navigation
Principles
- Type-safe navigation with
@Serializableroute objects (KotlinX Serialization). - One nav graph per feature, defined in the feature's
presentationmodule. - Feature nav graphs are assembled in
:app. - Navigation within a feature uses a
NavControllerpassed into the feature nav graph. - Feature-to-feature navigation uses callbacks, keeping features decoupled.
Route Objects
Define routes as @Serializable objects or data classes in the feature's presentation module:
// feature:notes:presentation
@Serializable object NoteListRoute
@Serializable data class NoteDetailRoute(val noteId: String)Use data object for screens with no parameters, data class for screens with arguments.
Feature Nav Graph
Each feature exposes a NavGraphBuilder extension function:
// feature:notes:presentation
fun NavGraphBuilder.notesGraph(
navController: NavController,
onNavigateToEditor: (String) -> Unit // callback for cross-feature navigation
) {
navigation<NoteListRoute>(startDestination = NoteListRoute) {
composable<NoteListRoute> {
NoteListRoot(
onNavigateToDetail = { navController.navigate(NoteDetailRoute(it)) }
)
}
composable<NoteDetailRoute> { backStackEntry ->
val route: NoteDetailRoute = backStackEntry.toRoute()
NoteDetailRoot(
noteId = route.noteId,
onNavigateToEditor = onNavigateToEditor
)
}
}
}Wiring in :app
All feature nav graphs are assembled in one place:
// :app
NavHost(navController, startDestination = NoteListRoute) {
notesGraph(
navController = navController,
onNavigateToEditor = { navController.navigate(EditorRoute(it)) }
)
editorGraph(navController)
}Cross-feature navigation is always expressed as a lambda callback — never by importing a route from another feature module.
Passing Arguments
For simple scalar arguments, use @Serializable data class routes:
@Serializable data class NoteDetailRoute(val noteId: String)
// Navigate
navController.navigate(NoteDetailRoute(noteId = "abc123"))
// Receive
composable<NoteDetailRoute> { backStackEntry ->
val route: NoteDetailRoute = backStackEntry.toRoute()
// route.noteId available here
}Avoid passing complex objects via navigation — pass IDs and load data in the destination ViewModel.
Naming Conventions
| Thing | Convention | Example |
| Nav route | <Screen>Route | NoteListRoute, NoteDetailRoute |
| Feature nav graph | <feature>Graph(...) on NavGraphBuilder | notesGraph(...) |
Checklist: Adding Navigation to a New Feature
- Define
@Serializableroute objects for each screen infeature:presentation - Add feature nav graph function (
NavGraphBuilder.<feature>Graph(...)) - Pass
NavControllerfor intra-feature navigation - Expose cross-feature destinations as lambda callbacks (not direct route imports)
- Wire nav graph and cross-feature callbacks in
:app'sNavHost
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.

