rules-kotlin

Provide Kotlin-specific coding conventions for JVM, Android, and multiplatform modules.

4|1|Updated Apr 7, 2026
One-click install
npx skills add https://github.com/NSObjects/specpowers --skill rules-kotlin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rules-kotlin
Source: https://github.com/NSObjects/specpowers/tree/main/skills/rules-kotlin
Command: npx skills add https://github.com/NSObjects/specpowers --skill rules-kotlin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill ensures Kotlin teams follow idiomatic conventions that override general rules-common guidance, preventing Java anti-patterns and improving readability, safety, and consistency.

Core Features & Use Cases

  • Kotlin-specific overrides: Restates naming, formatting, and organization rules tailored to Kotlin so that files and declarations feel native.
  • Idiomatic guidance: Covers null safety, data classes, scope functions, coroutines, testing, dependency injection, and resource cleanup with Kotlin-first best practices.
  • Review checklist: Highlights red flags and iron laws to catch risky patterns like !!, GlobalScope, or mutable defaults when reviewing or editing Kotlin modules.

Quick Start

Ask the assistant to enforce Kotlin-specific rules whenever reviewing or writing Kotlin code.

Frequently Asked Questions about rules-kotlin

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

FAQPage Schema
How do I enforce idiomatic Kotlin coding conventions during code review?

Idiomatic Kotlin code avoids Java anti-patterns by leveraging null safety, data classes, and scope functions. It replaces verbose Java patterns with Kotlin-first best practices, ensuring safer, more readable codebases across JVM, Android, or multiplatform modules.

How do I write idiomatic Kotlin coroutines and handle resource cleanup?

Yes, Kotlin coding conventions apply to Android, JVM, and multiplatform modules. They provide tailored rules for naming, formatting, and idiomatic usage, ensuring your Kotlin code feels native and aligns with JetBrains conventions across all platforms.

What are the iron laws and red flags to check when reviewing Kotlin code?

Idiomatic Kotlin conventions override general rules to prevent Java anti-patterns and improve readability. They provide Kotlin-specific guidance on naming, formatting, and idiomatic usage tailored to Kotlin, ensuring files and declarations feel native.

Does this Kotlin coding convention guidance apply to multiplatform and Android modules?

To enforce idiomatic Kotlin coding conventions during code review, apply Kotlin-specific rules that override general guidance. This catches risky anti-patterns like `!!` or `GlobalScope` and ensures alignment with JetBrains conventions for safer, clearer code.