kmp-data-layer

Standardizes Kotlin Multiplatform data-layer patterns with Arrow Either boundaries.

1|Updated Nov 26, 2025
One-click install
npx skills add https://github.com/niltsiar/kotlin_multiplatform_pokedex --skill kmp-data-layer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kmp-data-layer
Source: https://github.com/niltsiar/kotlin_multiplatform_pokedex/tree/main/.agents/kmp-data-layer
Command: npx skills add https://github.com/niltsiar/kotlin_multiplatform_pokedex --skill kmp-data-layer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Standardizes Kotlin Multiplatform data-layer patterns by enforcing Arrow Either boundaries at repository boundaries.

Core Features & Use Cases

  • Provides a clear interface between API services and domain models using Either<RepoError, T> across repositories.
  • Includes DTO-to-domain mapping patterns and centralized error handling that map API/IO exceptions to a sealed RepoError hierarchy.
  • Supports testing patterns and documentation references to ensure consistent data-layer implementations across features.

Quick Start

Create a Kotlin Multiplatform data-layer skeleton with Arrow Either error boundaries and DTO-to-domain mapping.

Frequently Asked Questions about kmp-data-layer

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

FAQPage Schema
How do I standardize error handling in a Kotlin Multiplatform data layer?

Standardize Kotlin Multiplatform data layers by enforcing Arrow Either boundaries at repository interfaces, mapping API and IO exceptions into a centralized sealed RepoError hierarchy for consistent error handling.

What is the best way to map DTOs to domain models in KMP repositories?

Mapping DTOs to domain models in KMP repositories is handled through standardized patterns that return Either<RepoError, T>, ensuring type-safe conversions and clear separation between API services and domain layers.

How do I test Kotlin Multiplatform repositories that use Arrow Either?

Test Kotlin Multiplatform repositories using Either boundaries by applying provided testing patterns with Kotest and MockK to validate error hierarchies and DTO-to-domain mapping logic.

Can I use Arrow Either for offline-first architecture in Kotlin Multiplatform?

Arrow Either repository boundaries in Kotlin Multiplatform support offline-first considerations by consistently wrapping data operations and mapping IO exceptions into sealed RepoError types for reliable failure handling.

Does this KMP data layer approach require a specific error hierarchy structure?

Yes, implementing this KMP data layer pattern requires a clear RepoError sealed class hierarchy to properly map API and IO exceptions at the repository boundary using Arrow Either.