ktlint

Installation
SKILL.md

Ktlint

Use this skill to format and lint Kotlin code with ktlint, and to set up or maintain ktlint tooling in a project.

Quick start

  1. Detect how the project runs ktlint (Gradle tasks vs CLI).
  2. Run ktlint check or format on the target paths.
  3. Fix or configure rules via existing project config (usually .editorconfig).

Determine the integration

  • Prefer existing build tasks: look for ktlintCheck / ktlintFormat (or custom ktlint tasks) in Gradle.
  • If there are no build tasks, fall back to the ktlint CLI if it is installed.
  • Before changing setup, search for existing config and automation:
    • .editorconfig and any ktlint sections
    • build.gradle / build.gradle.kts
    • CI files (GitHub Actions, GitLab CI, etc.)
    • pre-commit hooks
Installs
2
Repository
cyanxiao/skills
First Seen
Jan 30, 2026
ktlint — cyanxiao/skills