kotlin-convention

Enforce idiomatic Kotlin conventions for Android project code.

7|2|Updated Feb 23, 2026
One-click install
npx skills add https://github.com/javiercamarenatriguero/android-skills --skill kotlin-convention
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kotlin-convention
Source: https://github.com/javiercamarenatriguero/android-skills/tree/main/kotlin-convention
Command: npx skills add https://github.com/javiercamarenatriguero/android-skills --skill kotlin-convention

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers write cleaner, more maintainable, and idiomatic Kotlin code by providing clear conventions and best practices for naming, null safety, data modeling, and more.

Core Features & Use Cases

  • Coding Standards: Enforces consistent naming conventions across classes, functions, and variables.
  • Null Safety: Guides on avoiding !! and leveraging Kotlin's null-safety features effectively.
  • Data Modeling: Demonstrates best practices for data class and sealed interface usage.
  • Function & Collection Idioms: Promotes concise single-expression functions, appropriate extension function usage, and efficient collection processing.
  • Use Case: When reviewing a new developer's code, use this Skill to ensure it adheres to established Kotlin best practices, improving code quality and consistency.

Quick Start

Apply the Kotlin convention for naming variables to the userCount variable.

Frequently Asked Questions about kotlin-convention

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

FAQPage Schema
How do I write idiomatic Kotlin code for Android development?

Idiomatic Kotlin code is written by following conventions for naming, leveraging null safety, using data classes for modeling, and applying efficient collection processing. This Skill provides guidelines to enforce these best practices for code clarity and maintainability.

What are the best practices for Kotlin null safety to avoid using the !! operator?

Kotlin null safety best practices involve avoiding the `!!` operator and effectively leveraging Kotlin's built-in null-safety features. This Skill guides developers on how to safely handle nullable types and write more robust, crash-resistant Android code.

When should I use sealed classes and data classes in Kotlin?

Sealed classes and data classes in Kotlin should be used for hierarchical data modeling and representing structured state. This Skill demonstrates best practices for using `data class` and `sealed interface` usage to improve code clarity and maintainability in Android projects.

How do I apply Kotlin coding conventions for coroutines and when expressions?

Kotlin coding conventions for coroutines and when expressions are applied by following specific idiomatic patterns for asynchronous error handling and conditional logic. This Skill provides rules for structuring coroutines, when expressions, and object/companion object usage.