kotlinx-serialization-and-boundary-models

Installation
SKILL.md

kotlinx.serialization and Boundary Models

Use this skill when adding or reviewing serializable models at network, disk, or IPC boundaries in a KMP project.

Goals

  • Stable wire/persistence contracts across Android, iOS, and other targets
  • Clear separation between DTOs and domain models
  • Correct plugin and source-set setup for kotlinx.serialization

Prefer official defaults

  • Use kotlinx.serialization as the default multiplatform serializer (JSON, ProtoBuf, etc. as needed).
  • Apply the Kotlin serialization compiler plugin in modules that declare @Serializable types.
  • Put wire DTOs next to the data source that owns them; map to domain models at the repository boundary.
  • Prefer explicit serializers for polymorphic / multiplatform-sensitive cases; do not rely on JVM reflection on Native.

Docs: https://kotlinlang.org/docs/serialization.html

Installs
1
First Seen
Sep 13, 2026