# Kotlin Tooling Kotlin Toolchain

Load when building, running, testing, packaging, linting, or configuring a Kotlin/Java...

- Repository: https://github.com/Kotlin/kotlin-agent-skills (1104 stars)
- Category: Testing
- License: Apache-2.0
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add Kotlin/kotlin-agent-skills --skill kotlin-tooling-kotlin-toolchain -g -a claude-code -y`
Codex: `npx skills add Kotlin/kotlin-agent-skills --skill kotlin-tooling-kotlin-toolchain -g -a codex -y`
Cursor: `npx skills add Kotlin/kotlin-agent-skills --skill kotlin-tooling-kotlin-toolchain -g -a cursor -y`
Gemini CLI: `npx skills add Kotlin/kotlin-agent-skills --skill kotlin-tooling-kotlin-toolchain -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add Kotlin/kotlin-agent-skills`

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

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Kotlin Toolchain

JetBrains' unified CLI for Kotlin (JVM, Android, iOS, multiplatform) and Java projects, in Alpha.
Configuration is declarative YAML instead of Gradle build scripts.

## Installation

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`):

```sh
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.

## CLI commands

For the detailed list of commands and their options, run `kotlin --help` or `kotlin <command> --help`.

## Project structure

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

## module.yaml

```yaml
product: jvm/app    # jvm/app, jvm/lib, android/app, lib (multiplatform), …

The rest: https://github.com/Kotlin/kotlin-agent-skills/blob/HEAD/skills/kotlin-tooling-kotlin-toolchain/SKILL.md
