Agent skill

Rxjava Migration

by rcosteira79 in rcosteira79/android-skills

Use only when the user explicitly requests migration from RxJava to Kotlin coroutines and/or flows.

MITAuto-check passedMobile

Install Rxjava Migration

skills CLI
$ npx skills add rcosteira79/android-skills --skill rxjava-migration -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install rcosteira79/android-skills rxjava-migration --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/rcosteira79/android-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/android-skills/skills/rxjava-migration .claude/skills/rxjava-migration && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
rxjava-migration
GitHub stars
150
Token cost
~1.2k tokens
SKILL.md length
491 words
Files
2
Skills in repo
21
Repo updated
First seen
Licence
MIT

At a glance

Use only when the user explicitly requests migration from RxJava to Kotlin coroutines and/or flows.

  • Explicitly requests migration from RxJava to Kotlin coroutines and/or flows
  • SKILL.md covers Step 1: Complexity gate, Type mapping (state it…, Retry — the accuracy trap and Interop during incremental…, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Rxjava Migration is an agent skill from rcosteira79/android-skills. Use only when the user explicitly requests migration from RxJava to Kotlin coroutines and/or flows.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `migration-map.md`).

It sits in Mobile. It works with Kotlin. The repository describes itself as: Claude Code skills for Android & KMP development. The licence is MIT.

When your agent uses it

  • Explicitly requests migration from RxJava to Kotlin coroutines and/or flows

Example prompts

  • “/rxjava-migration”

What it can do on your machine

Read from SKILL.md and the folder at commit 0f9af5a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are kotlin).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Rxjava Migration loads about 1.2k tokens when it runs. Until then it costs about 29 tokens; SKILL.md has 491 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~29
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from rcosteira79/android-skills at commit 0f9af5a, republished under its MIT licence (© rcosteira79). 491 words, ~1,219 tokens.

Download SKILL.mdSave it as .claude/skills/rxjava-migration/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
rxjava-migration
description
Use only when the user explicitly requests migration from RxJava to Kotlin coroutines and/or flows.

RxJava Migration

Migrate RxJava to Kotlin coroutines/flows incrementally. Only invoke this skill when the user explicitly asks to migrate RxJava code. Simple cases map directly; complex cases need a strategy and user input before any code is written.

Step 1: Complexity gate

Classify before writing any migrated code. A chain is Complex if ANY of: nested flatMap/switchMap with an inner Single/Observable; a custom Scheduler; complex error recovery (retryWhen, backoff, retry counts); multi-source zip/combineLatest (3+ sources); Flowable with an explicit backpressure strategy; a Subject shared across classes; or an unclear API return type. Any single Complex criterion makes the whole chain Complex — a two-operator chain with retryWhen is Complex.

Always confirm what each called API returns before migrating — do not assume. A leaf you think is migrated may still return Single/Observable.

