What problem does it solve?
This Skill removes the manual, error-prone work of writing Kotlin DTO classes by generating kotlinx.serialization-compatible data classes directly from a JSON string, ensuring correct package placement, types, and naming conventions.
Core Features & Use Cases
- Parse a provided JSON string and infer Kotlin types: String, Int/Long, Double, Boolean, List<T>, and nested objects.
- Emit top-level @Serializable data classes with non-nullable val properties and trailing commas.
- Add @SerialName annotations for JSON keys with underscores while using camelCase property names.
- Generate separate top-level classes for nested JSON objects in the same file and prefer Long when integer values exceed Int range.
- Save the file to src/main/kotlin using the package declared in src/main/kotlin/Main.kt.
Quick Start
Use the add-dto command with a target Kotlin filename followed by the JSON string to generate a serializable data class file in src/main/kotlin.