kotlin-backend-jpa-ent…
Model Kotlin persistence code correctly for Spring Data JPA and Hibernate. Covers entity design, identity and equality, uniqueness constraints, relationships,…
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
$ npx -y skills add kotlin/kotlin-agent-skills --skill kotlin-tooling-gradle-to-kotlin-toolchain-plugin --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/kotlin-tooling-gradle-to-kotlin-toolchain-pluginContext preview
The summary Claude sees to decide when to auto-load this skill.
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
name: kotlin-tooling-gradle-to-kotlin-toolchain-plugin description: > 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. license: Apache-2.0 metadata: author: github:@singleton11 version: "0.1.0"
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](references/examples.md) has the concrete plugin `module.yaml` and the version-publication code from a real port.
Before writing Kotlin, read the plugin's `docs/` and `README.md` and catalogue:
closures.
than the docs, and becomes the reference the port must reproduce.
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"](../kotlin-tooling-kotlin-toolchain/SKILL.md#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.
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.
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.
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.0| 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 contrib
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, uniqueness constraints, relationships,…
Migrates Kotlin Multiplatform (KMP) projects to Android Gradle Plugin 9.0+. Handles plugin replacement (com.android.kotlin.multiplatform.library), module…
Migrate KMP projects from CocoaPods (kotlin("native.cocoapods")) to Swift Package Manager (swiftPMDependencies DSL) — replaces pod() with swiftPackage(),…
Load when migrating or converting an entire Gradle Kotlin project (build.gradle(.kts), wrapper, libs.versions.toml, buildSrc) to the Kotlin Toolchain,…
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 copy-returning method on…
Use when converting Java source files to idiomatic Kotlin, when user mentions "java to kotlin", "j2k", "convert java", "migrate java to kotlin", or when…