Apollo Kotlin
apollographql/skills
Guide for building applications with Apollo Kotlin, the GraphQL client library for Android and Kotlin.
A skill your agent uses when setting up or working with Ktor client in KMP or Android projects — HttpClient configuration, per-platform engine selection, kotlinx.serialization, bearer auth with…
$ npx skills add rcosteira79/android-skills --skill kmp-ktor -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install rcosteira79/android-skills kmp-ktor --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ 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/kmp-ktor .claude/skills/kmp-ktor && rm -rf skills-srcUse ~/.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/
Install the "kmp-ktor" agent skill from https://github.com/rcosteira79/android-skills/tree/main/plugins/android-skills/skills/kmp-ktor into .claude/skills/kmp-ktor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "kmp-ktor", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/rcosteira79/android-skills/tree/main/plugins/android-skills/skills/kmp-ktorType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add rcosteira79/android-skills --skill kmp-ktor -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install rcosteira79/android-skills kmp-ktor --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rcosteira79/android-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/plugins/android-skills/skills/kmp-ktor .agents/skills/kmp-ktor && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "kmp-ktor" agent skill from https://github.com/rcosteira79/android-skills/tree/main/plugins/android-skills/skills/kmp-ktor into .agents/skills/kmp-ktor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "kmp-ktor", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add rcosteira79/android-skills --skill kmp-ktor -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install rcosteira79/android-skills kmp-ktor --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rcosteira79/android-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/plugins/android-skills/skills/kmp-ktor .cursor/skills/kmp-ktor && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "kmp-ktor" agent skill from https://github.com/rcosteira79/android-skills/tree/main/plugins/android-skills/skills/kmp-ktor into .cursor/skills/kmp-ktor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "kmp-ktor", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/rcosteira79/android-skills.git --path plugins/android-skills/skills/kmp-ktor--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add rcosteira79/android-skills --skill kmp-ktor -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install rcosteira79/android-skills kmp-ktor --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rcosteira79/android-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/plugins/android-skills/skills/kmp-ktor .gemini/skills/kmp-ktor && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "kmp-ktor" agent skill from https://github.com/rcosteira79/android-skills/tree/main/plugins/android-skills/skills/kmp-ktor into .gemini/skills/kmp-ktor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "kmp-ktor", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install rcosteira79/android-skills kmp-ktorInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add rcosteira79/android-skills --skill kmp-ktor -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/rcosteira79/android-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/plugins/android-skills/skills/kmp-ktor .github/skills/kmp-ktor && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "kmp-ktor" agent skill from https://github.com/rcosteira79/android-skills/tree/main/plugins/android-skills/skills/kmp-ktor into .github/skills/kmp-ktor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "kmp-ktor", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add rcosteira79/android-skills --skill kmp-ktor -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install rcosteira79/android-skills kmp-ktor --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rcosteira79/android-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/plugins/android-skills/skills/kmp-ktor .opencode/skills/kmp-ktor && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "kmp-ktor" agent skill from https://github.com/rcosteira79/android-skills/tree/main/plugins/android-skills/skills/kmp-ktor into .opencode/skills/kmp-ktor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "kmp-ktor", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
kmp-ktorA skill your agent uses when setting up or working with Ktor client in KMP or Android projects — HttpClient configuration, per-platform engine selection, kotlinx.serialization, bearer auth with…
Kmp Ktor is an agent skill from rcosteira79/android-skills. Use when setting up or working with Ktor client in KMP or Android projects — HttpClient configuration, per-platform engine selection, kotlinx.serialization, bearer auth with refresh, MockEngine testing, and error mapping at the repository boundary.
Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Backend & APIs. It works with Android and Kotlin. The repository describes itself as: Claude Code skills for Android & KMP development. The licence is MIT.
Read from SKILL.md and the folder at commit 0f9af5a. It shows what the files ask for, not the result of running them.
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.
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.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Kmp Ktor loads about 1.7k tokens when it runs. Until then it costs about 64 tokens; SKILL.md has 512 words of instructions outside code blocks.
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.
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.
The full file from rcosteira79/android-skills at commit 0f9af5a, republished under its MIT licence (© rcosteira79). 512 words, ~1,701 tokens.
.claude/skills/kmp-ktor/SKILL.md (or your agent's skills folder).This reference covers the Ktor client configuration traps — plugin install order, serialization flags, auth refresh, and error mapping — not the basics of a shared HttpClient, engine selection, or ContentNegotiation setup. Related: android-skills:android-data-layer (repository + the DataError error model — its canonical home), android-skills:android-retrofit (Android-only equivalent).
HttpRequestRetry BEFORE HttpTimeoutThe install order most often gotten wrong: installing HttpTimeout before HttpRequestRetry. Plugins run in install order for outgoing requests; retries must be able to catch timeout errors, so retry has to wrap timeout.
val json = Json { ignoreUnknownKeys = true; coerceInputValues = true; encodeDefaults = true } // encodeDefaults: see the section below
HttpClient(engine) {
install(ContentNegotiation) { json(json) }
install(Auth) { bearer { /* loadTokens / refreshTokens */ } }
install(HttpRequestRetry) { // BEFORE HttpTimeout
retryOnServerErrors(maxRetries = 3)
exponentialDelay()
}
install(HttpTimeout) { // AFTER HttpRequestRetry
requestTimeoutMillis = 30_000; connectTimeoutMillis = 15_000; socketTimeoutMillis = 15_000
}
}Reversed, HttpTimeout resolves the request as failed before the retry plugin sees it, so timeouts are never retried. (Separately, the Auth plugin handles 401 refresh independently — let HttpRequestRetry cover transient/5xx failures; don't chain the two around the same status code.)
encodeDefaults = true — or protocol-constant fields silently vanishkotlinx.serialization defaults to encodeDefaults = false, which strips any property whose value equals its declared default from the serialized output. A jsonrpc: String = "2.0" (or version = "1.0", type = "...") disappears from the payload; the server rejects every request with a generic "invalid request," and the fix is a one-line flag — found only after hours chasing HTTP-layer red herrings. Always set it for client APIs — the val json defined at the top of this file does, alongside ignoreUnknownKeys and coerceInputValues. That one configured instance is what the whole client shares: install(ContentNegotiation) { json(json) } and the WebSocket converter both take it.
expectSuccess — pick one model, consistentlyexpectSuccess = true makes Ktor throw ClientRequestException (4xx) / ServerResponseException (5xx) on non-2xx — and that throw runs before any manual status check, so an if (response.status == OK) branch after it is dead code. Pick one model project-wide: expectSuccess = true + try/catch (matches the repository pattern), or expectSuccess = false + explicit response.status.isSuccess() inspection. Never mix them.
markAsRefreshTokenRequest() or it loopsIn the Auth bearer { refreshTokens { … } } block, mark the refresh POST with markAsRefreshTokenRequest() so it isn't intercepted by the same Auth plugin — without it, a failing refresh triggers another refresh, looping infinitely. It's an HttpRequestBuilder extension: call it inside the request builder block, not bare in refreshTokens { } (where it doesn't compile).
install(Auth) {
bearer {
loadTokens { tokenStorage.getTokens()?.let { BearerTokens(it.access, it.refresh) } }
refreshTokens {
val refresh = oldTokens?.refreshToken ?: return@refreshTokens null
val r = client.post("auth/refresh") {
markAsRefreshTokenRequest() // skip the Auth plugin for this call
setBody(RefreshRequestDto(refresh))
}.body<TokenResponseDto>()
tokenStorage.save(r.accessToken, r.refreshToken); BearerTokens(r.accessToken, r.refreshToken)
}
sendWithoutRequest { it.url.pathSegments.none { seg -> seg in listOf("login", "register") } }
}
}Keep BearerTokens at the plugin boundary; the rest of the app uses your own token type. TokenStorage is project-defined (DataStore on Android/JVM, Keychain on iOS).
For real-time transports, install the kotlinx-serialization converter so typed messages flow over the same Json config as ContentNegotiation; without it you hand-encode/decode Frame.Text. (SSE = server→client only, plain HTTP, built-in reconnect; WebSocket = bidirectional, manual reconnect, binary frames — default to SSE when the client only consumes.)
val client = HttpClient(engine) {
install(WebSockets) {
pingIntervalMillis = 30_000
contentConverter = KotlinxWebsocketSerializationConverter(json) // the shared configured instance — bare `Json` reverts to encodeDefaults = false
}
install(SSE)
}
client.webSocket("wss://api.example.com/ws") {
sendSerialized(SubscribeMessage(topic = "items"))
while (true) { val msg = receiveDeserialized<ServerMessage>(); /* handle */ }
}
// SSE — incoming is a Flow<ServerSentEvent>
client.sse("https://api.example.com/events") { incoming.collect { event -> /* event.event / event.data / event.id */ } }Wrap SSE/WebSocket collection in a LaunchedEffect or repository coroutine so cancellation closes the HTTP connection when the consumer goes away.
Catch specific Ktor types at the repository (ClientRequestException / ServerResponseException / HttpRequestTimeoutException / IOException) and map to DataError — catch (e: Exception) would swallow CancellationException. The full repository pattern + DataError taxonomy lives in android-skills:android-data-layer. For richer per-error UI states (Unauthorized, RateLimited, Forbidden, …), a sealed ApiResult<T> + a safeRequest wrapper with expectSuccess = false is the alternative shape — pick one per project.
Inject HttpClientEngine so tests swap in MockEngine, reusing the production createHttpClient factory so plugin config matches:
val mockEngine = MockEngine { request ->
assertEquals("/users/42", request.url.encodedPath)
respond("""{"id":"42","name":"Ada","created_at":1700000000000}""",
HttpStatusCode.OK, headersOf(HttpHeaders.ContentType, "application/json"))
}
val repo = UserRepository(UserService(createHttpClient(mockEngine, baseUrl = "https://api.example.com/")))© rcosteira79, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in plugins/android-skills/skills/kmp-ktor of rcosteira79/android-skills.
Open the folder on GitHubat commit 0f9af5a
Kmp Ktor 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Kmp Ktor this skillrcosteira79/android-skills | 153 | — | ~1.7k | Automated safety check: Pass | MIT | |
| Apollo Kotlinapollographql/skills | 117 | — | ~547 | Automated safety check: Pass | MIT | |
| CometChat Android v5 Headless SDKcometchat/cometchat-skills | 132 | — | ~4k | Automated safety check: Pass | MIT | |
| Kotlin SpecialistJeffallan/claude-skills | 12k | — | ~1.5k | Automated safety check: Pass | MIT | |
| Android Hidden API and R8 Checkgkd-kit/gkd | 43k | — | ~1.5k | Automated safety check: Pass | GPL-3.0 | |
| Cherrypick Logkomikku-app/komikku | 4.8k | — | ~1.9k | Automated safety check: Pass | Apache-2.0 |
apollographql/skills
Guide for building applications with Apollo Kotlin, the GraphQL client library for Android and Kotlin.
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.
Jeffallan/claude-skills
Applies idiomatic Kotlin 1.9+ patterns for coroutines and Flow, multiplatform code, Jetpack Compose on Android and Ktor servers, checked with detekt and ktlint.
gkd-kit/gkd
Checks whether Android hidden-API implementations and system callbacks survive R8 minification, and diagnoses Release-only failures such as AbstractMethodError.
komikku-app/komikku
Update and review cherrypicklog.md, the todo list of upstream commits not yet cherry-picked into the fork's target branch.
monta-app/ocpp-emulator
Compose Multiplatform and Jetpack Compose patterns for KMP projects — state management, navigation, theming, performance, and platform-specific UI.
rcosteira79/android-skills
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.
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.
rcosteira79/android-skills
Sets out the repository pattern's error-propagation model for Android and Kotlin Multiplatform, plus the Room setup for commonMain.
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.
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.
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.
Categories
A skill your agent uses when setting up or working with Ktor client in KMP or Android projects — HttpClient configuration, per-platform engine selection, kotlinx.serialization, bearer auth with…. Kmp Ktor is an agent skill from rcosteira79/android-skills.serialization, bearer auth with refresh, MockEngine testing, and error mapping at the repository boundary.
Kmp Ktor fits situations like: working with Ktor client in KMP; android projects — HttpClient configuration; per-platform engine selection; kotlinx.serialization.
Run `npx skills add rcosteira79/android-skills --skill kmp-ktor -a claude-code`. Or copy the skill folder (plugins/android-skills/skills/kmp-ktor in rcosteira79/android-skills) into .claude/skills/kmp-ktor in your project. Claude Code loads it when a task matches its description.
Run `npx skills add rcosteira79/android-skills --skill kmp-ktor -a codex`. Or copy the skill folder (plugins/android-skills/skills/kmp-ktor in rcosteira79/android-skills) into .agents/skills/kmp-ktor in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add rcosteira79/android-skills --skill kmp-ktor -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/kmp-ktor, .gemini/skills/kmp-ktor, .github/skills/kmp-ktor and .opencode/skills/kmp-ktor in your project.
SKILL.md names no scripts, command-line tools or credentials: Kmp Ktor is instructions for the agent only.
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.
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.
Kmp Ktor is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.7k tokens (SKILL.md is roughly 6.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Kmp Ktor: Apollo Kotlin (apollographql/skills, 117 stars), CometChat Android v5 Headless SDK (cometchat/cometchat-skills, 132 stars), Kotlin Specialist (Jeffallan/claude-skills, 12k stars) and Android Hidden API and R8 Check (gkd-kit/gkd, 43k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
rcosteira79 (a GitHub user) maintains it in rcosteira79/android-skills, which has 153 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.