agent-instructions
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
Use when writing modern Java (17+) or Kotlin on the JVM. Covers records, sealed interfaces, pattern matching, coroutines, null safety, and JVM performance and memory tuning.
$ npx -y skills add nimadorostkar/Claude-Skills-collection --skill java-kotlin --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/java-kotlinContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when writing modern Java (17+) or Kotlin on the JVM. Covers records, sealed interfaces, pattern matching, coroutines, null safety, and JVM performance and memory tuning.
name: java-kotlin description: Use when writing modern Java (17+) or Kotlin on the JVM. Covers records, sealed interfaces, pattern matching, coroutines, null safety, and JVM performance and memory tuning. metadata: category: languages version: 1.0.0 tags: [java, kotlin, jvm, coroutines, records]
Write JVM code that uses the modern language surface — records, sealed types, pattern matching, coroutines — instead of the 2010-era idioms most JVM codebases are still carrying.
1. **Model** — Domain values as records (Java) or data classes (Kotlin). Variants as sealed interfaces. 2. **Match exhaustively** — Use pattern-matching `switch` / `when` so a new variant becomes a compile error. 3. **Structure concurrency** — Virtual threads (Java 21+) or coroutine scopes tied to a lifecycle. 4. **Guard nulls at the interop line** — Every value crossing from Java into Kotlin is a platform type; annotate or validate it. 5. **Gate** — Compile with warnings as errors; run SpotBugs/detekt and the test suite.
**Sealed model with exhaustive matching (Java 21):**
sealed interface Payment permits Card, Transfer, Wallet {}
record Card(String last4, YearMonth expiry) implements Payment {}
record Transfer(String iban) implements Payment {}
record Wallet(String provider, String token) implements Payment {}
static String describe(Payment payment) {
return switch (payment) {
case Card c -> "Card ending %s".formatted(c.last4());
case Transfer t -> "Transfer to %s".formatted(t.iban());
case Wallet w -> "%s wallet".formatted(w.provider());
};
}**Structured concurrency in Kotlin:**
suspend fun loadDashboard(userId: String): Dashboard = coroutineScope {
val profile = async { userService.profile(userId) }
val orders = async { orderService.recent(userId, limit = 10) }
Dashboard(profile.await(), orders.await())
}A curated library of 137 production-grade skills for Claude and other AI coding agents. Every skill follows one structure, speaks with one voice, and earns its place by changing what the agent does.
Repo: nimadorostkar/Claude-Skills-collection
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
Use when an agent needs state that survives a session or a context compaction. Covers what to persist, file-based memory, structuring notes for retrieval, and…
Use when automating agent behavior with lifecycle hooks. Covers hook events, deterministic enforcement of rules the model should not be trusted to remember,…
Use when packaging skills, commands, hooks, and MCP servers into a distributable plugin. Covers manifest structure, bundling, versioning, testing, and…
Use when writing a new skill for an AI agent. Covers scoping, description writing for reliable triggering, progressive disclosure, and the difference between a…
Use when reviewing or improving an existing agent skill. Covers triggering accuracy, content quality, redundancy with the base model, and measuring whether the…