Agent Skills
› DetachHead/rebased
› code-style
code-style
GitHub提供 IntelliJ 代码库的 Kotlin 编码规范,涵盖语言特性、格式化及构建脚本风格,用于指导代码编写与审查以确保合规性。
触发场景
编写新文件
代码审查
安装
npx skills add DetachHead/rebased --skill code-style -g -y
SKILL.md
Frontmatter
{
"name": "code-style",
"description": "Code style rules for IntelliJ codebase. Use when writing or reviewing code for style compliance."
}
Code Style
Follow the IntelliJ Coding Guidelines with these IntelliJ-specific rules.
Language
- ALWAYS use Kotlin for new files - Only use Java when modifying existing Java code
- Use idiomatic Kotlin: extension functions, data classes, null safety
- Mark experimental APIs with
@ApiStatus.Experimental - Build scripts Kotlin style: Follow
community/platform/build-scripts/kotlin-style-recommendations.mdfor build-scripts code:- Use
@JvmFieldfor internal data class fields - Use
.put()/.get()instead of[]operator - Use explicit
HashMap/HashSet/LinkedHashMapinstead ofmutableMapOf()/mutableSetOf()
- Use
Formatting
- Indentation: 2 spaces (4 for Go files)
- Line length: 140 characters max
- Braces: else/catch/finally on new lines
- Only in
/rustroverdirectory you must always use standard Kotlin formatting rules with 4 spaces indentation.
版本历史
- 1f8708d 当前 2026-08-16 15:38


