kotlin-patterns
Idiomatic Kotlin patterns, best practices, and conventions for building robust, efficient, and maintainable Kotlin applications with coroutines, null safety…
Skill by ViewWay
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/viewway-kotlin-patterns
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/kotlin-patterns
What's inside
- Skill name
kotlin-patterns- Description
- Idiomatic Kotlin patterns, best practices, and conventions for building robust, efficient, and maintainable Kotlin applications with coroutines, null safety, and DSL builders.
- License
- MIT
- Instructions
- 707 lines in SKILL.md · view on GitHub
Agent Skills spec issues
- body: 707 lines (spec recommends under 500)
Files (1)
- SKILL.md
SKILL.md (first lines)
# Kotlin Development Patterns
Idiomatic Kotlin patterns and best practices for building robust, efficient, and maintainable applications.
## When to Use
- Writing new Kotlin code
- Reviewing Kotlin code
- Refactoring existing Kotlin code
- Designing Kotlin modules or libraries
- Configuring Gradle Kotlin DSL builds
## How It Works
This skill enforces idiomatic Kotlin conventions across seven key areas: null safety using the type system and safe-call operators, immutability via `val` and `copy()` on data classes, sealed classes and interfaces for exhaustive type hierarchies, structured concurrency with coroutines and `Flow`, extension functions for adding behaviour without inheritance, type-safe DSL builders using `@DslMarker` and lambda receivers, and Gradle Kotlin DSL for build configuration.
## Examples
**Null safety with Elvis operator:**
```kotlin
fun getUserEmail(userId: String): String {
val user = userRepository.findById(userId)
return user?.email ?: "unknown@example.com"
}
```
**Sealed class for exhaustive results:**
```kotlin
sealed class Result<out T> {
data class Success<T>(val data: T) : Result<T>()
data class Failure(val error: AppError) : Result<Nothing>()
data object Loading : Result<Nothing>()
}
```
**Structured concurrency with async/await:**
```kotlin
suspend fun fetchUserWithPosts(userId: String): UserProfile =
coroutineScope {
val user = async { userService.getUser(userId) }
val posts = async { postService.getUserPosts(userId) }
UserProfile(user = user.await(), posts = posts.await())
}
```
## Core Principles
### 1. Null Safety
Kotlin's type system distinguishes nullable and non-nullable types. Leverage it fully.
```kotlin
// Good: Use non-nullable types by default
fun getUser(id: String): User {
return userRepository.findById(id)
?: throw UserNotFoundException("User $id not found")
}
// Good: Safe calls and Elvis operator
fun getUserEmail(userId: String): String {
val user = userRepository.findById(userId)
return user?.email ?: "unknown@example.com"
}
// Bad: Force-unwrapping nullable types
fun getUserEmail(userId: String): String {
val user = userRepository.findById(userId)
return user!!.email // Throws NPE if null
}
```
### 2. Immutability by Default
Prefer `val` over `var`, immutable collections over mutable ones.
```kotlin
// Good: Immutable data
data class User(
val id: String,
val name: String,
val email: String,
)
// Good: Transform with copy()
fun updateEmail(user: User, newEmail: String): User =
user.copy(email = newEmail)
// Good: Immutable collections
val users: List<User> = listOf(user1, user2)
val filtered = users.filter { it.email.isNotBlank() }
// Bad: Mutable state
var currentUser: User? = null // Avoid mutable global state
val mutableUsers = mutableListOf<User>() // Avoid unless truly needed
```
### 3. Expression Bodies and Single-Expression Functions
Use expression bodies for concise, readable functions.
```kotlin
// Good: Expression body
fun isAdult(age: Int): Boolean = age >= 18
fun formatFullName(first: String, last: String): String =
"$first $last".trim()
fun User.displayName(): String =
name.ifBlank { email.substringBefore('@') }
// Good: When as expression
fun statusMessage(code: Int): String = when (code) {
200 -> "OK"
404 -> "Not Found"
500 -> "Internal Server Error"
else -> "Unknown status: $code"
}
// Bad: Unnecessary block bodyFrom ViewWay/hermes-by-everythings, MIT.
More from ViewWay/hermes-by-everythings
- 0.519score
frontend-design-ultimate
ViewWay
Create distinctive, production-grade static sites with React, Tailwind CSS, and shadcn/ui — no mockups needed.
SkillCFreshness: C★ 3Claude Code +9 - 0.511score
hermes-by-everythings
ViewWay
多平台多语言编码增强套件。整合 ECC + Ralph 最佳能力。 22 Command + 39 Agent + 自动化 Hooks + 学习系统。 支持 TypeScript/Python/Rust/Go/Java/Kotlin 等10种语言。
SkillCFreshness: C★ 3Claude Code +9 - 0.511score
deployment-patterns
ViewWay
Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies, and production readiness checklists for web…
SkillCFreshness: C★ 3Claude Code +9 - 0.511score
laravel-security
ViewWay
Laravel security best practices for authn/authz, validation, CSRF, mass assignment, file uploads, secrets, rate limiting, and secure deployment.
SkillCFreshness: C★ 3Claude Code +9 - 0.511score
docker-patterns
ViewWay
Docker and Docker Compose patterns for local development, container security, networking, volume strategies, and multi-service orchestration.
SkillCFreshness: C★ 3Claude Code +9 - 0.511score
laravel-patterns
ViewWay
Laravel architecture patterns, routing/controllers, Eloquent ORM, service layers, queues, events, caching, and API resources for production apps.
SkillCFreshness: C★ 3Claude Code +9 - 0.508score
code-review
ViewWay
Systematic code review patterns covering security, performance, maintainability, correctness, and testing
SkillCFreshness: C★ 3Claude Code +9 - 0.505score
data-scraper-agent
ViewWay
Build a fully automated AI-powered data collection agent for any public source — job boards, prices, news, GitHub, sports, anything.
SkillCFreshness: C★ 3Claude Code +9 - 0.503score
Diagram
ViewWay
Generate diagrams from descriptions with Mermaid, PlantUML, or ASCII for architecture, flows, sequences, and data models.
SkillCFreshness: C★ 3Claude Code +9 - 0.485score
frontend-slides
ViewWay
Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files.
SkillCFreshness: C★ 3Claude Code +9 - 0.277score
diagram-generator
ViewWay
No description from the publisher yet.
SkillCFreshness: C★ 3Claude Code +9
Signals
- Stars
- 3
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- May 2, 2026 (6 months ago)
- Last release
- May 2, 2026 (6 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/ViewWay/hermes-by-everythings
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from ViewWay
- 0.519score
frontend-design-ultimate
ViewWay
Create distinctive, production-grade static sites with React, Tailwind CSS, and shadcn/ui — no mockups needed.
SkillCFreshness: C★ 3Claude Code +9 - 0.511score
hermes-by-everythings
ViewWay
多平台多语言编码增强套件。整合 ECC + Ralph 最佳能力。 22 Command + 39 Agent + 自动化 Hooks + 学习系统。 支持 TypeScript/Python/Rust/Go/Java/Kotlin 等10种语言。
SkillCFreshness: C★ 3Claude Code +9 - 0.511score
deployment-patterns
ViewWay
Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies, and production readiness checklists for web…
SkillCFreshness: C★ 3Claude Code +9 - 0.511score
docker-patterns
ViewWay
Docker and Docker Compose patterns for local development, container security, networking, volume strategies, and multi-service orchestration.
SkillCFreshness: C★ 3Claude Code +9 - 0.511score
laravel-patterns
ViewWay
Laravel architecture patterns, routing/controllers, Eloquent ORM, service layers, queues, events, caching, and API resources for production apps.
SkillCFreshness: C★ 3Claude Code +9 - 0.511score
laravel-security
ViewWay
Laravel security best practices for authn/authz, validation, CSRF, mass assignment, file uploads, secrets, rate limiting, and secure deployment.
SkillCFreshness: C★ 3Claude Code +9
Cite this page
kotlin-patterns skill. Agent Mart. https://agentmart.dev/skills/viewway-kotlin-patterns (last updated 2026-10-24)