Back to list
pluginagentmarketplace

kotlin-serialization

by pluginagentmarketplace

Kotlin Development Plugin

2🍴 1📅 Jan 20, 2026

SKILL.md


name: kotlin-serialization description: kotlinx.serialization - JSON, Protobuf, custom serializers version: "1.0.0" sasmp_version: "1.3.0" bonded_agent: 01-kotlin-fundamentals bond_type: SECONDARY_BOND

execution: timeout_ms: 30000 retry: max_attempts: 3 backoff: exponential initial_delay_ms: 1000

parameters: required: - name: format type: string validation: "^(json|protobuf|cbor|custom)$" optional: - name: version type: string default: "1.6.3"

logging: level: info events: [skill_invoked, format_loaded, error_occurred]

Kotlin Serialization Skill

Type-safe serialization with kotlinx.serialization.

Topics Covered

JSON Serialization

@Serializable
data class User(
    val id: Long,
    val name: String,
    @SerialName("email_address") val email: String,
    val createdAt: Instant = Instant.now()
)

val json = Json {
    ignoreUnknownKeys = true
    encodeDefaults = true
    prettyPrint = true
}

val user = json.decodeFromString<User>(jsonString)
val output = json.encodeToString(user)

Custom Serializers

object InstantSerializer : KSerializer<Instant> {
    override val descriptor = PrimitiveSerialDescriptor("Instant", PrimitiveKind.LONG)
    override fun serialize(encoder: Encoder, value: Instant) = encoder.encodeLong(value.toEpochMilli())
    override fun deserialize(decoder: Decoder) = Instant.ofEpochMilli(decoder.decodeLong())
}

@Serializable
data class Event(
    @Serializable(with = InstantSerializer::class) val timestamp: Instant
)

Polymorphic Serialization

@Serializable
sealed class Response {
    @Serializable @SerialName("success")
    data class Success(val data: String) : Response()

    @Serializable @SerialName("error")
    data class Error(val message: String) : Response()
}

val json = Json { classDiscriminator = "type" }

Troubleshooting

IssueResolution
"Serializer not found"Add @Serializable or plugin
Unknown property failsSet ignoreUnknownKeys = true

Usage

Skill("kotlin-serialization")

Score

Total Score

60/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon