> android-navigation-type-safe
Standards for Jetpack Navigation Compose (Type-safe). Use when implementing type-safe navigation graphs in Jetpack Compose for Android. (triggers: **/*NavHost.kt, **/*Graph.kt, NavHost, navController, @Serializable)
curl "https://skillshub.wtf/HoangNguyen0403/agent-skills-standard/android-navigation-type-safe?format=md"Android Navigation Standards
Priority: P0
Implementation Guidelines
Type-Safe Navigation
- Library: Navigation Compose 2.8.0+.
- Routes: Use
@Serializableobjects/classes instead of String routes. - Arguments: No manual bundle parsing. Use
.toRoute<T>().
Structure
- Graphs: Split large apps into nested navigation graphs (
navigationextension functions). - Hoisting: Hoist navigation events out of Screens. Composable screens should accept callbacks (
onNavigateToX).
Anti-Patterns
- Hardcoded Strings:
**No String Routes**: Use Typed Objects. - Passing NavController:
**No NavController in UI**: Hoist events.
References
> related_skills --same-repo
> typescript-tooling
Development tools, linting, and build config for TypeScript. Use when configuring ESLint, Prettier, Jest, Vitest, tsconfig, or any TS build tooling. (triggers: tsconfig.json, .eslintrc.*, jest.config.*, package.json, eslint, prettier, jest, vitest, build, compile, lint)
> typescript-security
Secure coding practices for TypeScript. Use when validating input, handling auth tokens, sanitizing data, or managing secrets and sensitive configuration. (triggers: **/*.ts, **/*.tsx, validate, sanitize, xss, injection, auth, password, secret, token)
> typescript-language
Modern TypeScript standards for type safety and maintainability. Use when working with types, interfaces, generics, enums, unions, or tsconfig settings. (triggers: **/*.ts, **/*.tsx, tsconfig.json, type, interface, generic, enum, union, intersection, readonly, const, namespace)
> typescript-best-practices
Idiomatic TypeScript patterns for clean, maintainable code. Use when writing or refactoring TypeScript classes, functions, modules, or async logic. (triggers: **/*.ts, **/*.tsx, class, function, module, import, export, async, promise)