kotlin-backend-jpa-ent…
Model Kotlin persistence code correctly for Spring Data JPA and Hibernate. Covers entity design, identity and equality,…
Load when building, running, testing, packaging, linting, or configuring a Kotlin/Java project with the Kotlin Toolchain (JetBrains' unified CLI, formerly Amper), when scaffolding a new or greenfield Kotlin project, or when the repo has project.yaml, module.yaml, or a ./kotlin
Claude Code
$ npx -y skills add kotlin/kotlin-agent-skills --skill kotlin-tooling-kotlin-toolchain --agent claude-code
Codex
$ npx skills add kotlin/kotlin-agent-skills --skill kotlin-tooling-kotlin-toolchain -a codex -y
Cursor
$ npx skills add kotlin/kotlin-agent-skills --skill kotlin-tooling-kotlin-toolchain -a cursor -y
Gemini CLI
$ npx skills add kotlin/kotlin-agent-skills --skill kotlin-tooling-kotlin-toolchain -a gemini-cli -y
GitHub Copilot
$ npx skills add kotlin/kotlin-agent-skills --skill kotlin-tooling-kotlin-toolchain -a github-copilot -y
OpenCode
$ npx skills add kotlin/kotlin-agent-skills --skill kotlin-tooling-kotlin-toolchain -a opencode -y
Windsurf
$ npx skills add kotlin/kotlin-agent-skills --skill kotlin-tooling-kotlin-toolchain -a windsurf -y
name: kotlin-tooling-kotlin-toolchain description: > Load when building, running, testing, packaging, linting, or configuring a Kotlin/Java project with the Kotlin Toolchain (JetBrains' unified CLI, formerly Amper), when scaffolding a new or greenfield Kotlin project, or when the repo has project.yaml, module.yaml, or a ./kotlin wrapper. Skip for existing Gradle/Maven projects. license: Apache-2.0 metadata: author: github:@singleton11 version: "0.1.0" provider: anthropic tested_models: "anthropic/claude-sonnet-5, anthropic/claude-opus-5" agent_version: claude-code last_eval: "2026-08-14"
JetBrains' unified CLI for Kotlin (JVM, Android, iOS, multiplatform) and Java projects, in Alpha. Configuration is declarative YAML instead of Gradle build scripts.
Prefer the project's checked-in wrapper: `./kotlin build` needs nothing installed — the wrapper downloads the CLI itself. Install a global CLI only when there is no wrapper (e.g. before `kotlin init`):
sdk install kotlintoolchain # SDKMAN (macOS / Linux / WSL)
The `kotlin` command then auto-provisions its JDK on first use. Other install options (installer scripts, IntelliJ IDEA plugin) live at <https://kotlin-toolchain.org/>.
If the project root ships wrapper scripts (`kotlin` / `kotlin.bat`), the global `kotlin` detects them and proxies into them, pinning the project to the wrapper's version. Always invoke `kotlin` from the project root so the wrapper wins; never call a globally installed binary directly when a wrapper exists.
For the detailed list of commands and their options, run `kotlin --help` or `kotlin <command> --help`.
project-root/
├── kotlin, kotlin.bat # Local wrappers
├── project.yaml # Project-level config
├── libs.versions.toml # Version catalog (Gradle-compatible; root or gradle/)
├── module-name/
│ ├── module.yaml # Module configuration
│ ├── src/ # Production sources (Kotlin + Java mixed when JVM platform is available)
│ ├── resources/ # Resources (copied into JAR)
│ ├── test/ # Test sources
│ └── testResources/ # Test-only resources
└── another-module/
├── module.yaml
└── ...`project.yaml` declares the project's modules and any local build plugins. See [references/examples.md](references/examples.md) for a project-level config example.
product: jvm/app # jvm/app, jvm/lib, android/app, lib (multiplatform), …
dependencies:
- org.example:artifact:1.0.0 # Maven coordinates
- //other-module # Module dependency (relative path from the project root)
- $libs.ktor.client # From version catalog
- bom: io.ktor:ktor-bom:2.2.0 # BOM import
- org.example:foo:1.0.0: exported # Exposed to dependents (like Gradle api())
- org.example:bar:1.0.0: compile-only
- org.example:baz:1.0.0: runtime-only
test-dependencies:
- io.mockk:mockk:1.13.0
settings:
jvm:
mainClass: org.example.MainKt # Default: main() in main.kt
jdk:
version: 21
kotlin:
languageVersion: 2.0
compose:
enabled: true
test-settings:
kotlin:
languageVersion: 2.0Notes:
paths are relative to the module root. Interpolation works only in `plugin.yaml`.
Version catalogs use the standard Gradle `libs.versions.toml` format, referenced as `$libs.<key>`. Built-in catalogs `$kotlin.*` and `$compose.*` derive their versions from `settings`.
A template extracts reusable `module.yaml` sections into a `<name>.module-template.yaml` file (same structure as `module.yaml`) that modules pull in via an `apply:` list of relative paths. It's a general reuse mechanism — sharing project-wide config is just one use. There is no enforced convention for where the file lives. Modules reference it by path under `apply:`.
Because there is no project-wide `settings:` block, templates are the only way to share configuration (Kotlin language version, common test dependencies, repositories, …) across modules. `apply:` one template everywhere for project-wide defaults, or keep several templates and apply different combinations to different subsets of modules — e.g. a common template in every module plus a service-only template in the backend modules. A module can list multiple templates under `apply:`.
# common.module-template.yaml
test-dependencies:
- io.mockk:mockk:1.13.0
settings:
kotlin:
languageVersion: 2.0# module.yaml product: jvm/app apply: - //common.module-template.yaml - //jvm-service.module-template.yaml
recursion) and can't define products.
appended, and `module.yaml` always wins regardless of `apply:` position.
`kotlin check` runs all tests plus every registered check. Filter by name (`kotlin check detekt apiCheck`), skip with `--skip <name>` (e.g. `--skip tests`), restrict to modules with `-m <module>` (repeatable), and list what exists with `kotlin show checks`. A check fails when its underlying task throws.
The Toolchain ships no bundled linters — `tests` is the only built-in check. detekt, ktlint, and API-compatibility verification must be registered as local-plugin tasks under `checks:` in `plugin.yaml`.
Platform code lives in `@platform`-suffixed directories: `src@jvm/`, `src@ios/`, `src@android/`. Common code in `src
A collection of AI agent skills useful for projects using the Kotlin language. Skills are following the Agent Skills standard, see agentskills.io for more information.
Model Kotlin persistence code correctly for Spring Data JPA and Hibernate. Covers entity design, identity and equality,…
Migrates Kotlin Multiplatform (KMP) projects to Android Gradle Plugin 9.0+. Handles plugin replacement…
Migrate KMP projects from CocoaPods (kotlin("native.cocoapods")) to Swift Package Manager (swiftPMDependencies DSL) — replaces…
Load when porting, converting, or reimplementing a single Gradle plugin as a Kotlin Toolchain local plugin, or when mapping…
Load when migrating or converting an entire Gradle Kotlin project (build.gradle(.kts), wrapper, libs.versions.toml, buildSrc) to…
Migrate Kotlin (and Java) code from kotlinx.collections.immutable 0.3.x / 0.4.x to the latest 0.5.x. The 0.5.x line renames every…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.