Skip to content
Mobile
Skill

/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.

From plugin
skills
1.1k21 skills

Claude Code

$ npx -y skills add chrisbanes/skills --skill kotlin-api-design --agent claude-code

SKILL.md

kotlin-api-design.SKILL.md
name: kotlin-api-design
description: 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.

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. 2. Choose function ownership before adding an extension, factory, helper, or service layer. When rejecting one, name the owner callers should use instead. 3. 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. 4. Represent a single-field domain concept with the smallest type that preserves its semantic and interop contract. 5. Keep shared code semantic; put native SDK and platform details behind an interface or a narrowly justified expect/actual boundary. 6. Read the focused reference for the selected decision below. 7. 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

| Signal | Read | |---|---| | Member vs top-level, extension, factory, service, or receiver choice | [Function ownership](references/functions.md) | | Primitive obsession, one-field domain type, `@JvmInline value class`, data class, interop, or Compose stability | [Value classes](references/value-classes.md) | | Source sets, platform services, native SDKs, files, sensors, permissions, Compose Multiplatform interop, or expect/actual | [Multiplatform boundaries](references/multiplatform-boundaries.md) | | Branching, guard-condition shape, sealed-result mapping, or a catch-all `else` | [Kotlin control flow](../kotlin-control-flow/SKILL.md) |

Read more
@chrisbanes
Ships withskills

A set of skills for Kotlin, Jetpack Compose, Android development, and grounded writing. The repository is also a portable Agent Plugins and the immediate skill directories under skills/.

Stars on GitHub

Momentum

stars in total
1.1k
Star history of chrisbanes/skills on GitHub, a chart by star-history.com

Other skills on skills.

changelog

changelog

Use when updating or reviewing Unreleased changelog entries, reconciling a changelog against Git history and issue or PR…

@chrisbanes@chrisbanesInstall Skill
compose-animations

compose-animations

Use when writing or reviewing Jetpack Compose motion: visibility enter/exit, animating one property toward a target, color or…

@chrisbanes@chrisbanesInstall Skill
compose-performance

compose-performance

Use when investigating Jetpack Compose recomposition cost, compiler stability reports, skippability, unstable parameters,…

@chrisbanes@chrisbanesInstall Skill

More skills from other plugins.

deep-code-review

deep-code-review

In-depth design-focused code review - understands codebase context before evaluating PR changes, posts structured feedback to…

expo1d53k
@expo@expoInstall Skill
modlens

modlens

Plug-in vision for text-only models. Hard rule: when a file path or URL with an image extension (.png, .jpg, .jpeg, .webp, .gif,…

modlens2w4.6k
@liustack@liustackInstall Skill
appllama-app-design-skill

appllama-app-design-sk…

Build native-feeling, benchmark-quality mobile app screens (Expo / React Native). Use when designing or implementing any mobile…

appllama2mo3.9k
@appllama@appllamaInstall Skill

Questions about kotlin-api-design.

Which coding agents can use kotlin-api-design?
kotlin-api-design installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.