code-style

Enforce IntelliJ code style rules for Kotlin and Java files.

20.4k|6.0k|Updated Sep 30, 2011
One-click install
npx skills add https://github.com/JetBrains/intellij-community --skill code-style-jetbrains
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-style
Source: https://github.com/JetBrains/intellij-community/tree/main/.agents/skills/code-style
Command: npx skills add https://github.com/JetBrains/intellij-community --skill code-style-jetbrains

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

IntelliJ codebase style rules are defined to ensure consistent coding conventions across the project, reducing review friction and stylistic drift.

Core Features & Use Cases

  • Kotlin-first guidelines for new files; Java only when modifying existing code to preserve momentum and compatibility.
  • Formatting and style rules covering indentation, line length, braces, and API usage annotations to maintain readability and safety.
  • Build-script style guidance for Kotlin-based scripts and a note on special-case formatting for non-standard directories like rustrover.

Quick Start

Apply these coding guidelines when creating or reviewing code to ensure IntelliJ-style compliance.

Frequently Asked Questions about code-style

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce IntelliJ code style rules across a Kotlin and Java repository?

To enforce IntelliJ code style rules, apply guidelines requiring 2-space indentation, 140-character line length, and braces on new lines to all new and existing Kotlin and Java files during code reviews.

What are the IntelliJ coding guidelines for choosing between Kotlin and Java?

IntelliJ coding guidelines prefer Kotlin for all new files, allowing Java only when modifying existing Java code to preserve project momentum and maintain backward compatibility.

Does IntelliJ code style enforce specific formatting rules for build scripts?

Yes, IntelliJ code style provides explicit formatting guidance for Kotlin-based build scripts, while noting special-case formatting exceptions for non-standard directories like rustrover.

How do I handle experimental APIs and directory exceptions when applying IntelliJ code style?

Applying IntelliJ code style requires explicit usage guidelines for experimental APIs and recognizes special-case formatting exceptions for non-standard directories like rustrover to maintain safety and readability.

When should I use Java instead of Kotlin for new code under IntelliJ coding guidelines?

You should use Java instead of Kotlin only when modifying existing Java code, as IntelliJ coding guidelines mandate a Kotlin-first approach for all new files to ensure consistent language momentum.

What line length and indentation limits are required by IntelliJ code style rules?

IntelliJ code style rules require 2-space indentation and a maximum line length of 140 characters, along with placing braces on new lines to maintain consistent formatting across the repository.