agentleFS
GDvegaGDvega/super-android-kotlin-firebase-skill/skills/kotlin-core/SKILL.md

kotlin-core

Skill2 starsChanged 5 months agoMITView on GitHub

Use for Kotlin null safety, data classes, sealed classes/interfaces, coroutines, Flow, Result, extension functions and error handling.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 8 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Keep Kotlin code idiomatic, cancellable, explicit and testable.

    line 8
  2. Distinctive:

    Read the current Kotlin style and version.

    line 25
  3. Distinctive:

    Add or update unit tests for changed behavior.

    line 29
  4. Distinctive:

    Do not swallow CancellationException.

    line 34
  5. Distinctive:

    Avoid !! except at hard verified boundaries.

    line 35
  6. Distinctive:

    Keep extension functions focused and discoverable.

    line 36
  7. Distinctive:

    Do not assume these companion skills are installed.

    line 50
  8. Distinctive:

    Use $super-android-kotlin-firebase to convert this callback API to Flow.

    line 87
  9. Very specific:

    Use $super-android-kotlin-firebase to model loading/success/error state in Kotlin.

    line 88

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

Purpose

Keep Kotlin code idiomatic, cancellable, explicit and testable.

When to use

  • Refactoring Kotlin domain, data or ViewModel code.
  • Modeling UI state, domain results or errors.
  • Fixing coroutine, Flow, cancellation or nullability issues.

Inputs to inspect

  • Kotlin version and compiler/plugin setup.
  • Code under change and tests.
  • Coroutine scopes, dispatchers and Flow operators.
  • Expected error and state behavior.

Required workflow

  1. Read the current Kotlin style and version.
  2. Identify state, error and async boundaries.
  3. Choose sealed types, Result or domain errors intentionally.
  4. Preserve cancellation and structured concurrency.
  5. Add or update unit tests for changed behavior.

Rules

  • Never use GlobalScope.
  • Do not swallow CancellationException.
  • Avoid !! except at hard verified boundaries.
  • Keep extension functions focused and discoverable.
  • Expose immutable state to consumers.

Related existing skills

Local skills to invoke

  • android-architecture
  • testing
  • dependency-injection
  • ui-state-design

External companion skills to use when installed

Do not assume these companion skills are installed. Prefer the local skills above first, then consult Companion Skills for install and verification commands.

  • android/skills — use for official Android workflow alignment when a first-party companion skill exists for the task.

Files commonly touched

  • *.kt
  • ViewModel files
  • domain models
  • repository interfaces
  • test files

Commands to validate

./gradlew test
./gradlew compileDebugKotlin
./gradlew lint

Common mistakes to avoid

  • Launching coroutines without lifecycle or owner scope.
  • Mixing UI strings into domain errors.
  • Using nullable types where a sealed state is clearer.
  • Creating magical extensions that hide side effects.

Checklist

  • Nullability explicit.
  • Cancellation preserved.
  • Flow/state testable.
  • Errors modeled.
  • Tests added or recommended.

Example prompts

  • Use $super-android-kotlin-firebase to convert this callback API to Flow.
  • Use $super-android-kotlin-firebase to model loading/success/error state in Kotlin.

Expected response style

Respond with: brief diagnosis, change plan, affected files, code or diff summary, validation commands, tests added or recommended, risks, and next step. For review tasks, lead with findings ordered by severity.

References

  • ../../docs/audits/FUENTES_LOCALES.md
  • references/kotlin-state-and-errors.md
  • templates/result-state-template.md

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.