loom-kotlin

loom-kotlin is a skill for Claude Code, Codex from cosmix/loom. It costs 16 tokens per session (6,033 once invoked), scanned A, original, MIT.

Kotlin language guidance for Kotlin 2.x on the Java platform, covering coroutines, Flow, Gradle Kotlin builds, Ktor, Spring, and common test tools. Coroutines are Kotlin's way to structure asynchronous work without manually managing threads.

In plain words
What is it for?
Use it to build, test, format, analyse, and inspect dependencies in Kotlin projects using Gradle.
Why use it?
It helps prevent leaked background work, swallowed cancellation, blocking calls on the wrong dispatcher, Java interoperation problems, and classes that cannot be proxied by Spring.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to build, test, format, analyse, and inspect dependencies in Kotlin projects using Gradle.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cosmix/loom/loom-kotlin
View source ↗ cosmix/loom
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add cosmix/loom --skill loom-kotlin
Clone the repo
git clone --depth 1 https://github.com/cosmix/loom

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for loom-kotlin

README.md
[![agentmods](https://agentmods.dev/badge/skills/cosmix/loom/loom-kotlin/github.svg)](https://agentmods.dev/skills/cosmix/loom/loom-kotlin)
Your own site
<a href="https://agentmods.dev/skills/cosmix/loom/loom-kotlin"><img src="https://agentmods.dev/badge/skills/cosmix/loom/loom-kotlin/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for loom-kotlin

Your own site · 80×15
<a href="https://agentmods.dev/skills/cosmix/loom/loom-kotlin"><img src="https://agentmods.dev/badge/skills/cosmix/loom/loom-kotlin.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,033 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00016 $0.06033
Opus 5.5 $0.00006 $0.02413
Sonnet 5.5 $0.00003 $0.01207
Haiku 4.5 $0.00002 $0.00603

Measured 11d ago against content hash 1dd252beff69, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

loom-kotlin scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

val profile = async { profileClient.fetch(userId) }
skills/loom-kotlin/SKILL.md · 413 lines

How it starts

The opening of the file, as written. The whole thing — 413 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Kotlin Language Expertise

Overview

Idiomatic, production-grade Kotlin 2.x on the JVM: null safety, data and sealed classes, coroutines with structured concurrency, Flow, Gradle Kotlin DSL builds, Ktor, Spring with Kotlin, and JUnit 5/kotest testing. Assumes the reader writes Kotlin already. The content is the part that goes wrong in production: runCatching swallowing cancellation, GlobalScope leaks, blocking calls on the wrong dispatcher, platform types from Java, final classes breaking Spring proxies.

Tooling

Gradle with the Kotlin DSL is the default build; the K2 compiler is the default since Kotlin 2.0. Use the wrapper (./gradlew) and keep versions in the catalog (gradle/libs.versions.toml).

Task Command
Full gate ./gradlew check (tests plus detekt/ktlint when their plugins are applied)
Compile main and tests ./gradlew testClasses
Unit tests, whole suite (the stage gate's) ./gradlew test
One test ./gradlew test --tests 'com.acme.FooTest.bar'
Static analysis ./gradlew detekt
Format ./gradlew ktlintFormat (or spotlessApply with ktlint or ktfmt)
Dependency tree ./gradlew dependencies --configuration runtimeClasspath
// build.gradle.kts
plugins {
    alias(libs.plugins.kotlin.jvm)
    alias(libs.plugins.detekt)
    alias(libs.plugins.ktlint)
}

kotlin {
    jvmToolchain(21)
    compilerOptions {
        allWarningsAsErrors = true
        freeCompilerArgs.add("-Xjsr305=strict")   // Java nullability annotations become Kotlin types
    }
}

dependencies {
    implementation(libs.kotlinx.coroutines.core)
    testImplementation(kotlin("test"))            // kotlin.test on JUnit 5 once useJUnitPlatform() is set
    testImplementation(libs.kotlinx.coroutines.test)
    testImplementation(libs.mockk)
}

tasks.test { useJUnitPlatform() }
  • Share build logic across subprojects through convention plugins in an included build-logic build (or buildSrc), applied by id. allprojects {}/subprojects {} blocks couple projects and defeat the configuration cache.
  • settings.gradle.kts holds rootProject.name, include(":app") and dependencyResolutionManagement. Catalog accessors (libs.kotlinx.coroutines.core) are generated and type-checked.
  • ./gradlew test is skipped as UP-TO-DATE when its inputs are unchanged; --rerun forces it.
  • Libraries: kotlin { explicitApi() } requires visibility modifiers and return types on every public declaration.
  • Annotation processing: KSP where the processor supports it; kapt is in maintenance mode and slower.
  • Maven Kotlin builds use kotlin-maven-plugin with <extensions>true</extensions>; in mixed Java/Kotlin modules the Kotlin compilation must run before maven-compiler-plugin.

Read the full file on GitHub · 413 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago Changed 1dd252beff69
  2. 2mo ago First seen · 413 lines · 16 tokens per session scan A 25803d769569

Subscribe to this mod's changes

loom-kotlin is a skill published in the GitHub repository cosmix/loom (66 stars, last pushed today), licensed MIT. It adds 16 tokens to every session and 6,033 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-26.

Related

loom-kotlin compared with skills from other repositories

loom-kotlin next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
loom-kotlincosmix/loomSkill66todayMITA16Claude Code, Codex
authoring-java-sdk-tasksastronomer/agentsSkill4646d agoApache-2.0A152Claude Code
jackson-3-migrationnavikt/copilotSkill65yesterdayMITA53Claude Code, Codex
java-to-kotlinnavikt/copilotSkill65yesterdayMITA35Claude Code, Codex
spring-boot-scaffoldnavikt/copilotSkill65yesterdayMITA32Claude Code, Codex
ktor-scaffoldnavikt/copilotSkill65yesterdayMITA30Claude Code, Codex
kotlin-app-confignavikt/copilotSkill65yesterdayMITA25Claude Code, Codex