agentleFS
DesquaredDesquared/agents-rules-skills/skills/android-kotlin-api-design-reviewer/SKILL.md

android-kotlin-api-design-reviewer

Skill4 starsChanged 3 months agoMITView on GitHub

Review function and class interfaces for Kotlin Coding Conventions compliance. Use when creating public APIs, reusable components, library interfaces, or when the user asks for API design review or Kotlin naming conventions.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Avoid spaces and backticked identifiers in function names, especially in public APIs (discouraged by Kotlin conventions)

    line 20
  2. Distinctive:

    Default parameters at end

    line 36
  3. Distinctive:

    Prefer properties over parameterless functions when the operation is cheap and non-throwing

    line 40
  4. Distinctive:

    Use named arguments + trailing commas for multi-parameter calls in public APIs

    line 41
  5. Distinctive:

    Use for data transfer objects

    line 53
  6. Very specific:

    Use @JvmName for interop-friendly naming

    line 61
  7. Very specific:

    Use backing properties (_internalValue) for observed state

    line 62
  8. Distinctive:

    Consider type aliases for repeated complex function types

    line 63

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Kotlin API Design Review

Naming Rules

  • Clear at point of use
  • Omit needless words
  • lowerCamelCase: properties, functions, variables
  • UpperCamelCase: classes, interfaces, objects
  • UPPER_SNAKE_CASE: constants
  • Booleans: is, has, can, should prefix
  • Collections: plural names (users, not userList)

Compose-specific Naming

  • Composable functions returning Unit: use PascalCase nouns (e.g., UserProfileCard, not userProfile)
  • Avoid spaces and backticked identifiers in function names, especially in public APIs (discouraged by Kotlin conventions)

Common Issues

IssueFix
var visiblevar isVisible
fun getData()fun getUserName()
var nameStringvar name
userListusers
Composable named like regular functionRename to PascalCase noun (ProfileScreen)
Implicit return type in libraryAdd explicit : String

Function Design

  • Named parameters for clarity beyond first param
  • Default parameters at end
  • Suspend functions for async operations
  • Extension functions for utility methods
  • Operator overloading when semantically appropriate
  • Prefer properties over parameterless functions when the operation is cheap and non-throwing
  • Use named arguments + trailing commas for multi-parameter calls in public APIs

Return Types

  • Nullable when null is meaningful
  • Result<T> for failable operations
  • Flow<T> for streams
  • sealed class for finite states
  • Explicitly declare return types in public library APIs (even if inferable)

Data Classes

  • Use for data transfer objects
  • Immutable by default (val over var)
  • Copy function for updates
  • Destructuring support

Public API / Library

  • Provide KDoc for all public members
  • Use @JvmName for interop-friendly naming
  • Use backing properties (_internalValue) for observed state
  • Consider type aliases for repeated complex function types

Severity

  • 🔴 Critical: Violates conventions
  • 🟡 Improvement: Could be clearer
  • 🟢 Enhancement: Optional polish

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.