sqldelight

Manages KotlinX project-wide database tasks including schema migrations and typed queries with ease.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Zeyden/claude-skills --skill sqldelight-zeyden
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sqldelight
Source: https://github.com/Zeyden/claude-skills/tree/main/skills/sqldelight-kmp
Command: npx skills add https://github.com/Zeyden/claude-skills --skill sqldelight-zeyden

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies database interactions in Kotlin Multiplatform projects by generating typesafe Kotlin APIs from SQL statements, ensuring compile-time validation and robust data management across platforms.

Core Features & Use Cases

  • Database Setup: Configure SQLDelight for various KMP targets (Android, iOS, JVM, JS/WASM).
  • Schema & Migrations: Define and manage database schemas and migrations with compile-time verification.
  • Querying: Write and execute typesafe SQL queries using Kotlin Coroutines and Flows.
  • Use Case: Integrate SQLDelight into your KMP app to efficiently store and retrieve user preferences, ensuring data consistency and performance on all target platforms.

Quick Start

Configure SQLDelight in your KMP project by adding the plugin and defining your database in shared/build.gradle.kts.

Frequently Asked Questions about sqldelight

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

FAQPage Schema
How do I set up a typesafe database in Kotlin Multiplatform?

To set up a typesafe database in Kotlin Multiplatform, you configure the SQLDelight Gradle plugin in your build file and define your database schema in .sq files. This generates typesafe Kotlin APIs from your SQL statements with compile-time validation.

Can I use Kotlin Coroutines and Flows for reactive database queries in KMP?

Yes, you can use Kotlin Coroutines and Flows for reactive database queries in KMP. SQLDelight integrates Coroutines and Flows to execute and observe typesafe SQL queries, ensuring data consistency and performance across Android, iOS, JVM, and JS/WASM platforms.

What is the best way to manage database migrations in a Kotlin Multiplatform project?

The best way to manage database migrations in a Kotlin Multiplatform project is using SQLDelight's compile-time verification. You define and manage database schemas and migrations directly in .sq files, ensuring robust data management and preventing migration errors before runtime.

Does SQLDelight support custom types and adapters across Android and iOS targets?

Yes, SQLDelight supports custom types and adapters across Android and iOS targets. You can write .sq files with custom types and configure database drivers for various KMP targets, ensuring robust data management and consistency on all platforms.

How do I configure database drivers for different platforms in Kotlin Multiplatform?

To configure database drivers for different platforms in Kotlin Multiplatform, you set up platform-specific driver implementations for Android, iOS, JVM, and JS/WASM. SQLDelight provides expert guidance on driver setup and integrates with dependency injection and Ktor.

Why use SQLDelight for local storage instead of other Kotlin Multiplatform database options?

You use SQLDelight for local storage to generate typesafe Kotlin APIs directly from SQL statements. Unlike other Kotlin Multiplatform database options, it provides compile-time validation of your SQL queries and schema, ensuring robust data management across all target platforms.