RE

repository

Standardize database access and repository patterns using Kotlin and SQL transactions.

Install

mkdir -p .claude/skills/repository && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/15048" && unzip -o skill.zip -d .claude/skills/repository && rm skill.zip

Installs to .claude/skills/repository

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Repository-mønster med Kotlin object og Connection/TransactionalSession extension-funksjoner, DBUtils-transaksjoner og ResultSet-mapping
136 charsno explicit “when” trigger
Intermediate

Key capabilities

  • →Implement repository pattern with Kotlin objects
  • →Use `Connection` and `TransactionalSession` extension functions
  • →Manage database transactions via `DBUtils.asyncTransaction` or `DBUtils.transaction`
  • →Centralize `ResultSet` to domain mapping in `RepositoryMappers.kt`
  • →Handle database errors using `useAndHandleErrors`
  • →Configure `PostgresDataSource` with HikariCP and Vault integration

How it works

The skill defines patterns for database access using Kotlin objects, extension functions, and `DBUtils` for transactions, centralizing data source configuration and result set mapping.

Inputs & outputs

You give it
Kotlin code requiring database access or transaction management
You get back
Database operations performed within transactions, with results mapped to domain objects, following repository patterns

When to use repository

  • →Implementing repository-pattern data access
  • →Configuring transactional database operations
  • →Setting up SQL migration workflows

About repository

Provides patterns for object-based repositories, using extension functions for connections and transactions. Includes configuration for secure migration and data source handling.

Repository-mønster med Kotlin object og Connection/TransactionalSession extension-funksjoner, DBUtils-transaksjoner og ResultSet-mapping

When not to use it

  • →When skipping Flyway migrations for schema changes
  • →When using bare JDBC connections directly in service code

Limitations

  • →All database access must go through `DBUtils.asyncTransaction {}` or `DBUtils.transaction {}`
  • →ResultSet mapping logic must be centralized in `RepositoryMappers.kt`
  • →Bare JDBC connections are not to be used directly in service code

How it compares

This skill enforces a structured, transactional, and type-safe approach to database access in Kotlin, preventing common pitfalls like scattered ResultSet mapping or unmanaged connections, unlike direct JDBC usage.

Compared to similar skills

repository side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
repository (this skill)06moNo flagsIntermediate
drizzle-orm325moNo flagsIntermediate
database-migration35moNo flagsAdvanced
backend-dev19moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry