Agent skill

Kotlin Tooling Kotlin Toolchain Plugin Authoring

by Kotlin in Kotlin/kotlin-agent-skills

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…

Apache-2.0Auto-check passedMobile

Install Kotlin Tooling Kotlin Toolchain Plugin Authoring

skills CLI
$ npx skills add Kotlin/kotlin-agent-skills --skill kotlin-tooling-kotlin-toolchain-plugin-authoring -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Kotlin/kotlin-agent-skills kotlin-tooling-kotlin-toolchain-plugin-authoring --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Kotlin/kotlin-agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/kotlin-tooling-kotlin-toolchain-plugin-authoring .claude/skills/kotlin-tooling-kotlin-toolchain-plugin-authoring && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
kotlin-tooling-kotlin-toolchain-plugin-authoring
GitHub stars
1.1k
Token cost
~2.3k tokens
SKILL.md length
814 words
Files
2 (incl. references)
Skills in repo
6
Repo updated
First seen
Licence
Apache-2.0

At a glance

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…

  • Works in 3 steps: The producer takes @Output outputDir:… → plugin.yaml points a consumer task's… → The Toolchain infers the dependency from…
  • Tasks that involve Android development
  • SKILL.md covers When to write a plugin, Layout, project.yaml and module.yaml — the plugin module, plus 8 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Kotlin Tooling Kotlin Toolchain Plugin Authoring is an agent skill from Kotlin/kotlin-agent-skills. 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.

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/examples.md`).

It sits in Mobile, covering Android development. It works with Kotlin and Gradle. The repository describes itself as: A collection of AI agent skills useful for projects using Kotlin language. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Android development

Example prompts

  • “/kotlin-tooling-kotlin-toolchain-plugin-authoring”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. The producer takes @Output outputDir: Path and writes files into it.
  2. plugin.yaml points a consumer task's @Input at ${tasks..action.outputDir}/.
  3. The Toolchain infers the dependency from the path match — no dependsOn API needed.

What it can do on your machine

Read from SKILL.md and the folder at commit c2f9069. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are yaml and kotlin).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • kotlin-toolchain.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Kotlin Tooling Kotlin Toolchain Plugin Authoring loads about 2.3k tokens when it runs, and up to ~3.9k if it reads all its reference files. Until then it costs about 98 tokens; SKILL.md has 814 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~98
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Kotlin/kotlin-agent-skills at commit c2f9069, republished under its Apache-2.0 licence (© Kotlin). 814 words, ~2,302 tokens.

Download SKILL.mdSave it as .claude/skills/kotlin-tooling-kotlin-toolchain-plugin-authoring/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
kotlin-tooling-kotlin-toolchain-plugin-authoring
description
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.
license
Apache-2.0
metadata.author
github:@singleton11
metadata.version
0.1.0

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

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

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

kotlin
@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:

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

kotlin
@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 exact Path you received, or downstream references won't find the result.
  • settings: Settings (or any @Configurable) — typed configuration, wired in plugin.yaml.
  • Plain Path / primitives — passed literally from plugin.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:

kotlin
@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

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
ReferenceResolves 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 via getResourceAsStream("/path/in/jar").
  • generated.sources — added as a Kotlin source root and compiled with the consumer's src/.
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 @Output feeds generated.resources/generated.sources is a build-graph contributor. Keep it out of commands:; it runs automatically and exposing it invites users to run it by hand.
  • A task users invoke directly must be in commands:.
Show full SKILL.md (306 more words)Show less

File-based task communication

There is no shared mutable build state — no project.version, no extension property maps. Tasks talk through matched paths:

  1. The producer takes @Output outputDir: Path and writes files into it.
  2. plugin.yaml points a consumer task's @Input at ${tasks.<producer>.action.outputDir}/<file>.
  3. The Toolchain infers the dependency from the path match — no dependsOn API 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:

kotlin
val forced = System.getenv("MYPLUGIN_FORCE_VALUE")?.takeIf { it.isNotBlank() }
val skipChecks = System.getenv("MYPLUGIN_SKIP_CHECKS")?.equals("true", ignoreCase = true) == true

Pass 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 in module.yaml (as of 0.11) — consumer settings are literal values.
  • No Project.afterEvaluate, no lazy Provider/Property graph. Compute derived values in the action body.
  • -h/--help does not list plugin commands; use ./kotlin show commands.

Validate against a consumer

  1. Add a small consumer module (demo-app/, sample/) enabling the plugin with realistic settings.
  2. Have its main.kt or a test read whatever the plugin publishes.
  3. 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/

© Kotlin, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in skills/kotlin-tooling-kotlin-toolchain-plugin-authoring of Kotlin/kotlin-agent-skills.

  • SKILL.md
  • references/examples.md

Open the folder on GitHubat commit c2f9069

Compare with similar skills

Kotlin Tooling Kotlin Toolchain Plugin Authoring next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Kotlin Tooling Kotlin Toolchain Plugin Authoring compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Kotlin Tooling Kotlin Toolchain Plugin Authoring this skillKotlin/kotlin-agent-skills1.1k—~2.3kAutomated safety check: PassApache-2.0
Android Developmentdpconde/claude-android-skill336—~1.7kAutomated safety check: PassMIT
Diagnosing Compose StabilityrosuH/EasyWatermark1.9k1 repos~3.3kAutomated safety check: PassApache-2.0
Claude Android NinjaDrjacky/claude-android-ninja124—~5.2kAutomated safety check: PassApache-2.0
Expo Brownfield Integrationmweinbach/agent-coworker1562 repos~900Automated safety check: NotesCustom licence
Jugg Android Dev Loopniki914/zafiro241—~2kAutomated safety check: PassMIT

Similar skills

  • Android Development

    dpconde/claude-android-skill

    Create production-quality Android applications following Google's official architecture guidance and NowInAndroid best practices.

    336 GitHub stars~1.7k tokensUpdated 10 mo ago
    MobileAuto-check passed
  • Diagnosing Compose Stability

    rosuH/EasyWatermark

    A skill your agent uses to diagnose Jetpack Compose stability problems by enabling and reading the Compose Compiler Reports (classes.txt, composables.txt, composables.csv, module.json).

    1.9k GitHub starsUsed in 1 repo~3.3k tokens
    MobileAuto-check passed
  • Claude Android Ninja

    Drjacky/claude-android-ninja

    Build and migrate Android apps with Kotlin, Jetpack Compose, MVVM, Hilt, Room 3 (KSP, SQLiteDriver, Flow/suspend DAOs), Navigation3, and multi-module Gradle.

    124 GitHub stars~5.2k tokensUpdated 11 days ago
    MobileAuto-check passed
  • Expo Brownfield Integration

    mweinbach/agent-coworker

    Helps add Expo and React Native to an existing native iOS or Android app, and choose between a prebuilt AAR or XCFramework and a fully integrated build.

    156 GitHub starsUsed in 2 repos~900 tokens
    MobileAuto-check: notes
  • Jugg Android Dev Loop

    niki914/zafiro

    A skill your agent uses when editing source files (Java/Kotlin/XML/layout/AndroidManifest/Gradle) in a Android project, or when user asks to build/deploy/verify an Android app.

    241 GitHub stars~2k tokensUpdated today
    MobileAuto-check passed
  • Build Foreman

    nekomangaorg/Neko

    Optimizes Gradle build scripts, compilation times, and Android Studio sync performance.

    2.8k GitHub stars~807 tokensUpdated yesterday
    MobileAuto-check passed

More from Kotlin/kotlin-agent-skills

  • Kotlin Tooling Native Build Performance

    Kotlin/kotlin-agent-skills

    Diagnoses and fixes slow Kotlin/Native compilation and linking in Kotlin Multiplatform projects that target iOS.

    1.1k GitHub stars~2k tokensUpdated 3 days ago
    Auto-check passed
  • 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…

    1.1k GitHub stars~3.2k tokensUpdated 3 days ago
    Auto-check passed
  • Kotlin Tooling Kotlin Toolchain

    Kotlin/kotlin-agent-skills

    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…

    1.1k GitHub stars~2.4k tokensUpdated 3 days ago
    Auto-check passed
  • Load when migrating or converting an entire Gradle Kotlin project (build.gradle(.kts), wrapper, libs.versions.toml, buildSrc) to the Kotlin Toolchain, including rewriting CI and replacing Gradle…

    1.1k GitHub stars~6k tokensUpdated 3 days ago
    Auto-check passed

Works with

Categories

Questions about Kotlin Tooling Kotlin Toolchain Plugin Authoring

What does Kotlin Tooling Kotlin Toolchain Plugin Authoring do?

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…. Kotlin Tooling Kotlin Toolchain Plugin Authoring is an agent skill from Kotlin/kotlin-agent-skills.yaml, or jvm/amper-plugin.

When should I use Kotlin Tooling Kotlin Toolchain Plugin Authoring?

Kotlin Tooling Kotlin Toolchain Plugin Authoring fits situations like: tasks that involve Android development.

How do I install Kotlin Tooling Kotlin Toolchain Plugin Authoring in Claude Code?

Run `npx skills add Kotlin/kotlin-agent-skills --skill kotlin-tooling-kotlin-toolchain-plugin-authoring -a claude-code`. Or copy the skill folder (skills/kotlin-tooling-kotlin-toolchain-plugin-authoring in Kotlin/kotlin-agent-skills) into .claude/skills/kotlin-tooling-kotlin-toolchain-plugin-authoring in your project. Claude Code loads it when a task matches its description.

How do I install Kotlin Tooling Kotlin Toolchain Plugin Authoring in Codex?

Run `npx skills add Kotlin/kotlin-agent-skills --skill kotlin-tooling-kotlin-toolchain-plugin-authoring -a codex`. Or copy the skill folder (skills/kotlin-tooling-kotlin-toolchain-plugin-authoring in Kotlin/kotlin-agent-skills) into .agents/skills/kotlin-tooling-kotlin-toolchain-plugin-authoring in your project. Codex loads it when a task matches its description.

Can I use Kotlin Tooling Kotlin Toolchain Plugin Authoring in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Kotlin/kotlin-agent-skills --skill kotlin-tooling-kotlin-toolchain-plugin-authoring -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/kotlin-tooling-kotlin-toolchain-plugin-authoring, .gemini/skills/kotlin-tooling-kotlin-toolchain-plugin-authoring, .github/skills/kotlin-tooling-kotlin-toolchain-plugin-authoring and .opencode/skills/kotlin-tooling-kotlin-toolchain-plugin-authoring in your project.

What does Kotlin Tooling Kotlin Toolchain Plugin Authoring need to run?

SKILL.md names no scripts, command-line tools or credentials: Kotlin Tooling Kotlin Toolchain Plugin Authoring is instructions for the agent only.

Does Kotlin Tooling Kotlin Toolchain Plugin Authoring access the network?

SKILL.md names 1 domain. As links in the text: kotlin-toolchain.org. This is read from the text; nothing was executed.

Is Kotlin Tooling Kotlin Toolchain Plugin Authoring safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Kotlin Tooling Kotlin Toolchain Plugin Authoring use?

Kotlin Tooling Kotlin Toolchain Plugin Authoring is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Kotlin Tooling Kotlin Toolchain Plugin Authoring use?

About 2.3k tokens (SKILL.md is roughly 9.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.6k tokens, read only when the agent opens those files.

What are the alternatives to Kotlin Tooling Kotlin Toolchain Plugin Authoring?

Skills that share tags, products or a category with Kotlin Tooling Kotlin Toolchain Plugin Authoring: Android Development (dpconde/claude-android-skill, 336 stars), Diagnosing Compose Stability (rosuH/EasyWatermark, 1.9k stars), Claude Android Ninja (Drjacky/claude-android-ninja, 124 stars) and Expo Brownfield Integration (mweinbach/agent-coworker, 156 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Kotlin Tooling Kotlin Toolchain Plugin Authoring?

Kotlin (a GitHub organization) maintains it in Kotlin/kotlin-agent-skills, which has 1,072 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 8, 2026.

Source: Kotlin/kotlin-agent-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.