kotlin-expert

Apply advanced Kotlin patterns for state management and type safety.

Updated Mar 13, 2026
One-click install
npx skills add https://github.com/fsales/curso-android-capgemini-proway --skill kotlin-expert-fsales
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kotlin-expert
Source: https://github.com/fsales/curso-android-capgemini-proway/tree/main/exercicio/EAluno/.github/skills/kotlin-expert
Command: npx skills add https://github.com/fsales/curso-android-capgemini-proway --skill kotlin-expert-fsales

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers apply advanced Kotlin architecture patterns correctly, reducing mistakes in state management, type modeling, immutability, DSL design, and performance optimization.

Core Features & Use Cases

  • Flow State Management: Guides the use of StateFlow, SharedFlow, and MutableStateFlow patterns for reliable application state handling.
  • Type Safety & Performance Patterns: Explains sealed hierarchies, immutable models, DSL builders, inline functions, and reified generics with practical examples.
  • Use Case: Use this Skill when building Kotlin or Android applications that need scalable state handling, Compose-friendly immutable data models, and optimized reusable APIs.

Quick Start

Use the kotlin-expert skill to review my Kotlin ViewModel state architecture and suggest improvements using StateFlow, sealed classes, and immutable patterns.

Frequently Asked Questions about kotlin-expert

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

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

StateFlow and SharedFlow manage Kotlin application state by handling reliable data streams. Use StateFlow for state holding and SharedFlow for event broadcasting to ensure maintainable architecture.

What is the best way to model immutable state for Kotlin Compose?

The best way to model immutable state for Kotlin Compose is using sealed class hierarchies and immutable data models. This approach ensures type safety and prevents unexpected state mutations during recomposition.

How do I build a DSL in Kotlin using inline functions and reified generics?

Build a Kotlin DSL using inline functions and reified generics to construct type-safe reusable APIs. This pattern enables performant compile-time type resolution without reflection overhead.

Can I use sealed classes for performance optimization in Android development?

Sealed classes optimize Android development performance by enabling exhaustive when-expressions at compile time. They eliminate runtime type checks and support type-safe hierarchical state modeling.

When do I need MutableStateFlow instead of StateFlow for Kotlin architecture?

You need MutableStateFlow when your Kotlin architecture requires updating state values directly. StateFlow is read-only, while MutableStateFlow allows both reading and emitting state changes.