# Code Style

> Code style rules for IntelliJ codebase. Use when writing or reviewing code for style compliance. Use when this capability is needed.

- Skill: `tomevault-io/code-style-3` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/code-style-3`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/code-style-3/raw
- Safety review: pending (external: skill-scanner PASS, skillspector CAUTION)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/code-style-3

---

<!-- 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.

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/jetbrains) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-11 -->

