Code style

From JetBrains/intellij-community · View interactive version

Code style is an AI agent skill from the GitHub repository JetBrains/intellij-community. Apply IntelliJ Kotlin and Java code style when writing or reviewing.

How to use this skill

Skill file

Code Style

Follow the IntelliJ Coding Guidelines with these IntelliJ-specific rules.

Language

Sealed hierarchies

Formatting

Threading annotations

or @RequiresReadLockAbsence, do not pass generateAssertion. Keep the default value unless the user explicitly requests a different one.

Error handling

It rethrows a control flow exception, such as CancellationException. A control flow exception must never reach the log.

try {
  doWork()
}
catch (e: Throwable) {
  rethrowControlFlowException(e)
  LOG.error(e)
}
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.