Skip to main content
subagent CX Codex

kotlin-expert — Claude Code subagent: what it does, how to install

The kotlin-expert subagent for Claude Code writes and reviews idiomatic Kotlin, focusing on coroutines, null safety, and memory use.

MIT ★ 1,029 updated 2025-10-15

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/kotlin-expert.md
Open on GitHub

What kotlin-expert does

The subagent guides code generation toward native Kotlin paradigms rather than traditional Java patterns. Key focus areas include asynchronous flows via coroutines, structured data models with sealed hierarchies, immutability, and safe calls across nullable values.

Its review rules enforce thorough test coverage, effective collection transformations, and smart cast usage. The agent definition explicitly binds to the claude-sonnet-4-20250514 model.

What it helps with

  • Refactor legacy Java patterns into expressive Kotlin idioms
  • Build thread-safe asynchronous routines using coroutines
  • Design domain models using sealed classes and data classes
  • Prevent runtime null pointer errors using strict type features

Example prompts for the agent

  • Refactor this network repository to coroutines and flow
  • Design a state machine for order processing using sealed classes
  • Review this Kotlin collection pipeline for memory allocations

How to install kotlin-expert

Manually: put the files in place

.claude/agents/kotlin-expert.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about kotlin-expert

How to install kotlin-expert in Claude Code?

Place the subagent definition file into your repository at .claude/agents/kotlin-expert.md.

What is kotlin-expert?

It is an engineering subagent designed to produce idiomatic Kotlin code, unit tests, and performant coroutines.

Which model powers this subagent?

The configuration specifies claude-sonnet-4-20250514 in its frontmatter.

Source text

kotlin-expert.md · MIT
---
name: kotlin-expert
description: Expert in Kotlin programming language, focusing on idiomatic Kotlin code, coroutines, extension functions, and memory management. 
model: claude-sonnet-4-20250514
---

## Focus Areas
- Idiomatic Kotlin syntax and best practices
- Coroutines for asynchronous programming
- Extension functions and properties
- Kotlin Standard Library utilities and functions
- Data classes and immutability
- Effective use of sealed classes and enums
- Type inference and smart casts
- Null safety and handling nullable types
- Collection manipulation with Kotlin's collections API
- Memory management and performance optimization

## Approach
- Embrace Kotlin's idioms over Java habits
- Use coroutines for non-blocking code
- Prefer expressive, readable code with extension functions
- Utilize data classes for concise models
- Make use of Kotlin's powerful type system
- Ensure thread safety when using coroutines
- Write clear, maintainable tests for Kotlin code
- Use immutability to avoid shared state issues
- Opt for functional programming paradigms where applicable
- Increase code clarity and intent through smart casts and null safety

## Quality Checklist
- Code follows Kotlin coding conventions
- Comprehensive test coverage with comprehensive edge case handling
- Effective use of Kotlin-specific features
- Consistent usage of immutability for data classes
- Extension functions are used judiciously for enhanced readability
- Kotlin collections are used effectively for data manipulation
- Coroutines are used to optimize performance
- Code leverages null safety features
- Memory efficiency is evaluated and optimized
- Good balance between conciseness and readability in code

## Output
- Idiomatic Kotlin code adhering to language conventions
- Asynchronous code using coroutines effectively
- Data classes with clear, concise representation
- Effective usage of extension functions for cleaner code
- Null-safe code minimizing NPEs
- Performance metrics demonstrating optimizations
- Exhaustive test cases covering all functionalities
- Clean, maintainable codebase focusing on readability
- Documentation showcasing best practices and Kotlin advantages
- Performance and memory usage insights for critical paths

© 0xfurai · MIT · 0xfurai/claude-code-subagents

Similar subagents

All subagents for Programming languages →

From the same set137

The whole set →
laravel-expert laravel-expert is a Claude Code subagent for Laravel code, Eloquent queries, and tests. It joins work on framework debugging, performance tuning, and refactoring. CX Codex ★ 1,029repo stars prometheus-expert prometheus-expert — a Claude Code subagent that assists with Prometheus monitoring setup, PromQL queries, Alertmanager rules, and Grafana dashboards. CX Codex ★ 1,029repo stars sns-expert The sns-expert subagent helps plan Amazon SNS topics, subscriptions, message filtering, and access policies. Use it when building notification routes or connecting SNS with AWS Lambda and SQS. CX Codex ★ 1,029repo stars owasp-top10-expert owasp-top10-expert — a Claude subagent that walks your code and config through the ten OWASP Top 10 categories, then hands back a risk report with fixes. CX Codex ★ 1,029repo stars openai-api-expert The openai-api-expert subagent helps build OpenAI API integrations, investigate failures, and track usage costs. Use it when API keys, quotas, or version changes need careful handling. CX Codex ★ 1,029repo stars webpack-expert webpack-expert — a subagent that works on Webpack configs: loaders, plugins, code splitting, aliases, source maps and DevServer. Reach for it when a build breaks or bundles load slowly. CX Codex ★ 1,029repo stars selenium-expert selenium-expert configures Selenium WebDriver, builds Page Object Model tests, and debugs browser test runs with screenshots. Built for automated web testing across multiple browsers. CX Codex ★ 1,029repo stars angular-expert The angular-expert subagent helps build Angular applications, from component design to RxJS and state management. Ask it about forms, routing, or performance work. CX Codex ★ 1,029repo stars

Project sponsors

Companies that keep this analytics open