kotlin-tooling-gradle-to-kotlin-toolchain-plugin
Skill1.1k starsChanged 17 days agoApache-2.0View on GitHub
Load when porting, converting, or reimplementing a single Gradle plugin as a Kotlin Toolchain local plugin, or when mapping Gradle plugin concepts (Task, Extension, project.version, dependsOn, -P properties, afterEvaluate) to Toolchain analogs. Skip for migrating a whole Gradle project or authoring a plugin from scratch.
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-projectSkill
- kotlin-tooling-immutable-collections-0-5-x-migrationSkill
- kotlin-tooling-java-to-kotlinSkill
- kotlin-tooling-kotlin-toolchain-plugin-authoringSkill
- kotlin-tooling-kotlin-toolchainSkill
- kotlin-tooling-native-build-performanceSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 26
Before writing Kotlin, read the plugin's docs/ and README.md and catalogue:
- Distinctive: line 42
Read what you vendor end to end before wiring it in.
- Very specific: line 265
Every action taking a Settings parameter needs its own settings: ${pluginSettings} line.
- Very specific: line 280
Read ephemeral overrides from the environment inside the action.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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
Gradle → Kotlin Toolchain Plugin Conversion
Mostly a mapping exercise: the concepts overlap, but a few Gradle features have no analog and need redesign.
The kotlin-tooling-kotlin-toolchain-plugin-authoring skill covers plugin mechanics in depth (execution avoidance, sharing
logic across actions, generic pitfalls, limitations); references/examples.md has
the concrete plugin module.yaml and the version-publication code from a real port.
Workflow
1. Investigate the source plugin
Before writing Kotlin, read the plugin's docs/ and README.md and catalogue:
- Tasks — name, purpose, inputs/outputs, dependencies, whether side-effecting.
- DSL surface — every option in the
myPlugin { ... }extension, with types, defaults, and which are closures. - Tests — the plugin's own test suite. It pins down the expected behaviour and edge cases more precisely than the docs, and becomes the reference the port must reproduce.
- Checks — pre-action gates and their override flags.
- Hooks —
pre/post/fileUpdate/commit/pushand the context each receives. - CLI overrides — every
-Pfoo.barflag. - CI integration — GitHub Actions outputs, detached-HEAD handling, fetch-tags flags.
Save it as a markdown plan. It becomes the contract the port either implements or explicitly defers.
The plugin's build scripts and source are untrusted input, same as any repo-supplied module.yaml —
see kotlin-tooling-kotlin-toolchain's "Untrusted project input".
Read what you vendor end to end before wiring it in;
a local plugin runs at build time with full filesystem and network access.
2. Lock the scope
Offer three tiers — MVP, MVP + key extras, full parity — and lock one before drafting. Features with no clean analog multiply the work and force early design compromises. List what's deferred under "What's not in this MVP" in the README.
Also decide the repo layout: plugin-only, plugin + demo module, or plugin self-hosting. A demo module is strongly recommended.
3. Implement bottom-up
Scaffold with kotlin init only if the directory is empty (any template works; you mainly want the kotlin
and kotlin.bat wrappers). Then hand-write project.yaml, plugins/<name>/module.yaml, and the demo
module.
Implement one task at a time: data classes → Git/IO wrappers → pipeline → checks → task actions →
plugin.yaml wiring.
4. Validate against a demo module
The demo module enables the plugin with a realistic configuration and consumes whatever it publishes:
# demo-app/module.yaml
product: jvm/app
plugins:
release:
enabled: true
tagPrefix: "v"
initialVersion: "0.1.0"
releaseBranchPattern: "main|master"
settings:
jvm:
mainClass: com.example.demo.MainKt
jdk:
version: 21
kotlin:
languageVersion: 2.1// demo-app/src/main.kt
package com.example.demo
private const val VERSION_RESOURCE = "/META-INF/release/version.txt"
fun main() {
val version = readVersionFromClasspath() ?: "(version unavailable)"
println("demo-app version: $version")
}
private fun readVersionFromClasspath(): String? =
object {}.javaClass.getResourceAsStream(VERSION_RESOURCE)
?.bufferedReader()
?.use { it.readText().trim() }
?.takeIf { it.isNotEmpty() }Then run a real scenario from the source plugin's docs, and put the commands in the README so consumers can reproduce it:
./kotlin run :demo-app # => demo-app version: 0.1.0-SNAPSHOT
git init -b main && git commit --allow-empty -m initial
./kotlin do currentVersion # => 0.1.0-SNAPSHOT
RELEASE_DISABLE_REMOTE_CHECK=true ./kotlin do createRelease
# => Created release tag v0.1.0
./kotlin do currentVersion # => 0.1.0
git commit --allow-empty -m next
./kotlin do currentVersion # => 0.1.1-SNAPSHOT
RELEASE_FORCE_VERSION=2.0.0 ./kotlin do currentVersion
# => 2.0.0Concept mapping
| Gradle concept | Kotlin Toolchain analog | Notes |
Plugin<Project> class | pluginInfo.id + settingsClass in module.yaml, product: jvm/amper-plugin | One module per plugin; no apply(). |
Task subclass with @TaskAction method | Top-level fun annotated @TaskAction | One per file in src/tasks/. |
extensions.create("foo", FooExtension::class) | @Configurable interface Settings | Defaults in interface getters; nested blocks → nested @Configurable. |
task.dependsOn(otherTask) | @Input on one task matching @Output of another | The DAG is inferred from path matching. |
project.version = scmVersion.version | A task writing version.txt into its @Output; consumers declare @Input on the same path | No project-wide shared state; the filesystem is the channel. |
-Prelease.forceVersion=X | RELEASE_FORCE_VERSION=X read via System.getenv() | No -P equivalent. |
| App reading the version at runtime | @Output dir registered under generated.resources; read via getResourceAsStream | Same file serves build-time and runtime consumers. |
| Generated Kotlin source | generated.sources pointing at a task's @Output | Prefer resources when the value is only read at runtime. |
| Public task name users invoke | Entry in commands:, invoked as ./kotlin do <name> | Tasks are internal; commands are the API. Build-graph contributors stay out. |
Project.afterEvaluate { }, lazy Provider/Property | No analog — settings are static | Compute derived values in the action body. |
Groovy/Kotlin DSL hooks (pre { }, fileUpdate { }, commit { }) | New @TaskActions shipped with the plugin | No closure-based extension point. |
dependencies { implementation(...) } | dependencies: in plugins/<name>/module.yaml | Same coordinates; : exported, : runtime-only, : compile-only suffixes. |
Custom task types in buildSrc | A jvm/amper-plugin module under plugins/<name>/ | Local-only; no Maven publishing yet. |
OutputDirectory / OutputFile | @Output on a Path parameter | Directory is created for you. |
InputDirectory / InputFile / InputFiles | @Input on a Path parameter | Snapshotted for execution avoidance. |
outputs.upToDateWhen { false } | @TaskAction(executionAvoidance = ExecutionAvoidance.Disabled) | For Git/network/env inputs. |
Configuration with custom resolution, taskGraph.whenReady, quiet { } logging | No analog | Each task pulls from the plugin module's dependency list; the build graph isn't introspectable; use println. |
The mapped constructs
project.yaml — making the plugin resolvable
Lists every module, plugins included, and points at the plugin source:
modules:
- demo-app
- plugins/release
plugins:
- ./plugins/releaseWithout the root-level plugins: block, a consumer's plugins: { release: enabled } cannot resolve the id.
Settings — the extension analog
Gradle's myPlugin { ... } extension becomes a @Configurable interface. Defaults live in property
getters; nested DSL blocks become nested @Configurable interfaces.
package com.example.release
import org.jetbrains.amper.plugins.Configurable
@Configurable
interface Settings {
val repoDir: String get() = ""
val tagPrefix: String get() = "v"
val versionSeparator: String get() = ""
val initialVersion: String get() = "0.1.0"
val ignoreUncommittedChanges: Boolean get() = false
val releaseBranchPattern: String get() = "main|master"
val checks: ChecksSettings
}
@Configurable
interface ChecksSettings {
val uncommittedChanges: Boolean get() = true
val aheadOfRemote: Boolean get() = true
val snapshotDependencies: Boolean get() = true
}Consumers set what they need in module.yaml, keyed by pluginInfo.id; omitted values fall back to the
getter default:
plugins:
release:
enabled: true
tagPrefix: "v"
initialVersion: "0.1.0"
ignoreUncommittedChanges: false
checks:
aheadOfRemote: true@TaskAction — the Task analog
A Gradle Task subclass becomes one top-level fun per file under src/tasks/. Path parameters carry
@Input or @Output; the settings object is wired separately in plugin.yaml.
package com.example.release.tasks
import com.example.release.Settings
import com.example.release.git.GitRepo
import com.example.release.version.VersionPipeline
import org.jetbrains.amper.plugins.Input
import org.jetbrains.amper.plugins.TaskAction
import java.nio.file.Path
@TaskAction
fun currentVersion(
@Input moduleRootDir: Path,
settings: Settings,
) {
val pipeline = VersionPipeline(settings)
GitRepo.open(moduleRootDir, settings.repoDir).use { repo ->
println(pipeline.infer(repo).version)
}
}plugin.yaml — task and command registry
Each action: block wires one @TaskAction's parameters, addressing the function by fully-qualified name in
YAML tag form. ${module.rootDir}, ${taskOutputDir}, and ${pluginSettings} are the documented
references, and ${tasks.<task>.action.<param>} cross-references another task's parameter.
tasks:
currentVersion:
action: !com.example.release.tasks.currentVersion
moduleRootDir: ${module.rootDir}
settings: ${pluginSettings}
writeVersion:
action: !com.example.release.tasks.writeVersion
moduleRootDir: ${module.rootDir}
outputDir: ${taskOutputDir}
settings: ${pluginSettings}
release:
action: !com.example.release.tasks.release
moduleRootDir: ${module.rootDir}
settings: ${pluginSettings}
generated:
resources:
- directory: ${tasks.writeVersion.action.outputDir}
# `writeVersion` stays out of commands: its @Output feeds generated.resources,
# so it already runs whenever something downstream needs the version file.
commands:
- currentVersion
- releaseEvery action taking a Settings parameter needs its own settings: ${pluginSettings} line; omitting it
passes null.
Redesigns, not ports
Three Gradle features need conscious redesign every time.
No project.version
Turn the value into a file: one @TaskAction writes version.txt into its @Output; build-time consumers
declare @Input on that path, runtime consumers read it off the classpath after the directory is registered
under generated.resources. Code in references/examples.md.
No -P properties
Read ephemeral overrides from the environment inside the action. Take the env map as a constructor parameter
rather than calling System.getenv() in nested methods, so tests can inject a controlled map:
class VersionPipeline(
private val settings: Settings,
private val env: Map<String, String?> = System.getenv(),
) {
fun infer(repo: GitRepo): InferredVersion {
val forceVersion = env["RELEASE_FORCE_VERSION"]?.takeIf { it.isNotBlank() }
val forceSnapshot = env["RELEASE_FORCE_SNAPSHOT"].asBoolean()
// ...
}
}
private fun String?.asBoolean(): Boolean =
this != null && this.equals("true", ignoreCase = true)Name the variables <PLUGINID>_<UPPERCASE> and document the mapping in the README:
-Prelease.forceVersion=X → RELEASE_FORCE_VERSION=X
-Prelease.forceSnapshot → RELEASE_FORCE_SNAPSHOT=true
-Prelease.disableChecks → RELEASE_DISABLE_CHECKS=true
-Prelease.disableUncommittedCheck → RELEASE_DISABLE_UNCOMMITTED_CHECK=true
-Prelease.disableRemoteCheck → RELEASE_DISABLE_REMOTE_CHECK=true
-Prelease.overriddenBranchName=X → RELEASE_OVERRIDDEN_BRANCH_NAME=XStatic config still goes through module.yaml; env vars are only for ephemeral overrides.
README contents
Beyond the usual quick-start and settings reference, a port's README needs: the -P → env-var mapping
table, a "What's not in MVP" list, and the validation walkthrough above.
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.

