一键导入
kotlin
Use for Kotlin code in telegram-home-bot: JVM 17, Spring Boot Kotlin, Gradle Groovy DSL, src/main/java Kotlin layout, null-safety, constructor DI, ktlint.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use for Kotlin code in telegram-home-bot: JVM 17, Spring Boot Kotlin, Gradle Groovy DSL, src/main/java Kotlin layout, null-safety, constructor DI, ktlint.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when adding or changing Docker Compose for telegram-home-bot: app service, .env, persistent H2 data, SonarQube profile, bridge/host networking.
Use for Dockerfile and container runtime changes in telegram-home-bot: Raspberry Pi/Linux runtime, fping/iproute2, Gradle bootJar, network mode, ports, logs.
Use when changing database schema, writing Flyway migrations, reviewing SQL migrations, or working with H2 and Spring Boot database startup.
Use for Hibernate/JPA/Flyway work in telegram-home-bot: H2 schema migrations, Kotlin entities, repositories, lazy relations, sequences, entity equality.
Use when changing Docker, Docker Compose, runtime configuration, Raspberry Pi deployment, Linux service setup, or lightweight production deployment.
Use for Spring Boot work in telegram-home-bot: configuration, scheduling, security, Thymeleaf, Telegram bot, OpenWeather, actuator, events, testing.
| name | kotlin |
| description | Use for Kotlin code in telegram-home-bot: JVM 17, Spring Boot Kotlin, Gradle Groovy DSL, src/main/java Kotlin layout, null-safety, constructor DI, ktlint. |
This project uses Kotlin 1.9.25 targeting JVM 17. All source files are .kt located under src/main/java/ (legacy layout — do not move them).
?.let { } for null-safe chaining — this is the dominant patternlateinit var for @Value-injected Spring propertiesOptional<Host?> return types are used in some repository/service methods — unwrap with .orElse(null)!! — prefer safe calls or early returnsdata class) — required by HibernatePasswordDto, TimeLogDto, GenericResponse are regular classes with var/valobject for constants (AppConstants), enums for type-safe constantsfun getHostByMac(mac: String?): Host? = hostRepository.findHostByMac(mac)when as expression (exhaustive), not statementif-else as expression when possible@field:NotBlank — JSR-380 annotations require @field: target in Kotlin@JvmStatic — not needed in this project (no Java interop from outside)@Throws(Exception::class) — used sparingly, only in SecurityConfiguration.filterChain().filter { }, .map { }, .sortedWith(), .joinToString(), .none { }ArrayList() for mutable lists when building keyboard rowsPair(a, b) for destructuring declarationsval log = logger() from random.telegramhomebot.utils.logger — project utilitylog.debug("[{}] command was executed", update.message)if (log.isDebugEnabled) for expensive formatting@Autowired on fields or settersprivate val for injected dependenciesHost entity for convenience!! (force unwrap)data class for JPA entities@Autowired on fields — always constructor injectionsrc/main/java/ — it's the established layout