Back to Skills

kotlin-exposed-patterns

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

184,214stars28,424forksUpdated 5/16/2026

Security Assessment

Low Risk(70/100)

Detected risks:

Secret Exposure([SKILL.md] password =)
Security Score70/100

About kotlin-exposed-patterns

The kotlin-exposed-patterns skill provides a comprehensive suite of patterns and best practices for working with the JetBrains Exposed ORM in Kotlin. It addresses common challenges in database access and management, offering a structured approach to SQL operations, entity management, and transactional safety. By encapsulating database interactions in coroutine-safe transactions, this skill ensures efficient and reliable execution of queries, minimizing the risk of resource leaks or inconsistent state. It also integrates production-ready features like connection pooling and schema migrations, allowing developers to focus on application logic rather than low-level database details.

The main features of this skill include support for both DSL-style queries and DAO entity management, giving developers flexibility in how they interact with the database. Connection pooling is handled through HikariCP, enabling efficient reuse of database connections, while Flyway ensures schema consistency via versioned migrations. Additionally, the skill promotes the repository pattern, which decouples business logic from the data layer and facilitates testing using in-memory databases. The skill also includes examples of handling JSON columns and complex queries, making it suitable for modern applications with advanced data requirements.

This skill is ideal for Kotlin developers building applications that require structured and maintainable database access. It is particularly useful for teams adopting Exposed ORM and looking to implement best practices for transaction management, connection pooling, and schema migrations. Common use cases include setting up new database-backed applications, refactoring legacy code to follow modern patterns, and implementing robust data access layers in production environments. By using kotlin-exposed-patterns, developers can improve code reliability, maintainability, and scalability while adhering to Kotlin and Exposed ORM idioms.

FAQ

How do I run queries using kotlin-exposed-patterns?

You can use either DSL queries for SQL-like expressions or DAO entities for lifecycle management, both within coroutine-safe newSuspendedTransaction blocks.

Which databases are compatible with this skill?

Any database supported by JetBrains Exposed and HikariCP can be used. PostgreSQL is commonly used in examples, but the configuration is flexible.

Can I use this skill in a production environment?

Yes. The skill includes production-ready features such as HikariCP connection pooling and Flyway migrations for schema management.

Does it support JSON columns and complex queries?

Yes, examples in the skill demonstrate handling JSONB columns and performing complex queries using DSL and DAO patterns.

Do I need to configure transactions manually?

No. All database operations are wrapped in newSuspendedTransaction blocks, which handle coroutine safety and atomicity automatically.

Install kotlin-exposed-patterns

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill