Agent skill

kotlin-exposed-patterns

JetBrains Exposed ORM patterns including DSL queries, DAO pattern, transactions, HikariCP connection pooling, Flyway migrations, and repository pattern.

mturacgithub.com/mturacGitHub ↗
codexcopilotcursorMIT
Install
npx skills add mturac/everything-openai-codex --skill kotlin-exposed-patterns --agent codex

Same command for any agent — swap --agent for claude-code, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 21 KB
Bundled scripts: none
Path: skills/kotlin-exposed-patterns/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 84
Language: JavaScript

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

Describes patterns for database access using JetBrains Exposed ORM, covering DSL queries, DAO pattern, transactions, HikariCP configuration, Flyway migrations, and a repository abstraction to decouple business logic from data access.

How it works

The skill explains two query styles: DSL and DAO. It shows HikariCP setup via a HikariConfig block and a database factory that connects through HikariDataSource. It documents running Flyway migrations at startup, with a sample Application.module wiring. It demonstrates wrapping database operations inside newSuspendedTransaction for coroutine safety and atomicity. It provides a repository pattern example with an ExposedUserRepository implementing UserRepository, exposing methods to find, list, search, create, update, delete, and count users, all executed within newSuspendedTransaction blocks. It includes comprehensive DSL and DAO code examples for CRUD, joins, aggregations, subqueries, pagination, batch operations, and upserts, plus DAO entity definitions and their mappings to models. It also showcases transaction usage, isolation levels, and repository interface and implementation.

When to use it

  • 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

What it can touch

  • Tools: codex, copilot, cursor (as declared)
  • Code sections include Kotlin files (DSL tables, queries, DAO entities, migrations, and repository implementations) using Exposed ORM APIs, HikariCP configuration, and Flyway migration tooling.

Caveats

  • The provided snippets assume Kotlin + Exposed usage, coroutine context, and a PostgreSQL-like environment (JSONB, UUIDs, etc.).
  • Specific file paths and full project wiring are example-oriented; real projects may require adjustments to environment properties and module structure.
From the SKILL.md

# 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 ```kotlin suspend fun findUserById(id: UUID): UserRow? = newSuspendedTransaction { UsersTable.selectAll() .where { UsersTable.id eq id } .map {

What's inside
Steps it walks through
  1. When to Use
  2. How It Works
  3. Examples
  4. DSL Query
  5. DAO Entity Usage
  6. HikariCP Configuration
  7. Database Setup
  8. HikariCP Connection Pooling
  9. Flyway Migrations
  10. Migration Files
  11. Table Definitions
  12. DSL Style Tables
  13. Composite Tables
  14. DSL Queries
More from everything-openai-codex
All skills →
About this skill
What does the kotlin-exposed-patterns skill do?

JetBrains Exposed ORM patterns including DSL queries, DAO pattern, transactions, HikariCP connection pooling, Flyway migrations, and repository pattern.

How do I install it?

Run `npx skills add mturac/everything-openai-codex --skill kotlin-exposed-patterns --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From mturac/everything-openai-codex, a repository with 84 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going