Skip to content
affaan-m avatar

Kotlin Exposed Patterns

Reference patterns for the JetBrains Exposed ORM covering DSL and DAO queries, transactions, and production setup.

CCM score
71 of 100
skills.sh installs
11.6K
GitHub stars
312.6K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers DSL and DAO query styles, newSuspendedTransaction usage, and a repository pattern that keeps business logic separate from the data layer
  • Includes HikariCP pool configuration, Flyway migration setup at startup, and sample table definitions with JSONB and composite keys
  • Provides CRUD and join query examples, with an in-memory H2 database suggested for tests
  • Designed for Kotlin backend services that use Exposed with PostgreSQL and need coroutine-safe transactions

Install

$ npx -y skills add affaan-m/ecc --skill kotlin-exposed-patterns -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Kotlin Exposed Patterns

Comprehensive patterns for database access with JetBrains Exposed ORM, including DSL queries, DAO, transactions, and production-ready configuration.

When to Use

  • Setting up database access with Exposed
  • Writing SQL queries using Exposed DSL or DAO
  • Configuring connection pooling with HikariCP
  • Creating database migrations with Flyway
  • Implementing the repository pattern with Exposed
  • Handling JSON columns and complex queries

How It Works

Exposed provides two query styles: DSL for direct SQL-like expressions and DAO for entity lifecycle management. HikariCP manages a pool of reusable database connections configured via HikariConfig. Flyway runs versioned SQL migration scripts at startup to keep the schema in sync. All database operations run inside newSuspendedTransaction blocks for coroutine safety and atomicity. The repository pattern wraps Exposed queries behind an interface so business logic stays decoupled from the data layer and tests can use an in-memory H2 database.

Examples

DSL Query

Details

Repository
github.com/affaan-m/ecc
Categories
Databases, Java & JVM
First seen
Jul 14, 2026

Questions

What does the kotlin-exposed-patterns skill do?

It gives agents patterns for the JetBrains Exposed ORM in Kotlin, covering DSL queries, the DAO pattern, transactions, HikariCP connection pooling, Flyway migrations, and the repository pattern. It also covers JSON columns and complex queries, with examples of table definitions and migration files.

When should I use the kotlin-exposed-patterns skill?

Use it when you are setting up database access with Exposed, writing DSL or DAO queries, configuring HikariCP pooling, creating Flyway migrations, or implementing a repository layer. Its SKILL.md lists these cases as the times to load it.

How do I install the kotlin-exposed-patterns skill?

Run npx -y skills add affaan-m/ecc --skill kotlin-exposed-patterns -y in your project. After that, the agent can write Exposed queries with suspended transactions, set up a HikariCP pool, and run Flyway migrations at startup.

Where does kotlin-exposed-patterns rank in its category?

It sits in the Databases category on Claude Marketplaces and ranks in the top 50 there. Other skills that lead the category include supabase-postgres-best-practices and several Prisma skills, while this one focuses on Kotlin and JetBrains Exposed.

More from affaan-m/ecc

All 257

Similar to Kotlin Exposed Patterns

More Databases