Skip to content

Guide · Agent skill

How to use the Kotlin Idiomatic Patterns agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The kotlin-patterns skill is a set of Kotlin style and design conventions that an AI agent follows when it writes, reviews or refactors Kotlin code. It is written for developers building new Kotlin or Android/JVM services, teams doing code review, and engineers moving older Java-style Kotlin toward sealed types and coroutines. After this guide you will know what the skill changes about the agent's output, how to install it, how to trigger it with plain requests, and what to check before relying on it.

Kotlin Idiomatic Patternsaffaan-m/ECC · MIT

Quick start

  1. 1Download the ZIP. Download the kotlin-patterns skill ZIP from this page.
  2. 2Choose an install location. Unzip to ~/.claude/skills/ for all projects, or to .claude/skills/ in one project folder. Alternatively, upload it under Settings → Capabilities → Skills in the Claude apps.
  3. 3Confirm the folder layout. Make sure the kotlin-patterns folder contains SKILL.md directly inside it.
  4. 4Ask a Kotlin question. Request Kotlin code, a review or a refactor in plain language, naming Kotlin explicitly.
  5. 5Check the output. Compile and test the code the agent produces, and confirm it fits your team's conventions.

What is an agent skill and what does kotlin-patterns change?

An agent skill is a folder containing a SKILL.md file with instructions that an AI agent loads when a task matches the skill's description. This one is named kotlin-patterns and comes from the ECC project (affaan-m/ECC, docs/es/skills/kotlin-patterns), published under the MIT licence.

Once loaded, the agent applies Kotlin conventions across seven areas: null safety, immutability, sealed classes and interfaces, structured concurrency with coroutines and Flow, extension functions, type-safe DSL builders using @DslMarker and lambda receivers, and Gradle Kotlin DSL build configuration. The guidance is delivered as text and examples in Spanish. The skill does not run anything by itself.

  • Prefers non-nullable types and the safe-call ?. and Elvis ?: operators over forced unwrapping with !!.
  • Prefers val, immutable collections and data classes with copy() over mutable state.
  • Suggests sealed classes or sealed interfaces so when expressions can be exhaustive.
  • Uses coroutineScope with async/await for structured concurrency.
  • Recommends scope functions (let, apply, also, run, with) with restraint, avoiding nested chains.

Install the kotlin-patterns skill

Download the skill ZIP from this page. Then choose one of the two install routes below, depending on whether you want the skill for all your projects or only one.

For a personal install that applies everywhere, unzip the file into ~/.claude/skills/ so that the kotlin-patterns folder containing SKILL.md sits inside that directory. For a project-only install, unzip it into the .claude/skills/ folder at the root of your project instead.

If you use the Claude apps rather than a local setup, you can upload the skill under Settings → Capabilities → Skills.

  • Check that SKILL.md is inside the kotlin-patterns folder after unzipping, not nested one level deeper.
  • Restart or start a new agent session if the skill does not appear to load.
  • The skill's source lists only SKILL.md as its file.

How to trigger the skill with natural requests

You do not need a special command. The agent loads the skill when your request matches its description, which covers writing new Kotlin code, reviewing Kotlin code, refactoring existing code, designing Kotlin modules or libraries, and configuring builds with Gradle Kotlin DSL.

Name the language and the goal in plain words. Mentioning Kotlin explicitly helps, because the skill is for Kotlin and would not apply to other languages.

  • "Write a Kotlin function that returns a user's email, with a fallback when the user is missing."
  • "Review this Kotlin service for nullable misuse and forced unwrapping."
  • "Refactor this Java-style Kotlin class to use sealed types and immutable data classes."
  • "Set up my build.gradle.kts with the Gradle Kotlin DSL."

Examples of what the agent produces

The skill's examples show the style the agent aims for. For a missing user, the agent prefers a safe call with the Elvis operator over a forced unwrap, which would throw a NullPointerException if the value were null.

For outcomes that can succeed, fail or be loading, the skill shows a sealed Result class so the caller must handle every case in a when expression. For fetching a user and their posts at the same time, it shows coroutineScope with two async calls and await.

fun getUserEmail(userId: String): String { val user = userRepository.findById(userId) return user?.email ?: "unknown@example.com" }

Safety, requirements and limits

The skill lists no requirements. It does not run scripts and does not use the network, so it only changes the instructions the agent reads. The code it suggests is still code you must compile, test and review.

The skill is opinionated. Its own description notes that the agent may override local standards unless you tell it otherwise, so state your team's conventions in your request or project instructions when they differ. It is also not suited to non-Kotlin projects, where the guidance would not apply.

  • Requires: nothing listed in the source.
  • Runs scripts: no. Uses network: no.
  • Review generated code before merging, especially around coroutines and nullability.

Tips for getting better results

Give the agent context: the target platform (JVM service, Android, library), the Kotlin and coroutine libraries you already use, and any style guide your team follows. Ask for a review or refactor on a specific file rather than the whole project, so changes stay easy to inspect.

  • Say whether you want a new implementation or a refactor of existing code.
  • If your team has its own style guide, paste the relevant rules into the request.
  • Ask the agent to explain why it chose a sealed class or a value class, so you can judge the trade-off.

What people use it for

  • Writing a new Kotlin service function that handles nullable database results safely.
  • Reviewing a pull request for forced unwrapping with !! and mutable shared state.
  • Refactoring a Java-style Kotlin class into data classes and a sealed result type.
  • Writing a coroutine function that loads two related resources in parallel with async and await.
  • Drafting a Gradle Kotlin DSL build file for a Kotlin module.

Frequently asked questions

How do I install the kotlin-patterns skill?

Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use, or into .claude/skills/ inside a project for project-only use. In the Claude apps, you can instead upload it under Settings → Capabilities → Skills.

Does kotlin-patterns require anything else to run?

The source lists no requirements. The skill is text guidance in a SKILL.md file and does not run scripts or use the network.

Is kotlin-patterns free to use?

The source states the licence is MIT. Check the repository's licence file for the full terms before redistributing it.

Does the skill work with Java or Python projects?

No. It is written for Kotlin code, and its own description says it is not for non-Kotlin projects, where the guidance would not apply.

Why does the agent ignore my team's Kotlin style guide?

The skill can override local standards unless you tell the agent otherwise. Paste your team's rules into the request or project instructions so they take priority.

Is the skill in Spanish, and can I use it in English?

The guidance and examples are in Spanish. The agent can still answer and write code for English-language requests, but the skill's source text itself is Spanish.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use kotlin-patterns if you want an AI agent to write, review or refactor Kotlin with null safety, immutable data, sealed types and coroutines, especially on JVM or Android services. Pick another option, or none, if you work outside Kotlin or your team already has an established style guide that these conventions would conflict with.

Download the skill