Kotlin Architecture

Use when the user asks about Ktor, Kotlin backend architecture, Ktor plugins and routing, coroutine scopes in a server, StatusPages error handling or http4s/Spring WebFlux with Kotlin. Produces a Kotlin service layout with structured concurrency. Not for repository/DI/MockK recipes (use kotlin-backend-patterns).

45 stars 6 forksMobile Development

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add j4flmao/agent-skills --skill kotlin-architecture
Manual install
git clone --depth 1 https://github.com/j4flmao/agent-skills.git /tmp/agent-skills
mkdir -p ~/.claude/skills
cp -r /tmp/agent-skills/skills/backend/kotlin/architecture ~/.claude/skills/kotlin-architecture

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Kotlin Architecture

## Purpose
Define and enforce Kotlin backend architecture, framework selection, coroutine pipeline conventions, and project structure.

## Agent Protocol

### Trigger
User request includes: `kotlin backend`, `ktor`, `webflux`, `http4k`, `kotlin server`, `coroutines`, `kotlin project structure`.

### Input Context
- Framework (Ktor, Spring WebFlux, http4k)
- Runtime (JVM 17+, native via Kotlin/Native)
- Language (Kotlin 2.x, K2 compiler)
- Project type (REST API, GraphQL, WebSocket server)

### Output Artifact
A markdown document containing:
- Project structure
- Coroutine pipeline layout
- Routing conventions
- Error handling strategy
- Validation setup (kotlinx.serialization, Konform)
- DI pattern (Koin, Kodein, Spring)
- Testing setup (kotlin.test, MockK)

### Response Format
Produce the artifact directly. No preamble, no postamble, no explanations. No filler, no hedging, no transitions. Strip articles a/an/the where unambiguous. Compress output.

### Completion Criteria
- Project structure follows clean architecture with domain-driven packages
- Coroutine scope management prevents leaks
- Route handlers separated from business logic
- Central error handler for all exceptions
- Validation uses typed DSL or annotation-based approach

### Max Response Length
4096 tokens

## Workflow

### Step 1: Select Framework

| Framework | Style | DI | Coroutines | When |
|---|---|---|---|---|
Read the full skill on GitHub

Details

Skill name
kotlin-architecture
Path
skills/backend/kotlin/architecture/SKILL.md
License
MIT
Repo updated
17 November 2026

FAQ

What does the Kotlin Architecture skill do?

Use when the user asks about Ktor, Kotlin backend architecture, Ktor plugins and routing, coroutine scopes in a server, StatusPages error handling or http4s/Spring WebFlux with Kotlin. Produces a Kotlin service layout with structured concurrency. Not for repository/DI/MockK recipes (use kotlin-backend-patterns).

How do I install the Kotlin Architecture skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add j4flmao/agent-skills --skill kotlin-architecture. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Kotlin Architecture popular?

It lives in j4flmao/agent-skills, which has 45 GitHub stars and 6 forks.

Related skills

Agent Observability

45

j4flmao/agent-skills

Use when the user asks about agent observability, tracing agent reasoning, debugging an agent loop, OpenTelemetry GenAI spans for LLM calls, LLM cost tracking per agent, agent audit logs or hallucination/eval monitoring in production. Produces instrumentation config, trace schema, dashboards, alerts and cost attribution. Not for generic service tracing without LLMs (use devops-opentelemetry).

DevOps & Cloud

AI Agent Architectures

45

j4flmao/agent-skills

Use when the user asks to build an AI agent, design an agent that calls tools and keeps memory, write an agent system prompt or pick an agent framework (Claude Agent SDK, OpenAI Agents SDK, LangGraph). Produces an architecture brief covering loop, tools, memory, guardrails and evals, routing depth to child skills. Not for workflow patterns (use ai-agentic-workflows).

AI, LLMs & Agents

AI Agent Core Loop

45

j4flmao/agent-skills

Use when the user asks about the agent loop, ReAct vs plan-and-solve, re-planning, Reflexion, an agent stuck in a loop, max iterations or termination conditions. Produces a loop spec or patch with state, success predicate, caps and no-progress detection. Not for overall agent design (use ai-agent-architectures) or tool schemas (use tool-calling-principles).

AI, LLMs & Agents

Kotlin Backend Patterns

45

j4flmao/agent-skills

Use when the user asks about Koin DI, MockK tests, runTest coroutine testing, Kotlin repository and service layers, DTO mapping with extension functions or sealed error hierarchies. Produces Kotlin backend pattern code. Not for Ktor app structure (use kotlin-architecture) or Android (use android).

Mobile Development

Desktop Swiftui

45

j4flmao/agent-skills

Use when the user asks about SwiftUI on macOS, WindowGroup, MenuBarExtra, Settings scenes, Observation (@Observable), NavigationSplitView, AppKit bridging or multiplatform SwiftUI apps. Produces SwiftUI Mac app architecture. Not for AppKit-only apps (use desktop-appkit) or iOS apps (use ios).

Mobile Development

Vapor Backend

45

j4flmao/agent-skills

Use when the user asks about Vapor, server-side Swift, Fluent ORM and migrations, Vapor middleware, Vapor WebSocket or Vapor Queues. Produces async/await Vapor 4 services with tests. Not for iOS apps (use ios).

Mobile Development

Browse the most popular Claude skills, all mobile development skills, or write your own with the skills generator.