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-code

Installs 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
1affaan-m avatarkotlin-testingaffaan-m/everything-claude-codekotlin testing4.8Kskills.sh installs
2dpearson2699 avatarpush-notificationsdpearson2699/swift-ios-skillsImplement, review, or debug push notifications in iOS/macOS apps — local notifications, remote (APNs) notifications, rich notifications, notification actions, s4.4Kskills.sh installs
3dpearson2699 avatarwidgetkitdpearson2699/swift-ios-skillsImplement, review, or improve WidgetKit widgets and controls. Use when building Home Screen, Lock Screen, StandBy, or CarPlay widgets with timeline providers; c4.2Kskills.sh installs
4dpearson2699 avatarauthenticationdpearson2699/swift-ios-skillsImplement iOS authentication flows with AuthenticationServices and LocalAuthentication. Use when building Sign in with Apple, passkey/WebAuthn registration or s4.1Kskills.sh installs
5dotnet avatarmaui-themingdotnet/skillsGuide for theming .NET MAUI apps — light/dark mode via AppThemeBinding, ResourceDictionary theme switching, DynamicResource bindings, system theme detection, an3.9Kskills.sh installs
6dpearson2699 avataralarmkitdpearson2699/swift-ios-skillsImplement AlarmKit alarms and countdown timers for iOS and iPadOS with Lock Screen, Dynamic Island, StandBy, and paired Apple Watch system UI. Covers AlarmManag3.8Kskills.sh installs