Agent skill

Kotlin Tooling Standards

Build tools (Gradle KTS), Static Analysis (Detekt), and Testing standards.

Stars 163
Forks 31

Install this agent skill to your Project

npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/tooling-hoangnguyen0403-agent-skills-standar-6

Metadata

Additional technical details for this skill

labels
kotlin tooling gradle detekt ktlint testing
triggers
{
    "files": [
        "build.gradle.kts",
        "libs.versions.toml",
        "detekt.yml"
    ],
    "keywords": [
        "gradle",
        "kts",
        "detekt",
        "mockk",
        "junit"
    ]
}

SKILL.md

Kotlin Tooling Standards

Priority: P2 (RECOMMENDED)

Consistent build and quality verification tools.

Implementation Guidelines

  • Gradle DSL: Use Kotlin DSL (build.gradle.kts) exclusively. It provides type safety and better IDE support.
  • Version Management: Use Version Catalogs (libs.versions.toml).
  • Linter: Use Ktlint for formatting and Detekt for complexity/code-smell analysis.
  • Testing: Use MockK for mocking (first-class Kotlin support). Use JUnit 5.
  • Assertions: Use Truth or Kotest Assertions for fluent reading.

Anti-Patterns

  • Groovy Gradle: Avoid legacy build.gradle files.
  • Mockito (Java): Avoid Mockito if possible; when/then syntax conflicts with Kotlin when. Use MockK (every/verify).
  • Hardcoded Versions: Don't put versions in build files. Use the catalog.

Code

For full MockK testing templates and libs.versions.toml setup: references/testing-tooling.md

kotlin
// Modern Gradle KTS + Version Catalog
dependencies {
    implementation(libs.kotlin.stdlib)
    testImplementation(libs.mockk)
}

// Concise MockK Verify
verify(exactly = 1) { repo.getUser("1") }

Related Topics

best-practices | testing

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results