一键导入
data-access
CRITICAL: Load when touching *BO.kt, *DBO.kt, *DTO.kt, *Mapper.kt, *Repository.kt, or *DataSource.kt. Wrong layer boundaries = immediate PR rejection.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
CRITICAL: Load when touching *BO.kt, *DBO.kt, *DTO.kt, *Mapper.kt, *Repository.kt, or *DataSource.kt. Wrong layer boundaries = immediate PR rejection.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Load when adding scheduled tasks, periodic jobs, or background coroutines. Covers the coroutine-based task pattern, error handling, and lifecycle management.
Load when configuring build pipeline, CI workflows, SonarCloud, JaCoCo, or the Gradle version catalog. Covers fatJar, ktlint, and dependency management.
Load when adding new configuration properties, modifying HOCON files, or understanding how config is loaded. Covers app.conf, application.conf, and the loading pipeline.
IMPORTANT: Load when adding error handling in routes, services, or repositories. Covers AcknowledgeBO vs exceptions, standardized responses, and proper logging.
Load when implementing multipart file upload, download, or file storage. Covers multipart parsing, validation, disk persistence, and URL generation.
IMPORTANT: Load when adding monitoring, metrics, or logging. Covers Micrometer/Prometheus, SLF4J usage, CallLogging, and observability patterns.
| name | data-access |
| description | CRITICAL: Load when touching *BO.kt, *DBO.kt, *DTO.kt, *Mapper.kt, *Repository.kt, or *DataSource.kt. Wrong layer boundaries = immediate PR rejection. |
data/dto/, data/bo/, data/dbo/, data/mapper/, data/repository/, data/datasource/*DTO, *BO, *DBO, *Mapper, *Repository, *DataSourcedi/DataSourceModule.kt, di/RepositoryModule.ktDTO (API contract, kotlinx.serialization @Serializable)
↕ Mapper (extension functions)
BO (business object, domain model)
↕ Mapper (extension functions)
DBO (MongoDB document, org.bson.types.ObjectId)
↓
DataSource (local= MongoDB / remote= Ktor HttpClient)
↓
Repository (interface + impl, orchestrates datasources)
data/mapper/{entity}/Mapper.ktDTO.toBO(), BO.toDBO(), DBO.toBO(), BO.toDTO()@JvmName("${type}To${Type}") fun List<A>.toB() = this.map { it.toB() }data/dbo/{entity}/org.bson.types.ObjectId for _id@Serializable with kotlinx.serializationdata/bo/{entity}/Principal when used as auth principalequals/hashCode for ByteArray fields (e.g., totpEncodedSecret)data/dto/{entity}/@Serializable with kotlinx.serialization@SerialName for JSON field mappingdata/datasource/local/{entity}/*LocalDataSource* (MongoDB)data/datasource/remote/{entity}/*RemoteDataSource* (Ktor HTTP Client)*ApiDataSource — use *RemoteDataSourcedata/repository/{entity}/*Repository*AcknowledgeBO for write operationsdata/exception/CustomExceptions.ktUserBO for auth context// DataSourceModule.kt
single<XLocalDataSource> { XLocalDataSourceImpl(get(named("collectionName"))) }
// RepositoryModule.kt
single<XRepository> { XRepositoryImpl(get()) }
AcknowledgeBO*ApiDataSource → use *RemoteDataSource.github/instructions/ — no instructions file exists for this projectsrc/main/kotlin/es/wokis/data/mapper/