chrisbanes/skills

kotlin-api-design

Use when designing or reviewing Kotlin function ownership, member or extension functions, factories, single-field domain types, value classes, data classes, Kotlin Multiplatform expect/actual declarations, or platform service boundaries.

소스 보기
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

Kotlin API design

Core principle

Place behavior, types, and platform seams where their meaning is clearest to callers; use the smallest public abstraction that preserves domain language and platform independence.

Procedure

  1. Name the domain concept, its owning type or module, and the callers that

need to depend on it.

  1. Choose function ownership before adding an extension, factory, helper, or

service layer.

  1. When reviewing a public mapping over a sealed result, name every

caller-visible outcome. Flag a catch-all else that hides a subtype and recommend explicit subtype branches so the contract stays exhaustive and preserves smart casts.

  1. Represent a single-field domain concept with the smallest type that preserves

its semantic and interop contract.

  1. Keep shared code semantic; put native SDK and platform details behind an

interface or a narrowly justified expect/actual boundary.

  1. Read the focused reference for the selected decision below.
  2. Finish when the public surface states domain intent, platform details remain

at leaves, and callers do not depend on convenience abstractions with no clear owner.

Topic router

SignalRead
Member vs top-level, extension, factory, service, or receiver choiceFunction ownership
Primitive obsession, one-field domain type, @JvmInline value class, data class, interop, or Compose stabilityValue classes
Source sets, platform services, native SDKs, files, sensors, permissions, Compose Multiplatform interop, or expect/actualMultiplatform boundaries
Branching, guard-condition shape, sealed-result mapping, or a catch-all elseKotlin control flow
같은 저장소의 Skills

더 많은 Skills

모든 Skills
chrisbanes
커뮤니티

compose-animations

Use when writing or reviewing Jetpack Compose motion: visibility enter/exit, animating one property toward a target, color or size transitions, multiple properties from one state, switching composable content, or choosing between AnimatedVisibility, animateAsState, rememberTransition, AnimatedContent, and Crossfade.

설치 수
3
GitHub Stars
1.1천
업데이트
10월 9일
chrisbanes
커뮤니티

compose-focus-navigation

Use when writing or reviewing Jetpack Compose UI for TV, keyboard, desktop, accessibility focus, D-pad navigation, FocusRequester, focusProperties, key events, or initial focus behavior.

설치 수
3
GitHub Stars
1.1천
업데이트
10월 9일
chrisbanes
커뮤니티

compose-ui-testing-patterns

Use when writing or reviewing Jetpack Compose UI tests, screenshot tests or baseline-recording evidence, previews, semantics assertions, fake image loading, keyboard input, focus assertions, interaction state (hover/pressed/focused), or tests for plain state-driven UI composables.

설치 수
3
GitHub Stars
1.1천
업데이트
10월 9일
chrisbanes
커뮤니티

gradle-run

Use when planning to execute Gradle through gradle, ./gradlew, or a custom gradlew wrapper script, or diagnosing a Gradle build, compact workflow ledger, repeated failure fingerprint, check, test, lint, warning, or failure even when no new Gradle run is appropriate.

설치 수
3
GitHub Stars
1.1천
업데이트
10월 9일