dimitriremoiville/cc-mobile/ktor-multiplatform
Claude Code and agent skill by dimitriremoiville/cc-mobile
- community
Checking that the SKILL.md file is still in the repository.
Networking patterns for this KMM project — Ktor Client in `commonMain`, platform engines (OkHttp on Android, Darwin on iOS), kotlinx.serialization, repository integration, and error mapping. Load whenever writing or editing an API call, engine configuration, or serializer.
Install
npx vskill@latest install dimitriremoiville/cc-mobile/ktor-multiplatformSKILL.md
The same SKILL.md was published earlier as dimitriremoiville/cc-mobile/ktor-multiplatform.
Ktor Client (multiplatform)
The pipeline
Errors are mapped to domain errors at the repository boundary. Nothing above the data layer sees io.ktor.client.plugins.* exceptions.
HttpClient setup (in commonMain)
- The engine (OkHttp / Darwin) is injected — don't reference an engine type in
commonMain. Provide it via Koin (see below). ContentNegotiation+kotlinx.serializationis the only JSON pathway. No manualJson.decodeFromStringin repositories.Loggingonly in debug.isDebug()is anexpect funor a build-time flag.
Per-platform engine (via Koin)
API wrappers
Keep them thin and focused:
Every endpoint method is suspend. Responses are deserialized by ContentNegotiation.
DTOs
Rules:
- DTOs in
commonMain/.../data/remote/, never leaking upward. @Serializable+@SerialNamefor snake_case boundary.- Nullability reflects the wire, not the domain.
Mappers
One-way. Extension functions on the DTO or free functions; pick one style per project.
Repository
- Always rethrow `CancellationException`.
runCatchingdoesn't by default. - Map
ClientRequestException/ServerResponseExceptionbefore generic catches.
Testing with MockEngine
See ${CLAUDE_PLUGIN_ROOT}/skills/kmm-testing/SKILL.md. MockEngine is multiplatform-friendly; use it in commonTest.
Common pitfalls
- Referencing `OkHttp` or `Darwin` types in `commonMain`. Inject the engine as
HttpClientEngine. - Creating an `HttpClient` per request. It's a singleton — expensive to build.
- `Logging` plugin in release. Guard with
isDebug(). - Swallowing `CancellationException` via
runCatching. Rethrow it. - Using `try { client.get(...).body() } catch (e: Exception)` without specific catches — always differentiate
ClientRequestException,ServerResponseException, and timeouts.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/cc-mobile-kmm/skills/ktor-multiplatform/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dimitriremoiville/cc-mobile/ktor-multiplatform)