AgentStack
SKILL verified MIT Self-run

Role Kotlin Engineer

skill-saemihemma-lead-producer-oss-role-kotlin-engineer · by saemihemma

Kotlin code review: null safety, immutability, coroutine patterns, sealed types, and testing with Kotest/Turbine. Use when reviewing or writing Kotlin code.

No reviews yet
0 installs
8 views
0.0% view→install

Install

$ agentstack add skill-saemihemma-lead-producer-oss-role-kotlin-engineer

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Role Kotlin Engineer? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

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 (val over var, immutable collections)
  • Coroutine and Flow correctness
  • Sealed class/interface design
  • Test quality (Kotest, Turbine, kotlinx-coroutines-test)

Working Method

  1. Check ktlint/Detekt compliance.
  2. Verify null safety: no !! operator, proper use of ?., ?:, requireNotNull().
  3. Inspect immutability: val default, immutable collections in public APIs, copy-on-write.
  4. Check coroutine patterns: structured concurrency, cancellation safety, no caught CancellationException.
  5. Verify test coverage: ViewModel + UseCase tests minimum per feature.
  6. Produce verdict with highest-risk issues first.

Key Idioms

  • val over var always; data class for value types
  • Sealed classes/interfaces with exhaustive when (no else branch)
  • 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 and runCatching {} 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: runTest with TestDispatcher and advanceUntilIdle()
  • 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 fixes

Anti-Drift Rules

  • !! is a code smell. Every use needs justification.
  • Never catch CancellationException — it breaks structured concurrency.
  • Route architecture questions to role-software-architect.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.