
Kotlin Patterns
This one teaches you to write Kotlin the way experienced Kotlin developers do. It covers the essentials like leveraging the type system for null safety with safe calls and the Elvis operator, preferring immutability with val and data classes, using sealed classes for exhaustive when expressions, and writing structured concurrency with coroutines and Flow. You also get patterns for extension functions, type-safe DSL builders, and Gradle Kotlin DSL configuration. The examples are practical, like modeling API results as sealed hierarchies and running parallel async calls inside coroutineScope. Use it when you're writing new Kotlin code or reviewing pull requests and want to avoid common pitfalls like force-unwrapping nullables or nesting scope functions unreadably.
- skills.sh installs
- 5K
- GitHub stars
- 229.1K
- last updated
- Jul 14, 2026
Install
$ npx -y skills add affaan-m/everything-claude-code --skill kotlin-patterns --agent claude-codeInstalls into .claude/skills of the current project.
Files
Kotlin Development Patterns
Idiomatic Kotlin patterns and best practices for building robust, efficient, and maintainable applications.
When to Use
- Writing new Kotlin code
- Reviewing Kotlin code
- Refactoring existing Kotlin code
- Designing Kotlin modules or libraries
- Configuring Gradle Kotlin DSL builds
How It Works
This skill enforces idiomatic Kotlin conventions across seven key areas: null safety using the type system and safe-call operators, immutability via val and copy() on data classes, sealed classes and interfaces for exhaustive type hierarchies, structured concurrency with coroutines and Flow, extension functions for adding behaviour without inheritance, type-safe DSL builders using @DslMarker and lambda receivers, and Gradle Kotlin DSL for build configuration.
Examples
Null safety with Elvis operator:
fun getUserEmail(userId: String): String {
val user = userRepository.findById(userId)
return user?.email ?: "unknown@example.com"
}
Sponsors
Details
- Repository
- github.com/affaan-m/everything-claude-code
- Categories
- Mobile Development, Java & JVM
- First seen
- Apr 16, 2026
More from affaan-m/everything-claude-code
All 256- Rust Patterns5K
- Swift Actor Persistence5K
- Swift Protocol Di Testing5K
- Bun Runtime4.9K
- Nextjs Turbopack4.9K
- Plankton Code Quality4.9K
- Swift Concurrency 6 24.9K
- Visa Doc Translate4.9K
- Ai Regression Testing4.8K
- Architecture Decision Records4.8K
- Blueprint4.8K
- Everything Claude Code Conventions4.8K
- Exa Search4.8K
- Kotlin Testing4.8K
- Customs Trade Compliance4.7K
- Data Scraper Agent4.7K
- Documentation Lookup4.7K
- Enterprise Agent Ops4.7K
- Flutter Dart Code Review4.7K
- Inventory Demand Planning4.7K
- Kotlin Ktor Patterns4.7K
- Nanoclaw Repl4.7K
- Pytorch Patterns4.7K
- Ralphinho Rfc Pipeline4.7K