AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Android Kmp Shared

skill-prasad-vennam-awesome-android-ai-agent-skills-android-kmp-shared · by prasad-vennam

Use when building Kotlin Multiplatform (KMP) shared modules, integrating with iOS, or sharing business logic across platforms.

No reviews yet
0 installs
10 views
0.0% view→install

Install

$ agentstack add skill-prasad-vennam-awesome-android-ai-agent-skills-android-kmp-shared

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-prasad-vennam-awesome-android-ai-agent-skills-android-kmp-shared)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
4mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Android Kmp Shared? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Android Kotlin Multiplatform (KMP) 🌍🤝

Professional patterns for sharing code between Android and iOS using the next-generation Kotlin Multiplatform technology.

⚡ When to Use

  • Shared Business Logic: Centralizing ViewModels, Use Cases, and Domain Models.
  • Data Layer Sharing: Using Ktor (Network) and SQLDelight (Database) across platforms.
  • Modularization: Creating a cross-platform library module.
  • Migration: Moving from 100% native to shared logic.
  • Validation: Building one logic for both apps (e.g., Auth, Calculations).

🏗️ The Multiplatform Architecture

  • commonMain: The heart of the app. Pure Kotlin code shared by all platforms.
  • androidMain: Platform-specific implementation for Android.
  • iosMain: Platform-specific implementation for iOS (via Kotlin/Native).

🛠️ Essential Shared Tools

1. Ktor (Networking)

  • Benefit: Async, multiplatform HTTP client.
  • Use ContentNegotiation and Serialization for shared DTOs.

2. SQLDelight (Local Persistence)

  • Benefit: Type-safe SQL queries that generate Kotlin code.
  • Shared schema, platform-specific drivers (SQLite for Android, Native for iOS).

3. Koin (Dependency Injection)

  • Benefit: Simple and lightweight DI that works across commonMain.

4. kotlinx-datetime

  • Use for consistent date/time logic without platform-specific issues (java.time vs NSDate).

🚀 The expect / actual Pattern

  • Use for platform-specific APIs when no shared library exists.
  • Rule: Avoid expect/actual if a shared library is available.
  • Bad: expect fun getPlatformName(): String
  • Good: Use interfaces and DI to provide platform-specific implementations.

🏁 Shared Logic Workflow

  • [ ] ViewModel Sharing: Use multiplatform-viewmodel library for consistent lifecycle mapping.
  • [ ] State Management: Use StateFlow in commonMain to expose UI state.
  • [ ] iOS Interoperability: Be aware of Swift/Kotlin memory management and @ObjCName for clean iOS APIs.

📦 Gradle Configuration

kotlin {
    androidTarget()
    iosX64()
    iosArm64()
    iosSimulatorArm64()

    sourceSets {
        commonMain.dependencies {
            implementation("io.ktor:ktor-client-core:2.3.0")
        }
    }
}

🧪 Testing with KMP

  • Tests in commonTest run on both Android and iOS targets.
  • Use kotlin.test for standard assertions (assertTrue, assertEquals).
  • Mocking: Use libraries like Mockative or KMock for multiplatform mocking.

🔗 Related Resources

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.