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.
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- accessibility-annotationsSkill
- android-accessibility-validatorSkill
- android-compose-architecture-reviewSkill
- android-performance-profilerSkill
- flutter-accessibility-validatorSkill
- flutter-bug-investigationSkill
- flutter-code-reviewSkill
- flutter-design-architectureSkill
- flutter-feature-analysisSkill
- flutter-feature-implementationSkill
- flutter-performance-optimizerSkill
- ios-accessibility-validatorSkill
- ios-performance-profilerSkill
- ios-swift-api-design-reviewerSkill
- ios-swiftui-architecture-reviewSkill
- shared-bug-investigationSkill
- shared-perf-comparison-videoSkill
- shared-product-motion-videoSkill
- shared-task-workflowSkill
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
- Distinctive: line 20
Avoid spaces and backticked identifiers in function names, especially in public APIs (discouraged by Kotlin conventions)
- Distinctive: line 36
Default parameters at end
- Distinctive: line 40
Prefer properties over parameterless functions when the operation is cheap and non-throwing
- Distinctive: line 41
Use named arguments + trailing commas for multi-parameter calls in public APIs
- Distinctive: line 53
Use for data transfer objects
- Very specific: line 61
Use @JvmName for interop-friendly naming
- Very specific: line 62
Use backing properties (_internalValue) for observed state
- Distinctive: line 63
Consider type aliases for repeated complex function types
≈ “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.
Files
Kotlin API Design Review
Naming Rules
- Clear at point of use
- Omit needless words
lowerCamelCase: properties, functions, variablesUpperCamelCase: classes, interfaces, objectsUPPER_SNAKE_CASE: constants- Booleans:
is,has,can,shouldprefix - Collections: plural names (
users, notuserList)
Compose-specific Naming
- Composable functions returning
Unit: use PascalCase nouns (e.g.,UserProfileCard, notuserProfile) - Avoid spaces and backticked identifiers in function names, especially in public APIs (discouraged by Kotlin conventions)
Common Issues
| Issue | Fix |
var visible | var isVisible |
fun getData() | fun getUserName() |
var nameString | var name |
userList | users |
| Composable named like regular function | Rename to PascalCase noun (ProfileScreen) |
| Implicit return type in library | Add 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
@JvmNamefor 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
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
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.

