Kotlin Backend Conventions logo

Kotlin Backend Conventions

OrganizationPopular
TencentBlueKing
kotlin-backend-conventions

编写 BK-CI Kotlin 后端代码时使用,例如 Kotlin 文件结构、格式、命名、函数设计、空安全和 BK-CI 项目内的调用约定。当用户要修改 `.kt` 或 `.kts` 后端代码并需要项目级 Kotlin 规范时优先使用。

Overview

PublisherTencentBlueKing
Repositorybk-ci
Skill namekotlin-backend-conventions
Stars
2.5K
Forks
524
Bundled files
3
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by TencentBlueKing on GitHub. Read the source before you install it.

Installation

Install the Kotlin Backend Conventions AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/TencentBlueKing/bk-ci.git /tmp/bk-ci
mkdir -p .claude/skills
cp -r /tmp/bk-ci/ai/skills/kotlin-backend-conventions .claude/skills/kotlin-backend-conventions
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Kotlin Backend Conventions in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Kotlin Backend Conventions on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Kotlin Backend Conventions is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Kotlin 后端规范

适用场景

  • 编写或重构 BK-CI Kotlin 后端代码
  • 处理 Kotlin 文件结构、格式和命名规范
  • 调整函数设计、对象创建、空安全和集合使用方式
  • 判断某段 Kotlin 写法是否符合项目约定

不适用场景

  • 只是一般后端分层或服务归属判断
  • 只是 Spring Boot 配置和框架用法
  • 只是单元测试写法,不涉及 Kotlin 语言约定

快速指导

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

高信号规则

  • Kotlin 规范的重点是可读性、一致性和低歧义,而不是把语言特性全部用满
  • 项目特有约定应优先于泛化教程式知识
  • 语言规范适合按需加载为 skill,不适合以长篇 rule 常驻在每次会话中

关键陷阱

  • 把通用 Kotlin 教程内容原样塞进规则层
  • 只记格式,不看 BK-CI 项目特有约束
  • 语言规范、后端架构规范、Spring Boot 用法混成一个大文档

延伸阅读

  • 文件结构、格式与导入:reference/1-file-format-import.md
  • 命名、函数设计与对象调用:reference/2-naming-function-design.md
  • 空安全、集合与 BK-CI 项目约定:reference/3-null-safety-project-practice.md
  • 如果你在改后端分层:再看 backend-microservice-development
  • 如果你在写测试:再看 unit-testing

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Kotlin Backend Conventions AI skill do?

编写 BK-CI Kotlin 后端代码时使用,例如 Kotlin 文件结构、格式、命名、函数设计、空安全和 BK-CI 项目内的调用约定。当用户要修改 `.kt` 或 `.kts` 后端代码并需要项目级 Kotlin 规范时优先使用。

Why use Kotlin Backend Conventions on TypingMind?

Because you install it once and use it with any model. Kotlin Backend Conventions is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Kotlin Backend Conventions in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/TencentBlueKing/bk-ci/tree/master/ai/skills/kotlin-backend-conventions. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Kotlin Backend Conventions?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Kotlin Backend Conventions?

As many as you like. As long as a model supports skills, you can use Kotlin Backend Conventions with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Kotlin Backend Conventions AI skill free?

It is published on GitHub by TencentBlueKing. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