kotlin-testing

Kotest, MockK, coroutine testi, property-based testing ve Kover coverage ile Kotlin test kalıpları. İdiomatic Kotlin uygulamalarıyla TDD metodolojisini takip eder.

144,923 stars
Complexity: easy

About this skill

This skill serves as a comprehensive guide for AI agents to craft reliable and maintainable Kotlin tests. It provides detailed patterns for implementing Test-Driven Development (TDD) methodologies with idiomatic Kotlin practices. The skill covers various modern Kotlin testing tools and techniques, including Kotest for flexible test specifications, MockK for mocking and stubbing dependencies, robust testing of coroutines, and property-based testing for exhaustive scenario validation. Additionally, it guides the AI on integrating and configuring Kover for comprehensive code coverage analysis, ensuring the generated tests meet industry standards for quality and robustness. Originating from the 'everything-claude-code' repository, this skill is specifically designed to enhance Claude AI's capabilities in delivering production-ready software development solutions.

Best use case

To enable an AI agent to write comprehensive, high-quality, and maintainable unit, integration, and property-based tests for Kotlin applications, adhering to TDD principles and utilizing modern testing frameworks and tools.

Kotest, MockK, coroutine testi, property-based testing ve Kover coverage ile Kotlin test kalıpları. İdiomatic Kotlin uygulamalarıyla TDD metodolojisini takip eder.

The AI agent will produce well-structured, idiomatic Kotlin test code using Kotest and MockK, demonstrating a clear understanding of TDD. The generated tests will cover various aspects, including coroutine execution and property-based validations, leading to highly reliable and maintainable Kotlin applications. The output may also include guidance on Kover configuration for code coverage reporting.

Practical example

Example input

Given this Kotlin `UserService` interface and its `UserServiceImpl` implementation, please generate a comprehensive suite of unit and integration tests. Follow TDD principles, use Kotest for testing specifications, and MockK for mocking dependencies. Ensure coroutine-based functions are properly tested and include at least one property-based test for user ID validation. Also, suggest how Kover can be integrated to measure test coverage.

Example output

// Example output showcasing Kotest, MockK, coroutine testing, and property-based testing
// UserService.kt
interface UserService {
    suspend fun createUser(name: String, email: String): User
    suspend fun getUserById(id: String): User?
    suspend fun updateUserEmail(id: String, newEmail: String): User
}

// UserServiceImpl.kt (simplified for example)
class UserServiceImpl(private val userRepository: UserRepository) : UserService {
    override suspend fun createUser(name: String, email: String): User {
        // ... logic ...
        return userRepository.save(User(java.util.UUID.randomUUID().toString(), name, email))
    }
    override suspend fun getUserById(id: String): User? = userRepository.findById(id)
    override suspend fun updateUserEmail(id: String, newEmail: String): User {
        val user = userRepository.findById(id) ?: throw IllegalArgumentException("User not found")
        val updatedUser = user.copy(email = newEmail)
        return userRepository.save(updatedUser)
    }
}

// UserRepository.kt (simplified for example)
interface UserRepository {
    suspend fun save(user: User): User
    suspend fun findById(id: String): User?
}

// User.kt
data class User(val id: String, val name: String, val email: String)

// --------------------------------------------------------------------------------

// Generated Tests (abbreviated for brevity)
package com.example.service

import io.kotest.core.spec.style.FunSpec
import io.kotest.matchers.shouldBe
import io.kotest.matchers.shouldNotBe
import io.kotest.matchers.nulls.shouldBeNull
import io.kotest.matchers.types.shouldBeInstanceOf
import io.kotest.property.forAll
import io.mockk.coEvery
import io.mockk.coVerify
import io.mockk.mockk
import kotlinx.coroutines.test.runTest
import java.util.UUID

