Kotlin Code Reviewer
Apply this skill as an extension to review-code, which owns the read-only
default, evidence standard, severity order, and final response structure.
Select The Diff
For a Bitbucket pull request, use prflow to identify the repository, source and
destination branches, diff, comments, checks, and pipeline state. Use
atlas prflow <command> --help when current flags are uncertain.
For a local branch review:
- Inspect the current branch, working tree, and configured remotes.
- Resolve the remote default branch from
refs/remotes/<remote>/HEAD or remote
metadata. Do not assume it is main.
- Compare the merge-base range with three-dot syntax:
git diff <default-ref>...<review-head>.
- Fetch only when current remote state is required and the user has asked for a
current branch or PR review. Do not alter the working tree.
If the intended base cannot be established reliably, state the ambiguity instead
of silently selecting a branch.
Kotlin Review Workflow
- Identify touched modules, layers, public APIs, serialized models, build files,
and Java interoperability boundaries.
- Use
rg to inspect callers and consumers of changed public symbols.
- Apply the material checks in
references/review-framework.md.
- Use
references/kotlin-idioms.md for
null-safety, collections, coroutines, sealed types, value classes,
immutability, extensions, and delegated properties.
- Format Kotlin-specific findings using
references/output-format.md.
Prioritize production behavior over idiomatic preference. In particular, check:
- blocking calls, unstructured concurrency, cancellation, dispatcher choice,
shared mutable state, and lifecycle leaks
- nullability contracts, unchecked assertions, exceptions, and result handling
- API and binary compatibility, serialization changes, Java callers, and
event-schema compatibility
- resource closure, transaction boundaries, retries, timeouts, and idempotency
- existing stdlib or project-library alternatives before accepting new helpers
- tests for coroutine timing, cancellation, failure, and changed contracts
Follow the general review finding threshold. Every reported issue needs a
concrete correction. Provide a copy-pasteable patch only when it is small and
safe. Explain architecture trade-offs only for material design findings.
1---2name: kotlin-code-reviewer3description: Kotlin-specific extension for review-code. Use alongside the general reviewer when a pull request, branch, diff, or source set contains Kotlin or Kotlin script files. Adds coroutine, null-safety, Kotlin idiom, library-first, architecture, and JVM compatibility checks.4---56# Kotlin Code Reviewer78Apply this skill as an extension to `review-code`, which owns the read-only9default, evidence standard, severity order, and final response structure.1011## Select The Diff1213For a Bitbucket pull request, use `prflow` to identify the repository, source and14destination branches, diff, comments, checks, and pipeline state. Use15`atlas prflow <command> --help` when current flags are uncertain.1617For a local branch review:18191. Inspect the current branch, working tree, and configured remotes.202. Resolve the remote default branch from `refs/remotes/<remote>/HEAD` or remote21 metadata. Do not assume it is `main`.223. Compare the merge-base range with three-dot syntax:23 `git diff <default-ref>...<review-head>`.244. Fetch only when current remote state is required and the user has asked for a25 current branch or PR review. Do not alter the working tree.2627If the intended base cannot be established reliably, state the ambiguity instead28of silently selecting a branch.2930## Kotlin Review Workflow31321. Identify touched modules, layers, public APIs, serialized models, build files,33 and Java interoperability boundaries.342. Use `rg` to inspect callers and consumers of changed public symbols.353. Apply the material checks in36 [`references/review-framework.md`](references/review-framework.md).374. Use [`references/kotlin-idioms.md`](references/kotlin-idioms.md) for38 null-safety, collections, coroutines, sealed types, value classes,39 immutability, extensions, and delegated properties.405. Format Kotlin-specific findings using41 [`references/output-format.md`](references/output-format.md).4243Prioritize production behavior over idiomatic preference. In particular, check:4445- blocking calls, unstructured concurrency, cancellation, dispatcher choice,46 shared mutable state, and lifecycle leaks47- nullability contracts, unchecked assertions, exceptions, and result handling48- API and binary compatibility, serialization changes, Java callers, and49 event-schema compatibility50- resource closure, transaction boundaries, retries, timeouts, and idempotency51- existing stdlib or project-library alternatives before accepting new helpers52- tests for coroutine timing, cancellation, failure, and changed contracts5354Follow the general review finding threshold. Every reported issue needs a55concrete correction. Provide a copy-pasteable patch only when it is small and56safe. Explain architecture trade-offs only for material design findings.