Back to list
pluginagentmarketplace

kotlin-dsl

by pluginagentmarketplace

Kotlin Development Plugin

2🍴 1📅 Jan 20, 2026

SKILL.md


name: kotlin-dsl description: Kotlin DSL - type-safe builders, Gradle DSL, @DslMarker version: "1.0.0" sasmp_version: "1.3.0" bonded_agent: 07-kotlin-dsl bond_type: PRIMARY_BOND

execution: timeout_ms: 30000 retry: max_attempts: 3 backoff: exponential initial_delay_ms: 1000

parameters: required: - name: type type: string validation: "^(gradle|custom|html|config)$" optional: - name: immutable type: boolean default: true

logging: level: info events: [skill_invoked, type_loaded, error_occurred]

Kotlin DSL Skill

Build type-safe DSLs with Kotlin's language features.

Topics Covered

@DslMarker for Scope Control

@DslMarker
annotation class HtmlDsl

@HtmlDsl
class HTML { fun body(block: Body.() -> Unit) { } }

@HtmlDsl
class Body { fun p(text: String) { } }

// Usage - scoped correctly
html { body { p("Text") } }

Gradle Convention Plugin

// kotlin-library.gradle.kts
plugins { kotlin("jvm"); `java-library` }

kotlin { jvmToolchain(17) }

dependencies {
    testImplementation(kotlin("test"))
    testImplementation("io.mockk:mockk:1.13.9")
}

tasks.test { useJUnitPlatform() }

Type-Safe Config Builder

@ConfigDsl
class ServerConfig private constructor(val host: String, val port: Int) {
    class Builder {
        var host = "localhost"
        var port = 8080
        fun build() = ServerConfig(host, port)
    }
}

fun serverConfig(block: ServerConfig.Builder.() -> Unit) =
    ServerConfig.Builder().apply(block).build()

// Usage
val config = serverConfig { host = "api.example.com"; port = 443 }

Troubleshooting

IssueResolution
Scope pollutionAdd @DslMarker annotation
Gradle cache staleRun ./gradlew --stop

Usage

Skill("kotlin-dsl")

Score

Total Score

60/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon