kotlin-lang

Provide a compact Kotlin language reference for JVM development.

Updated Apr 8, 2026
One-click install
npx skills add https://github.com/ClankerGuru/opsx --skill kotlin-lang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kotlin-lang
Source: https://github.com/ClankerGuru/opsx/tree/main/cli/src/main/resources/content/skills/kotlin-lang
Command: npx skills add https://github.com/ClankerGuru/opsx --skill kotlin-lang

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Quickly access a compact Kotlin language reference that covers essential concepts, from types to exceptions, so you can write correct Kotlin on the JVM without flipping through the official docs.

Core Features & Use Cases

  • Covers primitive types, null safety, classes, functions, scope functions (let, run, apply, with, also), collections, generics, and delegation.
  • Provides practical examples and guidance for common tasks like null-safe calls, data classes, sealed hierarchies, and Kotlin-Java interop.

Quick Start

Try the included Kotlin examples to reinforce idiomatic Kotlin usage in daily development.

Frequently Asked Questions about kotlin-lang

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

FAQPage Schema
How do I use Kotlin scope functions like let, run, apply, also, and with correctly?

Kotlin scope functions execute blocks of code in the context of an object. Use apply for configuration, let for null checks, and also for side effects, providing concise idiomatic syntax for object initialization and transformations.

How does Kotlin null safety work for safe calls and nullable types?

Kotlin null safety distinguishes nullable types using the question mark operator. Apply safe calls with the dot-question-mark syntax or the elvis operator to handle null values explicitly, preventing NullPointerExceptions at compile time.

Can I use Kotlin collections and generics for JVM-based development?

Yes, Kotlin collections and generics are fully compatible with JVM-based development. Apply read-only and mutable collection interfaces, and use declaration-site variance and reified generics to write type-safe, flexible data structures.

What is the best way to implement Kotlin-Java interop and sealed hierarchies?

Implement Kotlin-Java interop by applying the JvmStatic and JvmField annotations to expose APIs cleanly. Use sealed class hierarchies to represent restricted inheritance graphs, enabling exhaustive when-expressions and type-safe state modeling.

When should I use Kotlin delegation instead of inheritance for classes?

Use Kotlin delegation by applying the by keyword when you need to share behavior across unrelated classes without deep inheritance hierarchies. This approach delegates interface implementation to a separate object, promoting composition over inheritance.