Manusで任意のスキルを実行
ワンクリックで
ワンクリックで
ワンクリックでManusで任意のスキルを実行
始めるkotlin-dsl
Kotlin DSL - type-safe builders, Gradle DSL, @DslMarker
スター7
フォーク1
更新日2025年12月30日 12:44
ファイルエクスプローラー
6 ファイルSKILL.md
readonlyメニュー
Kotlin DSL - type-safe builders, Gradle DSL, @DslMarker
Modern Android development - Jetpack, Compose, Architecture Components
Jetpack Compose - composables, state, effects, theming
Kotlin coroutines - structured concurrency, Flows, exception handling
Dependency Injection - Hilt, Koin, scopes, testing
Kotlin Flow - StateFlow, SharedFlow, operators, testing
Ktor framework - routing, authentication, WebSockets
| 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"]} |
Build type-safe DSLs with Kotlin's language features.
@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") } }
// 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() }
@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 }
| Issue | Resolution |
|---|---|
| Scope pollution | Add @DslMarker annotation |
| Gradle cache stale | Run ./gradlew --stop |
Skill("kotlin-dsl")