kotlin-types-value-class

安装量: 866
排名: #11276

安装

npx skills add https://github.com/chrisbanes/skills --skill kotlin-types-value-class

Kotlin value class vs data class Core principle Prefer @JvmInline value class for single-field types that carry domain meaning. Data classes are for aggregating multiple fields. Review procedure Find single-property wrappers, primitive-heavy APIs, and @Immutable wrappers in UI state. Decide whether the single value is a real domain distinction. If not, keep the primitive or use a typealias. Check whether replacing the type changes equality, serialization, Java interop, or hot-path boxing. Convert only when the domain meaning is clear and the contract changes are acceptable. Re-run the affected compiler/tests; for Compose performance work, re-check compiler reports or recomposition evidence. Decision flow Show more Installs 859 Repository chrisbanes/skills GitHub Stars 908 First Seen May 13, 2026 Security Audits Gen Agent Trust Hub Pass Socket Pass Snyk Pass

返回排行榜