ktor-patterns — for Claude Code ktor-patterns, everything-claude-code-mobile, community, for Claude Code, ide skills, Client, Patterns, Modern, Kotlin, httpClient

v1.0.0

About this Skill

Perfect for Kotlin-focused AI Agents needing a modern HTTP client for mobile-first development. Ktor client patterns for Android networking with content negotiation, error handling, and interceptors.

Features

Ktor Client Patterns
Modern HTTP client for Kotlin.
val httpClient = HttpClient(OkHttp) {
// JSON serialization
install(ContentNegotiation) {

# Core Topics

ahmed3elshaer ahmed3elshaer
[0]
[0]
Updated: 3/12/2026

Killer-Skills Review

Decision support comes first. Repository text comes second.

Reference-Only Page Review Score: 8/11

This page remains useful for teams, but Killer-Skills treats it as reference material instead of a primary organic landing page.

Original recommendation layer Concrete use-case guidance Explicit limitations and caution Locale and body language aligned
Review Score
8/11
Quality Score
48
Canonical Locale
en
Detected Body Locale
en

Perfect for Kotlin-focused AI Agents needing a modern HTTP client for mobile-first development. Ktor client patterns for Android networking with content negotiation, error handling, and interceptors.

Core Value

Empowers agents to create robust HTTP clients with JSON serialization, timeouts, and logging using OkHttp and ContentNegotiation, enabling efficient communication with web services.

Ideal Agent Persona

Perfect for Kotlin-focused AI Agents needing a modern HTTP client for mobile-first development.

Capabilities Granted for ktor-patterns

Configuring HTTP clients for Kotlin-based projects
Implementing JSON serialization for data exchange
Setting up timeouts for reliable network operations

! Prerequisites & Limits

  • Requires Kotlin programming language
  • Dependent on OkHttp library
  • Limited to HTTP client functionality

Why this page is reference-only

  • - The underlying skill quality score is below the review floor.

Source Boundary

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

After The Review

Decide The Next Action Before You Keep Reading Repository Material

Killer-Skills should not stop at opening repository instructions. It should help you decide whether to install this skill, when to cross-check against trusted collections, and when to move into workflow rollout.

Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is ktor-patterns?

Perfect for Kotlin-focused AI Agents needing a modern HTTP client for mobile-first development. Ktor client patterns for Android networking with content negotiation, error handling, and interceptors.

How do I install ktor-patterns?

Run the command: npx killer-skills add ahmed3elshaer/everything-claude-code-mobile/ktor-patterns. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for ktor-patterns?

Key use cases include: Configuring HTTP clients for Kotlin-based projects, Implementing JSON serialization for data exchange, Setting up timeouts for reliable network operations.

Which IDEs are compatible with ktor-patterns?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for ktor-patterns?

Requires Kotlin programming language. Dependent on OkHttp library. Limited to HTTP client functionality.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add ahmed3elshaer/everything-claude-code-mobile/ktor-patterns. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use ktor-patterns immediately in the current project.

! Reference-Only Mode

This page remains useful for installation and reference, but Killer-Skills no longer treats it as a primary indexable landing page. Read the review above before relying on the upstream repository instructions.

Upstream Repository Material

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

Upstream Source

ktor-patterns

Install ktor-patterns, an AI agent skill for AI agent workflows and automation. Review the use cases, limitations, and setup path before rollout.

SKILL.md
Readonly
Upstream Repository Material
The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.
Supporting Evidence

Ktor Client Patterns

Modern HTTP client for Kotlin.

Client Setup

kotlin
1val httpClient = HttpClient(OkHttp) { 2 // JSON serialization 3 install(ContentNegotiation) { 4 json(Json { 5 ignoreUnknownKeys = true 6 isLenient = true 7 prettyPrint = false 8 }) 9 } 10 11 // Timeouts 12 install(HttpTimeout) { 13 requestTimeoutMillis = 30_000 14 connectTimeoutMillis = 10_000 15 socketTimeoutMillis = 30_000 16 } 17 18 // Logging (debug only) 19 install(Logging) { 20 logger = Logger.ANDROID 21 level = if (BuildConfig.DEBUG) LogLevel.BODY else LogLevel.NONE 22 } 23 24 // Default request config 25 defaultRequest { 26 url("https://api.example.com") 27 contentType(ContentType.Application.Json) 28 } 29 30 // Auth 31 install(Auth) { 32 bearer { 33 loadTokens { 34 BearerTokens(tokenStorage.accessToken, tokenStorage.refreshToken) 35 } 36 refreshTokens { 37 val response = client.post("auth/refresh") { 38 setBody(RefreshRequest(tokenStorage.refreshToken)) 39 } 40 tokenStorage.save(response.body()) 41 BearerTokens(response.body<TokenResponse>().accessToken, response.body<TokenResponse>().refreshToken) 42 } 43 } 44 } 45}

API Definition

kotlin
1class UserApi(private val client: HttpClient) { 2 3 suspend fun getUsers(): List<UserDto> { 4 return client.get("users").body() 5 } 6 7 suspend fun getUser(id: String): UserDto { 8 return client.get("users/$id").body() 9 } 10 11 suspend fun createUser(request: CreateUserRequest): UserDto { 12 return client.post("users") { 13 setBody(request) 14 }.body() 15 } 16 17 suspend fun updateUser(id: String, request: UpdateUserRequest): UserDto { 18 return client.put("users/$id") { 19 setBody(request) 20 }.body() 21 } 22 23 suspend fun deleteUser(id: String) { 24 client.delete("users/$id") 25 } 26}

Error Handling

kotlin
1class ApiException( 2 val statusCode: Int, 3 override val message: String 4) : Exception(message) 5 6suspend inline fun <reified T> HttpClient.safeRequest( 7 block: HttpRequestBuilder.() -> Unit 8): Result<T> = runCatching { 9 val response = request(block) 10 11 if (response.status.isSuccess()) { 12 response.body<T>() 13 } else { 14 throw ApiException( 15 statusCode = response.status.value, 16 message = response.bodyAsText() 17 ) 18 } 19} 20 21// Usage 22class UserRepository(private val api: UserApi, private val client: HttpClient) { 23 suspend fun getUser(id: String): Result<User> { 24 return client.safeRequest<UserDto> { 25 url("users/$id") 26 method = HttpMethod.Get 27 }.map { it.toDomain() } 28 } 29}

DTOs and Mapping

kotlin
1@Serializable 2data class UserDto( 3 val id: String, 4 val email: String, 5 @SerialName("first_name") 6 val firstName: String, 7 @SerialName("created_at") 8 val createdAt: String 9) 10 11fun UserDto.toDomain(): User = User( 12 id = id, 13 email = email, 14 name = firstName, 15 createdAt = Instant.parse(createdAt) 16)

Interceptors

kotlin
1val client = HttpClient(OkHttp) { 2 // Request interceptor 3 install(HttpSend) { 4 intercept { request -> 5 request.headers.append("X-Client-Version", BuildConfig.VERSION_NAME) 6 execute(request) 7 } 8 } 9}

Certificate Pinning

kotlin
1val client = HttpClient(OkHttp) { 2 engine { 3 config { 4 certificatePinner( 5 CertificatePinner.Builder() 6 .add("api.example.com", "sha256/AAAA...") 7 .add("api.example.com", "sha256/BBBB...") // Backup pin 8 .build() 9 ) 10 } 11 } 12}

Remember: Ktor is coroutine-first. Embrace suspend functions, handle errors properly.

Related Skills

Looking for an alternative to ktor-patterns or another community skill for your workflow? Explore these related open-source skills.

View All

openclaw-release-maintainer

Logo of openclaw
openclaw

openclaw-release-maintainer is an AI agent skill for openclaw release maintainer.

333.8k
0
AI

widget-generator

Logo of f
f

Generate customizable widget plugins for the prompts.chat feed system

149.6k
0
AI

flags

Logo of vercel
vercel

flags is an AI agent skill for use this skill when adding or changing framework feature flags in next.js internals.

138.4k
0
Browser

pr-review

Logo of pytorch
pytorch

pr-review is an AI agent skill for pytorch pr review skill.

98.6k
0
Developer