modularization
Use when writing or changing any class, object, function, property, or constant in a multi-module Android/Kotlin project (settings.gradle(.kts) includes more than one module — :app, :core:*, :feature:*, :data, etc.). Symptoms — a top-level declaration left at Kotlin's default public visibility; an implementation class, mapper, helper, constant, or UI-state holder reachable from another module though only used within its own; reaching for public "because the caller needs it"; "should this be public or internal?".
How do I install this agent skill?
npx skills add https://github.com/rcosteira79/android-skills --skill modularizationIs this agent skill safe to install?
- Gen Agent Trust Hubpass
The skill provides instructional guidance on Kotlin visibility modifiers for Android development. It contains no executable code, network operations, or security vulnerabilities.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
What does this agent skill do?
Modularization
Declare everything at the lowest visibility that still compiles. Start private; widen to internal only when another file in the same module needs it; widen to public only when a different module actually consumes it. Kotlin defaults to public, and in a multi-module project that default is usually wrong — a public symbol joins the module's API surface: it leaks implementation across the boundary and you are then obliged to keep it stable.
- Public interface as the module's API → the interface is
public; its implementation class staysinternal(DI-bound, never named from another module). - Mapper / helper / extension / constant / UI-state holder used only inside the module →
internal(orprivateif a single file uses it). "Rendered by a composable in this module" does not requirepublic—internalis visible to the whole module. - Member used only within its class →
private.
Widening a symbol to public is a decision, not a default: confirm a real cross-module consumer first.
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/rcosteira79/android-skills/modularization">View modularization on skillZs</a>