Type mapping (state it explicitly — don't silently transform)

RxJavaCoroutines/Flow
Observable<T> / Flowable<T>Flow<T> (Flowable: match the original backpressure with buffer() / conflate())
Single<T> / Maybe<T> / Completablesuspend fun: T / T? / Unit
PublishSubject / ReplaySubject(n)MutableSharedFlow(replay = 0 / n)
BehaviorSubject<T>ask — MutableStateFlow vs MutableSharedFlow(replay = 1)

BehaviorSubject — ask first: StateFlow always has a current value (needs an initial, exposes .value, replays it to new collectors); SharedFlow(replay = 1) also replays the last emission but has no .value and no initial-value requirement. "Do you always have an initial value and need .value access, or is the stream sometimes empty at start?"

Schedulers and the observeOn shift

Schedulers.io() → Dispatchers.IO, computation() → Default, mainThread() → Main, single() → newSingleThreadContext(...), newThread() → IO (per-task thread spawning isn't idiomatic in coroutines).

  • observeOn(AndroidSchedulers.mainThread()) does NOT become a dispatcher switch in the repository/use case — it means the caller collects on Main, which in the coroutines model is the ViewModel's job (viewModelScope runs on Main). Explain this shift to the developer.
  • When the called API is already a suspend fun, it manages its own dispatcher via withContext — subscribeOn has no equivalent and simply disappears. Do not wrap an already-main-safe suspend function in another withContext.
  • subscribeOn + observeOn → flowOn applies upstream only; restructure accordingly.

For the full operator mapping, see migration-map.md.

Show full SKILL.md (161 more words)Show less

Retry — the accuracy trap

RxJava's retryWhen is stateful; Flow's retry predicate receives the Throwable, not an index.

kotlin
// WRONG — 'attempt' is a Throwable, not a Long; this does not compile
flow.retry(3) { attempt -> delay(attempt * 1000L); true }

// CORRECT — retry(n)'s predicate gets the cause
flow.retry(3) { cause -> cause is IOException }

// CORRECT — stateful backoff: attempt IS the 0-based index here
flow.retryWhen { cause, attempt ->
    if (cause is IOException && attempt < 3) { delay((attempt + 1) * 1000L); true } else false
}

Use retryWhen { cause, attempt -> } for any policy that depends on the attempt count.

Interop during incremental migration

Add kotlinx-coroutines-rx3 (or rx2); keep interop at layer boundaries only, never mixing RxJava and coroutines inside one function body.

kotlin
observable.asFlow(); single.await(); maybe.awaitSingleOrNull(); completable.await()   // Rx → coroutines
flow.asObservable(); flow.asSingle()   // coroutines → Rx (asSingle throws if the flow emits 0 or 2+ elements)

Migrate leaf-up (data source → repository → use case → ViewModel), remove each bridge once its layer is fully migrated, and commit per layer.

Complex cases — stop and ask before migrating

retryWhen (count? linear vs exponential? which error types? what after exhaustion?); a custom Scheduler (which CoroutineDispatcher?); Flowable backpressure (buffer / conflate / DROP_OLDEST?); flatMap/switchMap over writes — switchMap → flatMapLatest is safe for reads (search/live data) but cancels in-flight work, so it's dangerous for writes; a Subject shared across classes (state → StateFlow, event → SharedFlow?). For onErrorResumeNext → catch, rethrow cancellation: catch { e -> if (e is CancellationException) throw e else emit(fallback) }.

(compositeDisposable.clear() in onCleared() → delete it entirely: viewModelScope is cancelled automatically when the ViewModel is cleared.)

© rcosteira79, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in plugins/android-skills/skills/rxjava-migration of rcosteira79/android-skills.

  • SKILL.md
  • migration-map.md

Open the folder on GitHubat commit 0f9af5a

Compare with similar skills

Rxjava Migration next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Rxjava Migration compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Rxjava Migration this skillrcosteira79/android-skills150—~1.2kAutomated safety check: PassMIT
Compose Multiplatform Patternsmonta-app/ocpp-emulator1795 repos~2kAutomated safety check: PassApache-2.0
Kotlin Patternsgetknit/knit1305 repos~4.7kAutomated safety check: PassGPL-3.0
Summoncodeyousef/summon167—~1.1kAutomated safety check: PassApache-2.0
Add JSON Schemayontrack/yontrack102—~883Automated safety check: PassMIT
Add Ktnip Parameter Strategyvendelieu/telegram-bot249—~613Automated safety check: PassApache-2.0

Similar skills

  • Compose Multiplatform Patterns

    monta-app/ocpp-emulator

    Compose Multiplatform and Jetpack Compose patterns for KMP projects — state management, navigation, theming, performance, and platform-specific UI.

    179 GitHub starsUsed in 5 repos~2k tokens
    MobileAuto-check passed
  • Kotlin Patterns

    getknit/knit

    Idiomatic Kotlin patterns, best practices, and conventions for building robust, efficient, and maintainable Kotlin applications with coroutines, null safety, and DSL builders.

    130 GitHub starsUsed in 5 repos~4.7k tokens
    MobileAuto-check passed
  • Summon

    codeyousef/summon

    A skill your agent uses when developing applications with the Summon Kotlin Multiplatform UI framework.

    167 GitHub stars~1.1k tokensUpdated 1 mo ago
    MobileAuto-check passed
  • Add JSON Schema

    yontrack/yontrack

    Add a new downloadable JSON schema to the Resources page — Kotlin provider class only, auto-discovered by Spring.

    102 GitHub stars~883 tokensUpdated yesterday
    MobileAuto-check passed
  • Add Ktnip Parameter Strategy

    vendelieu/telegram-bot

    Adds a new parameter resolution strategy to the ktnip KSP processor.

    249 GitHub stars~613 tokensUpdated 3 days ago
    MobileAuto-check passed
  • CometChat Android v5 Headless SDK

    cometchat/cometchat-skills

    Builds chat on Android with your own UI against the headless CometChat Chat SDK v5, covering install, Jetifier conflicts, credentials and init-before-login ordering.

    129 GitHub stars~4k tokensUpdated 2 days ago
    MobileAuto-check passed

More from rcosteira79/android-skills

All 21 skills in this repo
  • Guides writing correct, performant Compose and Compose Multiplatform UI across Android, desktop, iOS and web, from state and animation to design-to-code and crash fixes.

    150 GitHub stars~2.6k tokensUpdated 18 days ago
    Auto-check passed
  • Kotlin Multiplatform Boundaries

    rcosteira79/android-skills

    Helps choose how common Kotlin Multiplatform code reaches platform APIs: expect/actual, a common interface with platform bindings, or separate platform screens.

    150 GitHub stars~1.5k tokensUpdated 18 days ago
    Auto-check passed
  • Android Data Layer and Room in KMP

    rcosteira79/android-skills

    Sets out the repository pattern's error-propagation model for Android and Kotlin Multiplatform, plus the Room setup for commonMain.

    150 GitHub stars~1.2k tokensUpdated 18 days ago
    Auto-check passed
  • Android Debugging

    rcosteira79/android-skills

    Android and KMP debugging techniques for crashes, ANRs, memory leaks, R8 traces, Gradle failures and Compose recomposition, built on finding the root cause first.

    150 GitHub stars~2.6k tokensUpdated 18 days ago
    Auto-check passed
  • Android and KMP Baseline

    rcosteira79/android-skills

    Sets house defaults for Android and Kotlin Multiplatform work and routes to the right specialized skill for Compose, networking, testing or build tooling.

    150 GitHub stars~3k tokensUpdated 18 days ago
    Auto-check passed
  • Android Gradle Build Logic

    rcosteira79/android-skills

    Sets up Android Gradle convention plugins in a build-logic composite build, including the version catalog wiring and shared configuration that are easy to get wrong.

    150 GitHub stars~959 tokensUpdated 18 days ago
    Auto-check passed

Works with

Categories

Questions about Rxjava Migration

What does Rxjava Migration do?

Use only when the user explicitly requests migration from RxJava to Kotlin coroutines and/or flows. Rxjava Migration is an agent skill from rcosteira79/android-skills. Use only when the user explicitly requests migration from RxJava to Kotlin coroutines and/or flows.

When should I use Rxjava Migration?

Rxjava Migration fits situations like: explicitly requests migration from RxJava to Kotlin coroutines and/or flows.

How do I install Rxjava Migration in Claude Code?

Run `npx skills add rcosteira79/android-skills --skill rxjava-migration -a claude-code`. Or copy the skill folder (plugins/android-skills/skills/rxjava-migration in rcosteira79/android-skills) into .claude/skills/rxjava-migration in your project. Claude Code loads it when a task matches its description.

How do I install Rxjava Migration in Codex?

Run `npx skills add rcosteira79/android-skills --skill rxjava-migration -a codex`. Or copy the skill folder (plugins/android-skills/skills/rxjava-migration in rcosteira79/android-skills) into .agents/skills/rxjava-migration in your project. Codex loads it when a task matches its description.

Can I use Rxjava Migration in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add rcosteira79/android-skills --skill rxjava-migration -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/rxjava-migration, .gemini/skills/rxjava-migration, .github/skills/rxjava-migration and .opencode/skills/rxjava-migration in your project.

What does Rxjava Migration need to run?

SKILL.md names no scripts, command-line tools or credentials: Rxjava Migration is instructions for the agent only.

Does Rxjava Migration access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Rxjava Migration safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Rxjava Migration use?

Rxjava Migration is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Rxjava Migration use?

About 1.2k tokens (SKILL.md is roughly 4.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Rxjava Migration?

Skills that share tags, products or a category with Rxjava Migration: Compose Multiplatform Patterns (monta-app/ocpp-emulator, 179 stars), Kotlin Patterns (getknit/knit, 130 stars), Summon (codeyousef/summon, 167 stars) and Add JSON Schema (yontrack/yontrack, 102 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Rxjava Migration?

rcosteira79 (a GitHub user) maintains it in rcosteira79/android-skills, which has 150 GitHub stars. The repository holds 21 skills in this directory. The repository was last updated on September 19, 2026.

Source: rcosteira79/android-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.