kotlin-tooling-kotlin-toolchain-plugin-authoring
Skill1.1k starsChanged 15 days agoApache-2.0View on GitHub
Load when authoring, writing, or designing a Kotlin Toolchain local plugin to extend the declarative build with code generation, build-time processing, custom verification, or packaging that module.yaml cannot express, or when referencing @TaskAction, @Configurable, plugin.yaml, or jvm/amper-plugin. Skip for porting an existing Gradle plugin.
Adopted by
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Who's talking about Kotlin/kotlin-agent-skills
- @pamelaahill.bsky.social“The @kotlinlang.org team has been working on some skills. There is one for migrating your project to AGP 9, …”Bluesky · Mar 18, 2026 · 15 likes
- @kotlinweekly.bsky.social“Kotlin Agent Skills: github.com/Kotlin/kotli... #kotlin”Bluesky · May 18, 2026 · 8 likes
- @kotlinlang.org“🤖 Kotlin agent skills are now available on GitHub! Explore AI-assisted skills for converting Java to …”Bluesky · May 19, 2026 · 5 likes
- premex-ab/gross“Bump org.jetbrains.kotlinx:kotlinx-collections-immutable from 0.4.0 to 0.5.1”GitHub · Jul 3, 2026 · 1 reactions
- premex-ab/gross“Bump org.jetbrains.kotlinx:kotlinx-collections-immutable from 0.4.0 to 0.5.0”GitHub · Jun 10, 2026 · 1 reactions
The biggest 5 of 50 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 50
Talked about on GitHub, Bluesky and Hacker News (50 times).
On GitHub · 46
- Jul 3, 2026Bump org.jetbrains.kotlinx:kotlinx-collections-immutable from 0.4.0 to 0.5.1 — premex-ab/gross1 reaction
- Jun 10, 2026Bump org.jetbrains.kotlinx:kotlinx-collections-immutable from 0.4.0 to 0.5.0 — premex-ab/gross1 reaction · 1 comment
- Nov 11, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions
- Nov 7, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions
- Nov 2, 2026Bump org.jetbrains.kotlinx:kotlinx-collections-immutable from 0.4.0 to 0.5.2 in the kotlin-and-compose group across 1 directory — altaraneu/watchwallet0 reactions
41 more on GitHub
- Nov 1, 2026codex-plugins.github.kotlin.kotlin-agent-skills: init at 0-unstable-2026-10-30 — sudosubin/agents.nix0 reactions
- Nov 1, 2026codex-marketplaces.github.kotlin.kotlin-agent-skills: init at 0-unstable-2026-10-30 — sudosubin/agents.nix0 reactions
- Oct 30, 2026claude-code-plugins.github.kotlin.kotlin-agent-skills: 0-unstable-2026-03-24 → 0-unstable-2026-10-30 — sudosubin/agents.nix0 reactions
- Oct 30, 2026claude-code-marketplaces.github.kotlin.kotlin-agent-skills: 0-unstable-2026-09-11 → 0-unstable-2026-10-30 — sudosubin/agents.nix0 reactions
- Oct 29, 2026claude-code-plugins.github.kotlin.kotlin-agent-skills: 0-unstable-2026-09-11 → 0-unstable-2026-03-24 — sudosubin/agents.nix0 reactions
- Oct 28, 2026claude-code-plugins.github.kotlin.kotlin-agent-skills: init at 0-unstable-2026-09-11 — sudosubin/agents.nix0 reactions
- Oct 28, 2026claude-code-marketplaces.github.kotlin.kotlin-agent-skills: init at 0-unstable-2026-09-11 — sudosubin/agents.nix0 reactions
- Oct 21, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Oct 11, 2026Build(deps): Bump org.jetbrains.kotlinx:kotlinx-collections-immutable from 0.4.0 to 0.5.2 — krishnasinghrao/cloudstream-macos0 reactions
- Oct 10, 2026Bump org.jetbrains.kotlinx:kotlinx-collections-immutable from 0.3.8 to 0.5.2 — HKmario852/monologue0 reactions
- Oct 7, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Oct 3, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 30, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 29, 2026agent-skills.github.kotlin.kotlin-agent-skills: init at 0-unstable-2026-09-11 — sudosubin/agents.nix0 reactions
- Sep 24, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 23, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 23, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 19, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 19, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 9, 2026Bump org.jetbrains.kotlinx:kotlinx-collections-immutable from 0.4.0 to 0.5.2 in /ragedroid — eordano/ragewarden0 reactions
- Sep 7, 2026chore(deps): Bump org.jetbrains.kotlinx:kotlinx-collections-immutable from 0.4.0 to 0.5.2 — caucy2026/KemiMail0 reactions · 1 comment
- Sep 7, 2026chore(deps): bump org.jetbrains.kotlinx:kotlinx-collections-immutable from 0.4.0 to 0.5.2 — VictorSkurchik/tablet-demo0 reactions
- Aug 25, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions
- Aug 21, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions
- Aug 18, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions
- Aug 14, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions
- Aug 14, 2026chore(deps): bump org.jetbrains.kotlinx:kotlinx-collections-immutable from 0.4.0 to 0.5.1 — motyabc/email0 reactions · 1 comment
- Aug 11, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions
- Aug 7, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions
- Aug 4, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions
- Jul 31, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions
- Jul 31, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions
- Jul 30, 2026chore(deps): bump org.jetbrains.kotlinx:kotlinx-collections-immutable from 0.4.0 to 0.5.1 — slowwylx/DVote0 reactions
- Jul 16, 2026build(deps): bump org.jetbrains.kotlinx:kotlinx-collections-immutable from 0.4.0 to 0.5.1 — fuchi-no-dokuneko/ShareGuard0 reactions
- Jun 30, 2026chore(deps): bump org.jetbrains.kotlinx:kotlinx-collections-immutable from 0.4.0 to 0.5.0 — feihu1991/legado-with-MD30 reactions
- Jun 27, 2026Create a SKILL for every migration — InsertKoinIO/koin-compiler-plugin0 reactions
- Jun 25, 2026Bump org.jetbrains.kotlinx:kotlinx-collections-immutable from 0.4.0 to 0.5.0 — investigaciongiis/test_signal_android0 reactions
- Jun 15, 2026Bump org.jetbrains.kotlinx:kotlinx-collections-immutable from 0.4.0 to 0.5.0 — alexandregpereira/Monster-Compendium0 reactions
- Jun 9, 2026bump: (deps): bump org.jetbrains.kotlinx:kotlinx-collections-immutable from 0.4.0 to 0.5.0 — TENUM-Dev/tenum0 reactions
- May 19, 2026Add Kotlin Agent Skill for DataFrame — Kotlin/dataframe0 reactions
- Apr 25, 2018Come to the Dark Side : we have Kotlin! 🍪 — ghusta/android-docker-search0 reactions · 1 comment
On Bluesky · 3
- Mar 18, 2026The @kotlinlang.org team has been working on some skills. There is one for migrating your project to AGP 9, done by my super-smart… — @pamelaahill.bsky.social15 likes and reposts
- May 18, 2026Kotlin Agent Skills: github.com/Kotlin/kotli... #kotlin — @kotlinweekly.bsky.social8 likes and reposts
- May 19, 2026🤖 Kotlin agent skills are now available on GitHub! Explore AI-assisted skills for converting Java to Kotlin, migrating to AGP 9.0, mapping… — @kotlinlang.org5 likes and reposts · 1 reply
On Hacker News · 1
- May 18, 2026Kotlin-agent-skills: A collection of skills for projects using Kotlin1 point
In this repository9 other files it gives its agents.
- kotlin-backend-jpa-entity-mappingSkill
- kotlin-tooling-agp9-migrationSkill
- kotlin-tooling-cocoapods-spm-migrationSkill
- kotlin-tooling-gradle-to-kotlin-toolchain-pluginSkill
- kotlin-tooling-gradle-to-kotlin-toolchain-projectSkill
- kotlin-tooling-immutable-collections-0-5-x-migrationSkill
- kotlin-tooling-java-to-kotlinSkill
- kotlin-tooling-kotlin-toolchainSkill
- kotlin-tooling-native-build-performanceSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 23
Write one when you need:
- Very specific: line 32
Don't write one when module.yaml already covers it (dependencies, JDK provisioning, source layouts, basic packaging), and never to reuse a …
- Distinctive: line 54
Keep at least one consumer module in the repo — it is the only way to exercise the plugin end-to-end, and plugins cannot be published to …
- Very specific: line 247
Add a small consumer module (demo-app/, sample/) enabling the plugin with realistic settings.
- Distinctive: line 249
Put the exact commands and expected output in the plugin's README, so a fresh clone can paste and compare.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Kotlin Toolchain Plugin Authoring
Local plugins are the official escape hatch from declarative YAML: a jvm/amper-plugin module shipping
task actions, settings, and generated sources/resources alongside your project. Code patterns to adapt are
in references/examples.md.
When to write a plugin
Write one when you need:
- A build-time step a library's workflow expects (code generation, schema compilation, resource transformation, version stamping).
- Custom verification wired into the build (pre-release checks, schema validation, contract tests).
- A build-time value published into the JAR classpath or downstream tasks — the closest analog to Gradle's
project.version. - A named CLI command for a repeated workflow (
./kotlin do release).
Don't write one when module.yaml already covers it (dependencies, JDK provisioning, source layouts,
basic packaging), and never to reuse a Gradle plugin — the Kotlin Toolchain cannot consume them.
Layout
repo-root/
├── kotlin, kotlin.bat # wrappers (from `kotlin init`)
├── project.yaml # registers the plugin
├── plugins/<name>/
│ ├── module.yaml # product: jvm/amper-plugin
│ ├── plugin.yaml # tasks: + commands: + generated:
│ └── src/
│ ├── Settings.kt # @Configurable interface
│ ├── tasks/ # one @TaskAction per file
│ │ ├── Foo.kt
│ │ └── FooSteps.kt # internal shared helpers (not @TaskAction)
│ └── <domain logic>/
└── <consumer-module>/
└── module.yaml # plugins: { <name>: enabled: true, ... }Keep at least one consumer module in the repo — it is the only way to exercise the plugin end-to-end, and plugins cannot be published to any public registry yet.
project.yaml
modules:
- consumer-app
- plugins/<name>
plugins:
- ./plugins/<name>Without the top-level plugins: block the plugin id is unresolvable from any consumer.
module.yaml — the plugin module
product: jvm/amper-plugin # marks the module as a plugin
dependencies:
- <coordinate>:<version>
- <coordinate>:<version>: runtime-only # required only at runtime
- <coordinate>:<version>: compile-only
pluginInfo:
id: <plugin-id> # what consumers write under `plugins:`
settingsClass: <fully.qualified.Settings> # the @Configurable interface
settings:
jvm:
jdk:
version: 21
kotlin:
languageVersion: 2.1@Configurable interface Settings
Defaults go in interface property getters; nested blocks become nested @Configurable interfaces.
@Configurable
interface Settings {
val someValue: String get() = "default"
val checks: ChecksSettings
}
@Configurable
interface ChecksSettings {
val strict: Boolean get() = true
}Consumers override what they need in module.yaml; omitted values fall back to the getter default:
plugins:
<plugin-id>:
enabled: true
someValue: "override"
checks:
strict: false@TaskAction
Task actions are top-level funs, called when the matching plugin.yaml entry executes.
@TaskAction
fun foo(
@Input moduleRootDir: Path,
@Output outputDir: Path,
settings: Settings,
) {
// body
}@Input path: Path— declared input; Kotlin Toolchain snapshots its contents for execution avoidance.@Output path: Path— declared output directory; Kotlin Toolchain creates it and passes the path in. Write to the exactPathyou received, or downstream references won't find the result.settings: Settings(or any@Configurable) — typed configuration, wired inplugin.yaml.- Plain
Path/ primitives — passed literally fromplugin.yaml. println(...)is the output channel; Kotlin Toolchain captures stdout.
Execution avoidance
A @TaskAction is skipped when its declared inputs are unchanged. Tasks whose real inputs are Git history,
the network, or environment variables cannot be fingerprinted, so opt out:
@TaskAction(executionAvoidance = ExecutionAvoidance.Disabled)
fun foo(@Output outputDir: Path, settings: Settings) { /* ... */ }Tasks with no @Output are never cached and always re-run — correct for purely side-effecting tasks
(releases, deployments, pushes).
plugin.yaml
tasks:
foo:
action: !<fully.qualified.foo>
moduleRootDir: ${module.rootDir}
outputDir: ${taskOutputDir}
settings: ${pluginSettings}
bar:
action: !<fully.qualified.bar>
input: ${tasks.foo.action.outputDir}/result.txt
settings: ${pluginSettings}
generated:
resources:
- directory: ${tasks.foo.action.outputDir}
commands:
- foo| Reference | Resolves to |
${module.rootDir} | Directory containing the consumer's module.yaml. Pass as @Input to inspect the consumer's tree. |
${taskOutputDir} | Toolchain-managed per-task output directory. Pass as @Output. |
${pluginSettings} | The @Configurable object built from the consumer's module.yaml. |
${tasks.<task>.action.<param>} | Another task's parameter — used in generated.* and to wire one task's @Input to another's @Output. |
generated.resources / generated.sources
Both register a directory (usually a task's @Output) as a contribution to the consumer's build, and both
auto-wire the producing task to run first:
generated.resources— added to the JAR classpath, reachable viagetResourceAsStream("/path/in/jar").generated.sources— added as a Kotlin source root and compiled with the consumer'ssrc/.
Tasks vs commands
Tasks are the implementation, addressed as ./kotlin task :<module>:<task>@<plugin-id> — the docs advise
against relying on that mangled name. Commands are the public API: ./kotlin do <command-name>, listed via
./kotlin show commands (-m <module> to scope).
- A task whose
@Outputfeedsgenerated.resources/generated.sourcesis a build-graph contributor. Keep it out ofcommands:; it runs automatically and exposing it invites users to run it by hand. - A task users invoke directly must be in
commands:.
File-based task communication
There is no shared mutable build state — no project.version, no extension property maps. Tasks talk
through matched paths:
- The producer takes
@Output outputDir: Pathand writes files into it. plugin.yamlpoints a consumer task's@Inputat${tasks.<producer>.action.outputDir}/<file>.- The Toolchain infers the dependency from the path match — no
dependsOnAPI needed.
The same @Output directory can serve build-time consumers (via @Input) and runtime consumers
(registered under generated.resources, read via getResourceAsStream) simultaneously.
Runtime overrides via environment variables
There is no -Pkey=value. Read env vars inside the action for ephemeral overrides:
val forced = System.getenv("MYPLUGIN_FORCE_VALUE")?.takeIf { it.isNotBlank() }
val skipChecks = System.getenv("MYPLUGIN_SKIP_CHECKS")?.equals("true", ignoreCase = true) == truePass the env map in as a constructor parameter rather than calling System.getenv() deep in the call stack,
so logic stays unit-testable. Document every recognised variable in the plugin's README. Env vars are
ephemeral overrides, not a trust boundary — validate a value before using it in a file path or process
argument.
Sharing logic across task actions
Tasks often share steps (verify → create → push). Don't compose an atomic user-facing task from a chain of build-graph tasks: separate invocations re-open shared resources and open a window where another process observes intermediate state.
Limitations to design around
- Plugins are local-only; no public registry publishing yet.
- Plugins are module-level; there is no project-wide plugin. Every consumer module lists it under
plugins:, and cross-module effects flow through files. - No
${...}interpolation inmodule.yaml(as of 0.11) — consumer settings are literal values. - No
Project.afterEvaluate, no lazyProvider/Propertygraph. Compute derived values in the action body. -h/--helpdoes not list plugin commands; use./kotlin show commands.
Validate against a consumer
- Add a small consumer module (
demo-app/,sample/) enabling the plugin with realistic settings. - Have its
main.ktor a test read whatever the plugin publishes. - Put the exact commands and expected output in the plugin's README, so a fresh clone can paste and compare.
Plugin docs: https://kotlin-toolchain.org/dev/user-guide/plugins/
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

