java-kotlin

java-kotlin is a skill for Claude Code, Codex from miles990/claude-software-skills. It costs 9 tokens per session (2,870 once invoked), scanned A, original, MIT.

A reference for Java and Kotlin programming on the JVM, the software platform that runs these languages.

In plain words
What is it for?
Use it for records, sealed classes, validation, classes, modules, and other Java or Kotlin programming tasks.
Why use it?
It helps avoid guessing at language patterns and gives common ways to structure modern JVM code.

Skill for Claude CodeCodex

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

Good fit Use it for records, sealed classes, validation, classes, modules, and other Java or Kotlin programming tasks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/miles990/claude-software-skills/java-kotlin
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 miles990/claude-software-skills --skill java-kotlin
Clone the repo
git clone --depth 1 https://github.com/miles990/claude-software-skills

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin java-kotlin — /plugin install java-kotlin after adding the marketplace above.

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 java-kotlin

README.md
[![agentmods](https://agentmods.dev/badge/skills/miles990/claude-software-skills/java-kotlin/github.svg)](https://agentmods.dev/skills/miles990/claude-software-skills/java-kotlin)
Your own site
<a href="https://agentmods.dev/skills/miles990/claude-software-skills/java-kotlin"><img src="https://agentmods.dev/badge/skills/miles990/claude-software-skills/java-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 java-kotlin

Your own site · 80×15
<a href="https://agentmods.dev/skills/miles990/claude-software-skills/java-kotlin"><img src="https://agentmods.dev/badge/skills/miles990/claude-software-skills/java-kotlin.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 9 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,870 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00009 $0.02870
Opus 5.5 $0.00004 $0.01148
Sonnet 5.5 $0.00002 $0.00574
Haiku 4.5 $0.00001 $0.00287

Measured 3mo ago against content hash bcd37aed80a0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

java-kotlin scanned grade A with 0 findings 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 3mo 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

programming-languages/java-kotlin/SKILL.md · 507 lines

How it starts

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

Java & Kotlin

Overview

Modern Java and Kotlin patterns for JVM development.


Java Modern Features

Records and Sealed Classes (Java 17+)

// Record - immutable data class
public record User(
    String id,
    String email,
    String name,
    Instant createdAt
) {
    // Compact constructor for validation
    public User {
        Objects.requireNonNull(id);
        Objects.requireNonNull(email);
        if (!email.contains("@")) {
            throw new IllegalArgumentException("Invalid email");
        }
    }

    // Static factory method
    public static User create(String email, String name) {
        return new User(UUID.randomUUID().toString(), email, name, Instant.now());
    }
}

// Sealed classes - restricted hierarchy
public sealed interface Shape
    permits Circle, Rectangle, Triangle {
    double area();
}

public record Circle(double radius) implements Shape {
    @Override
    public double area() {
        return Math.PI * radius * radius;
    }
}

public record Rectangle(double width, double height) implements Shape {
    @Override
    public double area() {
        return width * height;
    }
}

public final class Triangle implements Shape {
    private final double base;
    private final double height;

    public Triangle(double base, double height) {
        this.base = base;
        this.height = height;
    }

    @Override
    public double area() {
        return 0.5 * base * height;
    }
}

Pattern Matching

// Pattern matching for instanceof (Java 16+)
public String describe(Object obj) {
    if (obj instanceof String s) {
        return "String of length " + s.length();
    } else if (obj instanceof Integer i) {
        return "Integer: " + i;
    } else if (obj instanceof List<?> list && !list.isEmpty()) {
        return "Non-empty list with " + list.size() + " elements";
    }
    return "Unknown type";
}

// Pattern matching for switch (Java 21+)
public double calculateArea(Shape shape) {
    return switch (shape) {
        case Circle c -> Math.PI * c.radius() * c.radius();
        case Rectangle r -> r.width() * r.height();
        case Triangle t -> 0.5 * t.base() * t.height();
    };
}

// Guard patterns
public String classify(Shape shape) {
    return switch (shape) {
        case Circle c when c.radius() > 10 -> "Large circle";
        case Circle c -> "Small circle";
        case Rectangle r when r.width() == r.height() -> "Square";
        case Rectangle r -> "Rectangle";
        default -> "Other shape";
    };
}

Read the full file on GitHub · 507 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3mo ago First seen · 507 lines · 9 tokens per session scan A bcd37aed80a0

Subscribe to this mod's changes

java-kotlin is a skill published in the GitHub repository miles990/claude-software-skills (28 stars, last pushed 10mo ago), licensed MIT. It adds 9 tokens to every session and 2,870 once invoked, about $0.0000 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

java-kotlin compared with skills from other repositories

java-kotlin next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
java-kotlinmiles990/claude-software-skillsSkill2810mo agoMITA9Claude Code, Codex
kmp-lspHessesian/kmp-lspSkill2294d agoMITA114Claude Code, Codex
kotlin-expertpersonamanagmentlayer/pclSkill471mo agoApache-2.0A55Claude Code
compose-animationschrisbanes/skillsSkill1.2ktodayApache-2.0A67Claude Code
compose-focus-navigationchrisbanes/skillsSkill1.2ktodayApache-2.0A41Claude Code
compose-multiplatformericrisco/rsc-harnessSkill7093d agoMITA80Claude Code, Codex
kotlin-androidericrisco/rsc-harnessSkill7093d agoMITA78Claude Code, Codex