Skip to content
affaan-m avatar

Kotlin Patterns

Idiomatic Kotlin patterns for null safety, immutability, sealed hierarchies, coroutines, and DSL builders.

CCM score
67 of 100
skills.sh installs
12.7K
GitHub stars
312.6K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers null safety with the type system, immutability via val and copy(), and extension functions without inheritance
  • Includes sealed classes and interfaces for exhaustive when results, scope function usage rules, and structured concurrency with coroutines and Flow
  • Enforces avoidance of force-unwrapping (!!), mutable global state, and nested scope functions in favor of safe-call chains
  • Designed for Kotlin reviews and refactors, plus Gradle Kotlin DSL build configuration and type-safe DSL builders with @DslMarker

Install

$ npx -y skills add affaan-m/ecc --skill kotlin-patterns -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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"
}

Details

Repository
github.com/affaan-m/ecc
Categories
Java & JVM, Mobile Apps
First seen
Jul 14, 2026

Questions

Does the kotlin-patterns skill help with Kotlin null safety and coroutines?

Yes, kotlin-patterns covers idiomatic Kotlin conventions, including null safety with the type system and safe-call operators, structured concurrency with coroutines and Flow, and type-safe DSL builders. It is meant for writing or reviewing Kotlin code when structure or null safety is in question.

How do I install the kotlin-patterns skill?

Run npx -y skills add affaan-m/ecc --skill kotlin-patterns -y in your project. Once installed, the agent gains Kotlin patterns for writing, reviewing and refactoring Kotlin code, plus guidance for Gradle Kotlin DSL builds.

Where does kotlin-patterns rank among Java and JVM skills?

kotlin-patterns ranks in the top 10 of the Java and JVM category on Claude Marketplaces. It sits alongside skills such as java-springboot, springboot-patterns and java-coding-standards, and it focuses specifically on Kotlin idioms rather than Java frameworks.

More from affaan-m/ecc

All 257

Similar to Kotlin Patterns

More Java & JVM