# Code Style

> Code Style is an Agent Skill for development published in the JetBrains/intellij-community repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Code style rules for IntelliJ codebase. Use when writing or reviewing code for style compliance.

- Skill name: `code-style`
- Category: [Development](https://www.openparable.com/skill/development/1)
- Source: https://github.com/JetBrains/intellij-community/blob/HEAD/.claude/skills/code-style/SKILL.md
- Repository: JetBrains/intellij-community (20,363 GitHub stars when collected)

## SKILL.md

<!-- Generated by community/.ai/render-guides.mjs; edit community/.agents/skills/code-style/SKILL.md -->

# 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.md` for build-scripts code:
  - Use `@JvmField` for internal data class fields
  - Use `.put()`/`.get()` instead of `[]` operator
  - Use explicit `HashMap`/`HashSet`/`LinkedHashMap` instead of `mutableMapOf()`/`mutableSetOf()`

## Formatting

- Indentation: 2 spaces (4 for Go files)
- Line length: 140 characters max
- Braces: else/catch/finally on new lines
- Only in `/rustrover` directory you must always use standard Kotlin formatting rules with 4 spaces indentation.

---

Source: https://www.openparable.com/skill/development/code-style-49912713 (OpenParable). Cite the canonical URL above.
