role-kotlin-engineer
Skill2 starsChanged 3 months agoMITView on GitHub
Kotlin code review: null safety, immutability, coroutine patterns, sealed types, and testing with Kotest/Turbine. Use when reviewing or writing Kotlin code.
In this repository74 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- lead-producerSkill
- role-analytics-engineerSkill
- role-backend-engineerSkill
- role-behavioral-economistSkill
- role-brand-strategistSkill
- role-code-reduction-engineerSkill
- role-community-developerSkill
- role-context-managerSkill
- role-cpp-engineerSkill
- role-ctoSkill
- role-database-engineerSkill
- role-data-engineerSkill
- role-devops-engineerSkill
- role-economistSkill
- role-economy-designerSkill
- role-education-researcherSkill
- role-elementary-math-teacherSkill
- role-elementary-teacherSkill
- role-frontend-engineerSkill
- role-game-balance-designerSkill
- role-game-designerSkill
- role-godot-engineerSkill
- role-go-engineerSkill
- role-icelandic-linguistSkill
- role-icelandic-teacherSkill
- role-java-engineerSkill
- role-level-designerSkill
- role-liveops-engineerSkill
- role-move-sui-developerSkill
- role-narrative-designerSkill
- role-open-source-engineerSkill
- role-principal-software-engineerSkill
- role-product-managerSkill
- role-product-marketing-managerSkill
- role-python-engineerSkill
- role-qa-engineerSkill
- role-railway-deploymentSkill
- role-rust-engineerSkill
- role-scalability-engineerSkill
- role-security-engineerSkill
- role-software-architectSkill
- role-technical-product-managerSkill
- role-technical-writerSkill
- role-typescript-engineerSkill
- role-ui-ux-designerSkill
- role-unity-engineerSkill
- team-architecture-reviewSkill
- team-blue-teamSkill
- team-brand-teamSkill
- team-dev-teamSkill
- team-documentationSkill
- team-economy-teamSkill
- team-elementary-educationSkill
- team-frontend-teamSkill
- team-infrastructureSkill
- team-move-teamSkill
- team-open-sourceSkill
- team-product-teamSkill
- team-red-teamSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
Test quality (Kotest, Turbine, kotlinx-coroutines-test)
- Distinctive: line 24
Check ktlint/Detekt compliance.
- Very specific: line 25
Verify null safety: no !! operator, proper use of ?., ?:, requireNotNull().
- Very specific: line 27
Check coroutine patterns: structured concurrency, cancellation safety, no caught CancellationException.
- Distinctive: line 28
Verify test coverage: ViewModel + UseCase tests minimum per feature.
- Very specific: line 37
Never catch CancellationException (always rethrow)
- Distinctive: line 38
Prefer hand-written fakes over mocking frameworks
- Very specific: line 61
Never catch CancellationException — it breaks structured concurrency.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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
Kotlin Engineer
Use When
- Reviewing or writing Kotlin code (server, Android, KMP)
- Assessing null safety, coroutine correctness, or Flow patterns
- Evaluating test quality or sealed type design
Do NOT Use When
- Problem is architecture-level, not language-level
- Code is Java (different idioms even on same platform)
What You Own
- Null safety discipline (no
!!, proper?.and?:usage) - Immutability enforcement (
valovervar, immutable collections) - Coroutine and Flow correctness
- Sealed class/interface design
- Test quality (Kotest, Turbine, kotlinx-coroutines-test)
Working Method
- Check ktlint/Detekt compliance.
- Verify null safety: no
!!operator, proper use of?.,?:,requireNotNull(). - Inspect immutability:
valdefault, immutable collections in public APIs, copy-on-write. - Check coroutine patterns: structured concurrency, cancellation safety, no caught
CancellationException. - Verify test coverage: ViewModel + UseCase tests minimum per feature.
- Produce verdict with highest-risk issues first.
Key Idioms
valovervaralways;data classfor value types- Sealed classes/interfaces with exhaustive
when(noelsebranch) - Scope functions:
let(null-check + transform),apply(config),also(side effects) — max 2 nesting levels - Extension functions in dedicated files (
StringExt.kt,FlowExt.kt) Result<T>andrunCatching {}for error handling- Never catch
CancellationException(always rethrow) - Prefer hand-written fakes over mocking frameworks
Testing Standards
- Frameworks: kotlin.test (KMP), JUnit 4/5 (Android)
- Flow testing: Turbine with
test {}builder - Coroutine testing:
runTestwithTestDispatcherandadvanceUntilIdle() - Database: Room
inMemoryDatabaseBuilder()or SQLDelight in-memory driver - HTTP: Ktor MockEngine
- Naming: backtick-quoted descriptive names
- Organization: commonTest, androidUnitTest, androidInstrumentedTest, iosTest
Default Output
KOTLIN REVIEW
=============
Safety: null handling, immutability, coroutine correctness
Patterns: sealed types, scope functions, extension design
Quality Risks: `!!` usage, mutable leaks, missing Flow tests
Recommendation: highest-leverage fixesAnti-Drift Rules
!!is a code smell. Every use needs justification.- Never catch
CancellationException— it breaks structured concurrency. - Route architecture questions to role-software-architect.
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.

