CtrlK
BlogDocsLog inGet started
Tessl Logo

implement-feature

The end-to-end workflow for adding a feature to Meshtastic-Android, in the order that keeps KMP source sets and the architecture intact. Use this whenever you start implementing a new feature or a sizeable behaviour change, before writing any code.

69

Quality

84%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Skill: Implement a Feature

Description

A step-by-step workflow for implementing a new feature in the Meshtastic-Android codebase, ensuring KMP compatibility and proper architecture.

Workflow

1. Update Dependencies & Aliases

  • Check gradle/libs.versions.toml before adding libraries.
  • Use jetbrains-* aliases for lifecycle/navigation/adaptive dependencies in commonMain.
  • Use compose-multiplatform-* aliases for CMP dependencies.

2. Define the State & ViewModels

  • Follow MVI/UDF patterns.
  • Extend shared ViewModel logic in feature/<name>/src/commonMain/kotlin/org/meshtastic/feature/<name>/<Name>ViewModel.kt.
  • Use stateInWhileSubscribed (from core:ui) for sharing state flows.
  • Keep the ViewModel free of Android framework dependencies.

3. Build the UI

  • Use Jetpack Compose Multiplatform (CMP).
  • Define strings in core:resources (see the compose-ui skill).
  • Support adaptive layouts (Large/XL breakpoints).

4. Wire Navigation & DI

  • Define typed route objects in core:navigation.
  • Export the navigation graph as an extension function on EntryProviderScope<NavKey> in commonMain (e.g., fun EntryProviderScope<NavKey>.myFeatureGraph()).
  • Add the required DI bindings via Koin Annotations (@Factory, @Single, @KoinViewModel) in commonMain.
  • CRITICAL: Ensure the module is registered in the app root graphs (AppKoinModule.kt, DesktopKoinModule.kt) and the navigation is injected into the root entry provider in the host shell.

5. Validate Platform Separation

  • If you need a platform-specific API (like camera or specific mapping SDK), define an interface in commonMain, implement it in the host shell, and inject it via CompositionLocal or Koin.

6. Verify Locally

  • Run the baseline checks (see testing-ci skill):
    ./gradlew spotlessApply spotlessCheck detekt assembleDebug test allTests
  • Add kmpSmokeCompile to the command when the feature touches a KMP module (most features do) so cross-target compile failures surface before merge.
  • If the feature adds a new reflection-heavy dependency, add keep rules to both androidApp/proguard-rules.pro and desktopApp/proguard-rules.pro, then verify release builds:
    ./gradlew assembleFdroidRelease :desktopApp:runRelease
Repository
meshtastic/Meshtastic-Android
Last updated
First committed

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.