Kotlin backend conventions

From TencentBlueKing/bk-ci · View interactive version

Kotlin backend conventions is an AI agent skill from the GitHub repository TencentBlueKing/bk-ci. 编写 BK-CI Kotlin 后端代码时使用,例如 Kotlin 文件结构、格式、命名、函数设计、空安全和 BK-CI 项目内的调用约定。当用户要修改 `.kt` 或 `.kts` 后端代码并需要项目级 Kotlin 规范时优先使用。

How to use this skill

Skill file

Kotlin 后端规范

适用场景

不适用场景

快速指导

  1. 这个 skill 关注的是 BK-CI Kotlin 代码约定,不替代后端分层、API 设计或 Spring Boot 架构 skill。
  2. Kotlin 规范建议分三块看:
  1. 能交给格式化工具和静态检查的规则,不要在主 skill 里重复展开。
  2. 项目特有的高价值约定要优先关注,例如行宽、命名参数、禁止 wildcard import、避免完整类路径直接调用。
  3. 如果问题已经转向后端服务分层,联动看 backend-microservice-development;如果问题转向 Spring Boot 框架用法,后续再看对应框架规范。

高信号规则

关键陷阱

延伸阅读

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.