kotlin-patterns

Enforce Kotlin best practices for null safety, immutability, and structured concurrency.

12|4|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/TeiNam/kiro-with-harness --skill kotlin-patterns-teinam
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kotlin-patterns
Source: https://github.com/TeiNam/kiro-with-harness/tree/main/skills/kotlin-patterns
Command: npx skills add https://github.com/TeiNam/kiro-with-harness --skill kotlin-patterns-teinam

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide to idiomatic Kotlin patterns, best practices, and conventions for building robust, efficient, and maintainable Kotlin applications.

Core Features & Use Cases

  • Idiomatic Kotlin: Offers guidance on null safety, immutability, sealed classes, coroutines, extension functions, and Gradle Kotlin DSL.
  • Real-world Usage: Suited for Kotlin developers looking to improve code quality and efficiency, refactoring existing Kotlin code, or building new Kotlin modules/libraries.
  • Learning Resource: An educational tool for mastering Kotlin patterns and practices.

Quick Start

Install the 'kotlin-patterns' skill in your development environment.

Frequently Asked Questions about kotlin-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I apply Kotlin best practices for null safety and immutability in my project?

Kotlin best practices for null safety and immutability involve using safe call operators, val declarations, and data classes. This Skill provides specific guidelines to enforce these patterns, ensuring robust and maintainable Kotlin applications.

What is the best way to implement structured concurrency with Kotlin coroutines?

Structured concurrency with Kotlin coroutines is implemented using scoped builders to manage lifecycles. This Skill offers guidelines on structured concurrency patterns to help you build efficient asynchronous applications.

How do I use Kotlin extension functions without cluttering my codebase?

Kotlin extension functions extend class functionality without inheritance. This Skill provides conventions for using extension functions idiomatically, targeting code quality and maintainability while avoiding namespace pollution.

Can I use this Skill to refactor existing Kotlin code libraries?

Yes, you can use this Skill to refactor existing Kotlin code. It serves as a guide for adopting idiomatic Kotlin patterns, improving robustness and efficiency in your current modules and libraries.

Does this Skill provide guidance on Gradle Kotlin DSL?

Yes, this Skill provides guidelines on Gradle Kotlin DSL. It covers idiomatic Kotlin patterns including build script conventions, helping you streamline your build configuration with type-safe syntax.

When should I use sealed classes in Kotlin development?

Sealed classes in Kotlin are used to represent restricted class hierarchies, enabling exhaustive when expressions. This Skill explains idiomatic Kotlin patterns like sealed classes to improve code robustness and maintainability.