class UserServiceImplTest : FunSpec({

    val userRepository = mockk<UserRepository>()
    val userService = UserServiceImpl(userRepository)

    beforeEach {
        // Reset mocks before each test if necessary
        io.mockk.clearMocks(userRepository)
    }

    context("createUser") {
        test("should create and return a new user") {
            runTest {
                val newUser = User(UUID.randomUUID().toString(), "Alice", "alice@example.com")
                coEvery { userRepository.save(any()) } returns newUser

                val createdUser = userService.createUser("Alice", "alice@example.com")

                createdUser shouldNotBe null
                createdUser.name shouldBe "Alice"
                createdUser.email shouldBe "alice@example.com"
                coVerify(exactly = 1) { userRepository.save(any()) }
            }
        }
    }

    context("getUserById") {
        test("should return user if found") {
            runTest {
                val existingUser = User("1", "Bob", "bob@example.com")
                coEvery { userRepository.findById("1") } returns existingUser

                val foundUser = userService.getUserById("1")

                foundUser shouldBe existingUser
                coVerify(exactly = 1) { userRepository.findById("1") }
            }
        }

        test("should return null if user not found") {
            runTest {
                coEvery { userRepository.findById(any()) } returns null

                val foundUser = userService.getUserById("non_existent")

                foundUser.shouldBeNull()
                coVerify(exactly = 1) { userRepository.findById("non_existent") }
            }
        }
    }

    context("updateUserEmail") {
        test("should update user email if user exists") {
            runTest {
                val originalUser = User("2", "Charlie", "charlie@example.com")
                val updatedUser = originalUser.copy(email = "charlie.new@example.com")

                coEvery { userRepository.findById("2") } returns originalUser
                coEvery { userRepository.save(any()) } returns updatedUser

                val result = userService.updateUserEmail("2", "charlie.new@example.com")

                result.email shouldBe "charlie.new@example.com"
                coVerify(exactly = 1) { userRepository.findById("2") }
                coVerify(exactly = 1) { userRepository.save(updatedUser) }
            }
        }

        test("should throw exception if user not found") {
            runTest {
                coEvery { userRepository.findById(any()) } returns null

                io.kotest.assertions.throwables.shouldThrow<IllegalArgumentException> {
                    userService.updateUserEmail("non_existent", "new@example.com")
                }.message shouldBe "User not found"

                coVerify(exactly = 1) { userRepository.findById("non_existent") }
                coVerify(exactly = 0) { userRepository.save(any()) }
            }
        }
    }

    // Property-based testing for User ID validation example
    context("User ID generation/validation properties") {
        test("Generated user IDs should always be valid UUIDs") {
            forAll<String, String> { name, email ->
                // Simulate user creation and ID generation
                val generatedId = UUID.randomUUID().toString() // In a real scenario, this would come from the service under test
                // Assuming our definition of a valid ID is a non-empty string that can be parsed as UUID (simplified)
                try {
                    UUID.fromString(generatedId)
                    true // If parsing succeeds, it's a valid UUID
                } catch (e: IllegalArgumentException) {
                    false
                }
            }
        }
        // More sophisticated property tests could be done for validation logic within the service itself
    }
})

// Kover configuration suggestion (in build.gradle.kts)
// plugins {
//     kotlin("jvm") version "1.9.0" // or your Kotlin version
//     id("org.jetbrains.kotlinx.kover") version "0.7.3" // or latest Kover version
// }
//
// koverReport {
//     filters {
//         excludes {
//             // Exclude generated classes, DTOs, etc. if needed
//             classes("*.data.*", "*.model.*")
//             packages("com.example.util")
//         }
//     }
//     // Further configuration for reporting formats (html, xml, etc.)
//     html {
//         onCheck.set(true) // Fail build if coverage is below threshold
//         // set up bounds here
//     }
// }

// To run coverage: ./gradlew koverReport

When to use this skill

  • When developing new Kotlin functions, classes, or modules and requiring accompanying tests.
  • To improve or extend test coverage for existing Kotlin codebase.
  • For implementing robust property-based tests to validate data structures or algorithms.
  • When applying Test-Driven Development (TDD) workflows within Kotlin projects.

When not to use this skill

  • For testing projects written in languages other than Kotlin.
  • When the primary goal is not to write tests, but rather to generate application code without testing.
  • If a different, specific testing framework or methodology (not covered here) is explicitly required by the user.
  • In scenarios where only quick, minimal, and informal tests are needed, and adherence to TDD or comprehensive patterns is not a priority.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/kotlin-testing/SKILL.md --create-dirs "https://raw.githubusercontent.com/affaan-m/everything-claude-code/main/docs/tr/skills/kotlin-testing/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/kotlin-testing/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How kotlin-testing Compares

Feature / Agentkotlin-testingStandard Approach
Platform SupportClaudeLimited / Varies
Context Awareness High Baseline
Installation ComplexityeasyN/A

Frequently Asked Questions

What does this skill do?

Kotest, MockK, coroutine testi, property-based testing ve Kover coverage ile Kotlin test kalıpları. İdiomatic Kotlin uygulamalarıyla TDD metodolojisini takip eder.

Which AI agents support this skill?

This skill is designed for Claude.

How difficult is it to install?

The installation complexity is rated as easy. You can find the installation instructions above.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Kotlin Test Kalıpları

Kotest ve MockK ile TDD metodolojisini takip ederek güvenilir, sürdürülebilir testler yazmak için kapsamlı Kotlin test kalıpları.

## Ne Zaman Kullanılır

- Yeni Kotlin fonksiyonları veya class'lar yazarken
- Mevcut Kotlin koduna test coverage eklerken
- Property-based testler uygularken
- Kotlin projelerinde TDD iş akışını takip ederken
- Kod coverage için Kover yapılandırırken

## Nasıl Çalışır

1. **Hedef kodu belirle** — Test edilecek fonksiyon, class veya modülü bul
2. **Kotest spec yaz** — Test scope'una uygun bir spec stili seç (StringSpec, FunSpec, BehaviorSpec)
3. **Bağımlılıkları mock'la** — Test edilen birimi izole etmek için MockK kullan
4. **Testleri çalıştır (RED)** — Testin beklenen hatayla başarısız olduğunu doğrula
5. **Kodu uygula (GREEN)** — Testi geçmek için minimal kod yaz
6. **Refactor** — Testleri yeşil tutarken implementasyonu iyileştir
7. **Coverage'ı kontrol et** — `./gradlew koverHtmlReport` çalıştır ve %80+ coverage'ı doğrula

## TDD İş Akışı for Kotlin

### RED-GREEN-REFACTOR Döngüsü

```
RED     -> Önce başarısız bir test yaz
GREEN   -> Testi geçmek için minimal kod yaz
REFACTOR -> Testleri yeşil tutarken kodu iyileştir
REPEAT  -> Sonraki gereksinimle devam et
```

### Kotlin'de Adım Adım TDD

```kotlin
// Adım 1: Interface/signature tanımla
// EmailValidator.kt
package com.example.validator

fun validateEmail(email: String): Result<String> {
    TODO("not implemented")
}

// Adım 2: Başarısız test yaz (RED)
// EmailValidatorTest.kt
package com.example.validator

import io.kotest.core.spec.style.StringSpec
import io.kotest.matchers.result.shouldBeFailure
import io.kotest.matchers.result.shouldBeSuccess

class EmailValidatorTest : StringSpec({
    "valid email returns success" {
        validateEmail("user@example.com").shouldBeSuccess("user@example.com")
    }

    "empty email returns failure" {
        validateEmail("").shouldBeFailure()
    }

    "email without @ returns failure" {
        validateEmail("userexample.com").shouldBeFailure()
    }
})

// Adım 3: Testleri çalıştır - FAIL doğrula
// $ ./gradlew test
// EmailValidatorTest > valid email returns success FAILED
//   kotlin.NotImplementedError: An operation is not implemented

// Adım 4: Minimal kodu uygula (GREEN)
fun validateEmail(email: String): Result<String> {
    if (email.isBlank()) return Result.failure(IllegalArgumentException("Email cannot be blank"))
    if ('@' !in email) return Result.failure(IllegalArgumentException("Email must contain @"))
    val regex = Regex("^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}$")
    if (!regex.matches(email)) return Result.failure(IllegalArgumentException("Invalid email format"))
    return Result.success(email)
}

// Adım 5: Testleri çalıştır - PASS doğrula
// $ ./gradlew test
// EmailValidatorTest > valid email returns success PASSED
// EmailValidatorTest > empty email returns failure PASSED
// EmailValidatorTest > email without @ returns failure PASSED

// Adım 6: Gerekirse refactor et, testlerin hala geçtiğini doğrula
```

## Kotest Spec Stilleri

### StringSpec (En Basit)

```kotlin
class CalculatorTest : StringSpec({
    "add two positive numbers" {
        Calculator.add(2, 3) shouldBe 5
    }

    "add negative numbers" {
        Calculator.add(-1, -2) shouldBe -3
    }

    "add zero" {
        Calculator.add(0, 5) shouldBe 5
    }
})
```

### FunSpec (JUnit benzeri)

```kotlin
class UserServiceTest : FunSpec({
    val repository = mockk<UserRepository>()
    val service = UserService(repository)

    test("getUser returns user when found") {
        val expected = User(id = "1", name = "Alice")
        coEvery { repository.findById("1") } returns expected

        val result = service.getUser("1")

        result shouldBe expected
    }

    test("getUser throws when not found") {
        coEvery { repository.findById("999") } returns null

        shouldThrow<UserNotFoundException> {
            service.getUser("999")
        }
    }
})
```

### BehaviorSpec (BDD Stili)

```kotlin
class OrderServiceTest : BehaviorSpec({
    val repository = mockk<OrderRepository>()
    val paymentService = mockk<PaymentService>()
    val service = OrderService(repository, paymentService)

    Given("a valid order request") {
        val request = CreateOrderRequest(
            userId = "user-1",
            items = listOf(OrderItem("product-1", quantity = 2)),
        )

        When("the order is placed") {
            coEvery { paymentService.charge(any()) } returns PaymentResult.Success
            coEvery { repository.save(any()) } answers { firstArg() }

            val result = service.placeOrder(request)

            Then("it should return a confirmed order") {
                result.status shouldBe OrderStatus.CONFIRMED
            }

            Then("it should charge payment") {
                coVerify(exactly = 1) { paymentService.charge(any()) }
            }
        }

        When("payment fails") {
            coEvery { paymentService.charge(any()) } returns PaymentResult.Declined

            Then("it should throw PaymentException") {
                shouldThrow<PaymentException> {
                    service.placeOrder(request)
                }
            }
        }
    }
})
```

## Kotest Matcher'lar

### Temel Matcher'lar

```kotlin
import io.kotest.matchers.shouldBe
import io.kotest.matchers.shouldNotBe
import io.kotest.matchers.string.*
import io.kotest.matchers.collections.*
import io.kotest.matchers.nulls.*

// Eşitlik
result shouldBe expected
result shouldNotBe unexpected

// String'ler
name shouldStartWith "Al"
name shouldEndWith "ice"
name shouldContain "lic"
name shouldMatch Regex("[A-Z][a-z]+")
name.shouldBeBlank()

// Koleksiyonlar
list shouldContain "item"
list shouldHaveSize 3
list.shouldBeSorted()
list.shouldContainAll("a", "b", "c")
list.shouldBeEmpty()

// Null'lar
result.shouldNotBeNull()
result.shouldBeNull()

// Tipler
result.shouldBeInstanceOf<User>()

// Sayılar
count shouldBeGreaterThan 0
price shouldBeInRange 1.0..100.0

// Exception'lar
shouldThrow<IllegalArgumentException> {
    validateAge(-1)
}.message shouldBe "Age must be positive"

shouldNotThrow<Exception> {
    validateAge(25)
}
```

## MockK

### Temel Mocking

```kotlin
class UserServiceTest : FunSpec({
    val repository = mockk<UserRepository>()
    val logger = mockk<Logger>(relaxed = true) // Relaxed: varsayılanları döndürür
    val service = UserService(repository, logger)

    beforeTest {
        clearMocks(repository, logger)
    }

    test("findUser delegates to repository") {
        val expected = User(id = "1", name = "Alice")
        every { repository.findById("1") } returns expected

        val result = service.findUser("1")

        result shouldBe expected
        verify(exactly = 1) { repository.findById("1") }
    }

    test("findUser returns null for unknown id") {
        every { repository.findById(any()) } returns null

        val result = service.findUser("unknown")

        result.shouldBeNull()
    }
})
```

### Coroutine Mocking

```kotlin
class AsyncUserServiceTest : FunSpec({
    val repository = mockk<UserRepository>()
    val service = UserService(repository)

    test("getUser suspending function") {
        coEvery { repository.findById("1") } returns User(id = "1", name = "Alice")

        val result = service.getUser("1")

        result.name shouldBe "Alice"
        coVerify { repository.findById("1") }
    }

    test("getUser with delay") {
        coEvery { repository.findById("1") } coAnswers {
            delay(100) // Async çalışmayı simüle et
            User(id = "1", name = "Alice")
        }

        val result = service.getUser("1")
        result.name shouldBe "Alice"
    }
})
```

## Coroutine Testi

### Suspend Fonksiyonlar İçin runTest

```kotlin
import kotlinx.coroutines.test.runTest

class CoroutineServiceTest : FunSpec({
    test("concurrent fetches complete together") {
        runTest {
            val service = DataService(testScope = this)

            val result = service.fetchAllData()

            result.users.shouldNotBeEmpty()
            result.products.shouldNotBeEmpty()
        }
    }

    test("timeout after delay") {
        runTest {
            val service = SlowService()

            shouldThrow<TimeoutCancellationException> {
                withTimeout(100) {
                    service.slowOperation() // > 100ms sürer
                }
            }
        }
    }
})
```

### Flow Testi

```kotlin
import io.kotest.matchers.collections.shouldContainInOrder
import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.flow.toList
import kotlinx.coroutines.launch
import kotlinx.coroutines.test.advanceTimeBy
import kotlinx.coroutines.test.runTest

class FlowServiceTest : FunSpec({
    test("observeUsers emits updates") {
        runTest {
            val service = UserFlowService()

            val emissions = service.observeUsers()
                .take(3)
                .toList()

            emissions shouldHaveSize 3
            emissions.last().shouldNotBeEmpty()
        }
    }

    test("searchUsers debounces input") {
        runTest {
            val service = SearchService()
            val queries = MutableSharedFlow<String>()

            val results = mutableListOf<List<User>>()
            val job = launch {
                service.searchUsers(queries).collect { results.add(it) }
            }

            queries.emit("a")
            queries.emit("ab")
            queries.emit("abc") // Sadece bu aramayı tetiklemeli
            advanceTimeBy(500)

            results shouldHaveSize 1
            job.cancel()
        }
    }
})
```

## Property-Based Testing

### Kotest Property Testing

```kotlin
import io.kotest.core.spec.style.FunSpec
import io.kotest.property.Arb
import io.kotest.property.arbitrary.*
import io.kotest.property.forAll
import io.kotest.property.checkAll

class PropertyTest : FunSpec({
    test("string reverse is involutory") {
        forAll<String> { s ->
            s.reversed().reversed() == s
        }
    }

    test("list sort is idempotent") {
        forAll(Arb.list(Arb.int())) { list ->
            list.sorted() == list.sorted().sorted()
        }
    }

    test("serialization roundtrip preserves data") {
        checkAll(Arb.bind(Arb.string(1..50), Arb.string(5..100)) { name, email ->
            User(name = name, email = "$email@test.com")
        }) { user ->
            val json = Json.encodeToString(user)
            val decoded = Json.decodeFromString<User>(json)
            decoded shouldBe user
        }
    }
})
```

## Kover Coverage

### Gradle Yapılandırması

```kotlin
// build.gradle.kts
plugins {
    id("org.jetbrains.kotlinx.kover") version "0.9.7"
}

kover {
    reports {
        total {
            html { onCheck = true }
            xml { onCheck = true }
        }
        filters {
            excludes {
                classes("*.generated.*", "*.config.*")
            }
        }
        verify {
            rule {
                minBound(80) // %80 coverage'ın altında build başarısız
            }
        }
    }
}
```

### Coverage Komutları

```bash
# Testleri coverage ile çalıştır
./gradlew koverHtmlReport

# Coverage eşiklerini doğrula
./gradlew koverVerify

# CI için XML raporu
./gradlew koverXmlReport

# HTML raporunu görüntüle (OS'nize göre komutu kullanın)
# macOS:   open build/reports/kover/html/index.html
# Linux:   xdg-open build/reports/kover/html/index.html
# Windows: start build/reports/kover/html/index.html
```

### Coverage Hedefleri

| Kod Tipi | Hedef |
|-----------|--------|
| Kritik business mantığı | %100 |
| Public API'ler | %90+ |
| Genel kod | %80+ |
| Generated / config kodu | Hariç tut |

## Ktor testApplication Testi

```kotlin
class ApiRoutesTest : FunSpec({
    test("GET /users returns list") {
        testApplication {
            application {
                configureRouting()
                configureSerialization()
            }

            val response = client.get("/users")

            response.status shouldBe HttpStatusCode.OK
            val users = response.body<List<UserResponse>>()
            users.shouldNotBeEmpty()
        }
    }

    test("POST /users creates user") {
        testApplication {
            application {
                configureRouting()
                configureSerialization()
            }

            val response = client.post("/users") {
                contentType(ContentType.Application.Json)
                setBody(CreateUserRequest("Alice", "alice@example.com"))
            }

            response.status shouldBe HttpStatusCode.Created
        }
    }
})
```

## Test Komutları

```bash
# Tüm testleri çalıştır
./gradlew test

# Belirli test class'ını çalıştır
./gradlew test --tests "com.example.UserServiceTest"

# Belirli testi çalıştır
./gradlew test --tests "com.example.UserServiceTest.getUser returns user when found"

# Verbose çıktı ile çalıştır
./gradlew test --info

# Coverage ile çalıştır
./gradlew koverHtmlReport

# Detekt çalıştır (statik analiz)
./gradlew detekt

# Ktlint çalıştır (formatlama kontrolü)
./gradlew ktlintCheck

# Sürekli test
./gradlew test --continuous
```

## En İyi Uygulamalar

**YAPILMASI GEREKENLER:**
- ÖNCE testleri yaz (TDD)
- Proje genelinde Kotest'in spec stillerini tutarlı kullan
- Suspend fonksiyonlar için MockK'nın `coEvery`/`coVerify`'ını kullan
- Coroutine testi için `runTest` kullan
- İmplementasyon değil davranışı test et
- Pure fonksiyonlar için property-based testing kullan
- Netlik için `data class` test fixture'ları kullan

**YAPILMAMASI GEREKENLER:**
- Test framework'lerini karıştırma (Kotest seç ve ona sadık kal)
- Data class'ları mock'lama (gerçek instance'lar kullan)
- Coroutine testlerinde `Thread.sleep()` kullanma (`advanceTimeBy` kullan)
- TDD'de RED fazını atlama
- Private fonksiyonları doğrudan test etme
- Kararsız testleri görmezden gelme

## CI/CD ile Entegrasyon

```yaml
# GitHub Actions örneği
test:
  runs-on: ubuntu-latest
  steps:
    - uses: actions/checkout@v4
    - uses: actions/setup-java@v4
      with:
        distribution: 'temurin'
        java-version: '21'

    - name: Run tests with coverage
      run: ./gradlew test koverXmlReport

    - name: Verify coverage
      run: ./gradlew koverVerify

    - name: Upload coverage
      uses: codecov/codecov-action@v5
      with:
        files: build/reports/kover/report.xml
        token: ${{ secrets.CODECOV_TOKEN }}
```

**Hatırla**: Testler dokümantasyondur. Kotlin kodunuzun nasıl kullanılması gerektiğini gösterirler. Testleri okunabilir yapmak için Kotest'in açıklayıcı matcher'larını ve bağımlılıkları temiz mock'lamak için MockK kullanın.

Related Skills

swift-protocol-di-testing

144923
from affaan-m/everything-claude-code

基于协议的依赖注入,用于可测试的Swift代码——使用聚焦协议和Swift Testing模拟文件系统、网络和外部API。

DevelopmentClaude

perl-testing

144923
from affaan-m/everything-claude-code

使用Test2::V0、Test::More、prove runner、模拟、Devel::Cover覆盖率和TDD方法的Perl测试模式。

DevelopmentClaude

kotlin-ktor-patterns

144923
from affaan-m/everything-claude-code

Ktor 服务器模式,包括路由 DSL、插件、身份验证、Koin DI、kotlinx.serialization、WebSockets 和 testApplication 测试。

DevelopmentClaude

kotlin-exposed-patterns

144923
from affaan-m/everything-claude-code

JetBrains Exposed ORM 模式,包括 DSL 查询、DAO 模式、事务、HikariCP 连接池、Flyway 迁移和仓库模式。

DevelopmentClaude

kotlin-coroutines-flows

144923
from affaan-m/everything-claude-code

Kotlin协程与Flow在Android和KMP中的模式——结构化并发、Flow操作符、StateFlow、错误处理和测试。

DevelopmentClaude

rust-testing

144923
from affaan-m/everything-claude-code

Rust testing patterns including unit tests, integration tests, async testing, property-based testing, mocking, and coverage. Follows TDD methodology.

DevelopmentClaude

cpp-testing

144923
from affaan-m/everything-claude-code

C++ テストの作成/更新/修正、GoogleTest/CTest の設定、失敗またはフレーキーなテストの診断、カバレッジ/サニタイザーの追加時にのみ使用します。

DevelopmentClaude

python-testing

144923
from affaan-m/everything-claude-code

Python testing best practices using pytest including fixtures, parametrization, mocking, coverage analysis, async testing, and test organization. Use when writing or improving Python tests.

DevelopmentClaude

golang-testing

144923
from affaan-m/everything-claude-code

Go testing best practices including table-driven tests, test helpers, benchmarking, race detection, coverage analysis, and integration testing patterns. Use when writing or improving Go tests.

DevelopmentClaude

workspace-surface-audit

144923
from affaan-m/everything-claude-code

Audit the active repo, MCP servers, plugins, connectors, env surfaces, and harness setup, then recommend the highest-value ECC-native skills, hooks, agents, and operator workflows. Use when the user wants help setting up Claude Code or understanding what capabilities are actually available in their environment.

DevelopmentClaude

safety-guard

144923
from affaan-m/everything-claude-code

Use this skill to prevent destructive operations when working on production systems or running agents autonomously.

DevelopmentClaude

repo-scan

144923
from affaan-m/everything-claude-code

Cross-stack source code asset audit — classifies every file, detects embedded third-party libraries, and delivers actionable four-level verdicts per module with interactive HTML reports.

DevelopmentClaude