Sign in
Explore
Prompts · PromptTesting & SecurityUnit tests & TDDReviewed

kotlin-test

Enforce TDD workflow for Kotlin. Write Kotest tests first, then implement. Verify 80%+ coverage with Kover.

Kind
Prompt
Works with
Claude Code, Codex
Languages
Java / Kotlin
Source
affaan-m/ECC @ d3b8a3e90890
Path
commands/kotlin-test.md
Jobs
Testing, Implementation, Guardrails
Topics
Unit tests & TDD

Credit

Made by
affaan-m
Original
github.com/affaan-m/ECC/blob/d3b8a3e908904e242ed2dbe66af62cca…
License
MIT

Listed by Skill Manifest; not made by us.

InstallCopy it from the source repository, or sign in and let the assistant adapt it for your project.
Install factsScanned 3 Nov 2026
Adds
  • .claude/commands/kotlin-test.md (run as /kotlin-test)
Runs scripts
Yes
  • shell block in the text
Uses the network
None found
Needs secrets
None found
Reads environment variables
  • MIN_PASSWORD_LENGTH
Calls other skills
  • /kotlin-build
  • /kotlin-review
Source revision
d3b8a3e90890
Licence
MIT
Last activity
23 Nov 2026
Source changed after the scan
Yes
  • Last push 23 Nov 2026, scanned 3 Nov 2026; read it again before you rely on this scan
Review
Reviewed

Found by a static scan of the stored text; nothing is run. “None found” is not a guarantee, so read what you install before you run it.

# Kotlin TDD Command

This command enforces test-driven development methodology for Kotlin code using Kotest, MockK, and Kover.

## What This Command Does

1. **Define Types/Interfaces**: Scaffold function signatures first
2. **Write Kotest Tests**: Create comprehensive test specs (RED)
3. **Run Tests**: Verify tests fail for the right reason
4. **Implement Code**: Write minimal code to pass (GREEN)
5. **Refactor**: Improve while keeping tests green
6. **Check Coverage**: Ensure 80%+ coverage with Kover

## When to Use

Use `/kotlin-test` when:
- Implementing new Kotlin functions or classes
- Adding test coverage to existing Kotlin code
- Fixing bugs (write failing test first)
- Building critical business logic
- Learning TDD workflow in Kotlin

## TDD Cycle

```
RED     -> Write failing Kotest test
GREEN   -> Implement minimal code to pass
REFACTOR -> Improve code, tests stay green
REPEAT  -> Next test case
```

## Example Session

````text
User: /kotlin-test I need a function to validate user registration requests

Agent:
# TDD Session: Registration Validator

## Step 1: Define Interface

```kotlin
// validator/RegistrationValidator.kt
package com.example.validator
…