kotlin-expert

Guide advanced Kotlin patterns for state management, type safety, and performance.

9|2|Updated Feb 14, 2026
One-click install
npx skills add https://github.com/dallay/corvus --skill kotlin-expert-dallay
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kotlin-expert
Source: https://github.com/dallay/corvus/tree/main/.agents/skills/kotlin-expert
Command: npx skills add https://github.com/dallay/corvus --skill kotlin-expert-dallay

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers write more robust, performant, and maintainable Kotlin code by leveraging advanced language features and patterns specific to modern application development.

Core Features & Use Cases

  • State Management: Implement efficient state handling with StateFlow and SharedFlow.
  • Type Safety: Utilize sealed classes and interfaces for robust error handling and state modeling.
  • Performance Optimization: Apply @Immutable for Compose, inline functions, and reified types.
  • DSL Builders: Create readable, type-safe Domain-Specific Languages.
  • Use Case: Refactor a complex UI state management system using StateFlow for predictable updates, or implement a type-safe API for configuring network requests using DSL builders.

Quick Start

Use the kotlin-expert skill to understand how to implement state management using StateFlow.

Frequently Asked Questions about kotlin-expert

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

FAQPage Schema
How do I manage UI state in Kotlin using StateFlow and SharedFlow?

Manage UI state in Kotlin by using StateFlow to hold a single state value and emit updates to active collectors, while SharedFlow broadcasts events to multiple subscribers without retaining state.

When should I use sealed classes for state modeling and error handling?

Use sealed classes for state modeling and error handling when you need to represent a restricted hierarchy of types, ensuring that all possible states or outcomes are checked at compile time.

What's the best way to optimize Jetpack Compose performance with Kotlin?

Optimize Jetpack Compose performance by annotating data classes with @Immutable to signal the compiler that their values never change, preventing unnecessary recompositions during UI updates.

How do I create type-safe DSL builders for fluent APIs in Kotlin?

Create type-safe DSL builders in Kotlin by leveraging function literals with receivers to define a scoped context, allowing you to construct hierarchical API configurations fluently and safely.

Why use inline and reified functions for Kotlin performance optimization?

Use inline functions to eliminate the overhead of lambda allocations and reified types to access actual type arguments at runtime, combining to optimize performance while preserving type safety.