AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Kotlin Docs

skill-pledgeandgrow-pledge-skills-kotlin · by pledgeandgrow

|

No reviews yet
0 installs
38 views
0.0% view→install

Install

$ agentstack add skill-pledgeandgrow-pledge-skills-kotlin

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-pledgeandgrow-pledge-skills-kotlin)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Kotlin Docs? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Kotlin Expert (v2.4.0)

Official Documentation: https://kotlinlang.org/docs/home.html

Quick Reference

| Topic | File | |-------|------| | Variables, basic types, strings, control flow, ranges, when | basics-syntax.md | | Functions, named args, defaults, lambdas, function types, inline | functions-lambdas.md | | Classes, constructors, properties, inheritance, interfaces, data/sealed/enum classes, objects | classes-objects.md | | List, Set, Map, sequences, collection operations, functional API | collections.md | | Nullable types, safe calls, Elvis, smart casts, not-null assertion | null-safety.md | | Suspending functions, launch, async, Flow, StateFlow, channels, dispatchers | coroutines.md | | Variance, reified type parameters, star projections, type bounds | generics.md | | DSLs, type-safe builders, scope functions, extension functions, delegation | dsl-builders.md | | Kotlin Multiplatform (KMP), expect/actual, platform-specific code, sharing logic | multiplatform.md | | @Serializable, JSON, ProtoBuf, polymorphism, custom serializers | serialization.md | | Java interop, migration guides, Kotlin/Java differences, JSpecify | java-interop.md | | JUnit 5, assertions, parameterized tests, coroutine testing, mocking | testing.md | | Gradle, Kotlin Gradle Plugin, Maven, compiler options, KSP | build-tools.md | | Idiomatic Kotlin patterns, coding conventions, best practices | idioms-best-practices.md | | Kotlin 2.4.0 features, language changes, stdlib additions, migration | whats-new.md | | Reflection, KClass, callable references, property/constructor references | reflection.md | | Exceptions, try-catch-finally, precondition functions, Nothing type, custom exceptions | exceptions.md | | Annotations, use-site targets, @Target, @Retention, @Repeatable, Java annotations | annotations.md | | Type checks (is/!is), smart casts, as/as?, structural vs referential equality, floating-point | type-casts-equality.md |

Core Philosophy

Kotlin is a modern, concise, multiplatform programming language that is fully interoperable with Java. Key principles:

  1. Conciseness — reduce boilerplate with data classes, type inference, smart casts
  2. Safety — null safety at compile time, no NPEs by default, immutable by default (val)
  3. Interoperability — seamless Java interop, usable on JVM, JS, Native, Wasm
  4. Tooling — first-class IDE support (IntelliJ IDEA), excellent compiler diagnostics
  5. Multiplatform — share business logic across iOS, Android, web, backend, desktop
  6. Coroutines — structured concurrency with lightweight threads (suspending functions)
  7. DSL-friendly — extension functions, infix, lambda receivers enable type-safe DSLs

Hello World

fun main() {
    println("Hello, World!")
}

// With command-line args
fun main(args: Array) {
    println("Args: ${args.joinToString()}")
}

Variables

val readOnly = "immutable"   // val — read-only, assigned once
var mutable = "changeable"   // var — mutable, can be reassigned

// Type inference — type is automatically detected
val count = 42               // Int
val pi = 3.14                // Double
val name = "Kotlin"          // String

// Explicit type
val score: Int = 100
val temp: Float = 24.5f

Basic Types Quick Reference

| Category | Types | Example | |----------|-------|---------| | Integers | Byte, Short, Int, Long | val year: Int = 2025 | | Unsigned | UByte, UShort, UInt, ULong | val score: UInt = 100u | | Float | Float, Double | val price: Double = 19.99 | | Boolean | Boolean | val ok: Boolean = true | | Character | Char | val sep: Char = ',' | | String | String | val msg: String = "Hi" | | Array | Array | val arr = arrayOf(1, 2, 3) |

Operators

| Operator | Description | |----------|-------------| | + - * / % | Arithmetic | | += -= *= /= %= | Augmented assignment | | ++ -- | Increment / decrement | | && \|\| ! | Boolean AND, OR, NOT | | == != === !== | Equality (structural), identity (referential) | | ` = | Comparison | | .. .. b) a else b

// when — replaces switch val desc = when (x) { 0 -> "zero" 1, 2, 3 -> "small" in 4..10 -> "medium" else -> "large" }

// for loop with range for (i in 1..5) print(i) // 12345 for (i in 1.. String = { s -> s.uppercase() } // or with implicit 'it' val upper2: (String) -> String = { it.uppercase() }

// Trailing lambda list.filter { it > 0 }


## Classes Quick Reference

```kotlin
// Basic class with primary constructor
class Person(val name: String, var age: Int)

// Data class — auto-generates equals, hashCode, toString, copy, componentN
data class User(val id: Long, val name: String, val email: String)

// Enum class
enum class Color { RED, GREEN, BLUE }

// Sealed class — restricted hierarchy
sealed class Result {
    data class Success(val data: String) : Result()
    data class Error(val message: String) : Result()
}

// Object declaration — singleton
object Database {
    fun connect() { /* ... */ }
}

// Companion object — static-like members
class Factory {
    companion object {
        fun create() = Factory()
    }
}

Coroutines Quick Reference

import kotlinx.coroutines.*

// Launch a coroutine
suspend fun fetchData(): String {
    delay(1000)
    return "Data"
}

// runBlocking — bridge blocking to suspend
fun main() = runBlocking {
    val result = fetchData()
    println(result)
}

// launch — fire and forget
GlobalScope.launch {
    repeat(5) { i ->
        delay(500)
        println("Tick $i")
    }
}

// async — returns a value
val deferred = CoroutineScope(Dispatchers.IO).async {
    fetchData()
}
val data = deferred.await()

Installation & Setup

# Install via SDKMAN! (Linux/macOS)
sdk install kotlin

# Install via Homebrew (macOS)
brew install kotlin

# Windows: download from https://kotlinlang.org/docs/command-line.html
# Or use winget:
winget install JetBrains.Kotlin

# Verify
kotlinc -version

Build & Run

# Compile and run a script
kotlinc main.kt -include-runtime -d main.jar
java -jar main.jar

# Kotlin script (.kts)
kotlinc -script script.kts

# With Gradle (Kotlin DSL)
gradle build
gradle run

# With Maven
mvn compile
mvn exec:java -Dexec.mainClass="MainKt"

Project Creation

# Gradle project (Kotlin DSL)
gradle init --type kotlin-application

# Maven project
mvn archetype:generate -DarchetypeArtifactId=kotlin-archetype-jvm

# IntelliJ IDEA: New Project > Kotlin

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.