language-java

language-java is a skill for Claude Code, Codex from lugassawan/swe-workbench. It costs 61 tokens per session (1,320 once invoked), scanned A, original, MIT.

A modern Java coding guide covering records, sealed types, null handling, and JDK 21 patterns. It loads when you work on Java or common Java build files.

In plain words
What is it for?
Use it when designing Java data classes, closed type hierarchies, JSON models, or code using Maven, Gradle, Spring, or virtual threads.
Why use it?
It helps reduce boilerplate and handle missing values and data-model boundaries more safely.

Skill for Claude CodeCodex

Part of the swe-workbench plugin — 60 skills, 25 commands, 32 agents, 4 hooks shipped together

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.

agentmods
npx agentmods add skills/lugassawan/swe-workbench/language-java
Any agent
npx skills add lugassawan/swe-workbench --skill language-java
Clone the repo
git clone --depth 1 https://github.com/lugassawan/swe-workbench

Made for: Claude Code, Codex.

Or install swe-workbench, the plugin that ships this one along with the rest of its 60 skills, 25 commands, 32 agents, 4 hooks.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/lugassawan/swe-workbench/language-java.svg)](https://agentmods.dev/skills/lugassawan/swe-workbench/language-java)
Your own site
<a href="https://agentmods.dev/skills/lugassawan/swe-workbench/language-java"><img src="https://agentmods.dev/badge/skills/lugassawan/swe-workbench/language-java.svg" alt="Measured on agentmods" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,320 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00061 $0.01320
Opus 5 $0.00030 $0.00660
Sonnet 5 $0.00012 $0.00264
Haiku 4.5 $0.00006 $0.00132

Measured yesterday against content hash 73b4a4663027, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

language-java 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 yesterday.

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.

skills/language-java/SKILL.md · 130 lines

How it starts

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

Java

Records and sealed types

Modern Java models data without boilerplate.

record Point(double x, double y) {}

sealed interface Shape permits Circle, Rectangle {}
record Circle(Point center, double radius) implements Shape {}
record Rectangle(Point topLeft, Point bottomRight) implements Shape {}
  • Use record for immutable data carriers — equals, hashCode, toString, and accessors for free.
  • sealed closes a hierarchy; exhaustive switch replaces instanceof chains.
double area = switch (shape) {
    case Circle c    -> Math.PI * c.radius() * c.radius();
    case Rectangle r -> Math.abs(r.bottomRight().x() - r.topLeft().x())
                        * Math.abs(r.bottomRight().y() - r.topLeft().y());
};

Optional and null discipline

  • Return Optional<T> from methods that may have no result; never use it as a field or parameter type.
  • Optional is not a null check replacement — it signals "absence is a valid outcome."
  • Annotate parameters and fields with @NonNull / @Nullable for static analysis.
  • Jackson populates List<T> with literal nulls from valid JSON ({"content":[null]}) regardless of declared nullability — filter before mapping over an externally-deserialized collection, or drop them at the boundary with @JsonSetter(contentNulls = Nulls.SKIP).
Optional<User> find(String id) { ... }
find(id).map(User::email).orElseThrow(() -> new NotFoundException(id));

List<String> ids = payload.content().stream()
    .filter(Objects::nonNull)
    .map(Content::id)
    .toList();

Concurrency — virtual threads (JDK 21+)

Virtual threads (Project Loom) make blocking-style IO safe at scale.

try (var scope = new StructuredTaskScope.ShutdownOnFailure()) {
    Future<User>  user  = scope.fork(() -> fetchUser(id));
    Future<Order> order = scope.fork(() -> fetchOrder(orderId));
    scope.join().throwIfFailed();
    return new Response(user.get(), order.get());
}
  • Executors.newVirtualThreadPerTaskExecutor() — drop-in for newCachedThreadPool() with virtual-thread semantics.
  • Do not pool virtual threads; create-per-task is the idiom.
  • Watch for carrier-thread pinning: synchronized blocks and some native calls pin a virtual thread to its carrier. Prefer ReentrantLock when high-throughput blocking is expected.
  • StructuredTaskScope (JDK 21–24 preview — not yet standard; enable with --enable-preview) enforces structured concurrency: tasks are joined before the scope exits.

Read the full file on GitHub · 130 lines

Files

What ships with it

1 file 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. yesterday First seen · 130 lines · 61 tokens per session scan A 73b4a4663027

Subscribe to this mod's changes

language-java is a skill published in the GitHub repository lugassawan/swe-workbench (2 stars, last pushed 2d ago), licensed MIT. It adds 61 tokens to every session and 1,320 once invoked, about $0.0003 per session on Opus 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-09-03.

Related

Other skills, from other repositories

sub-kopring-engineer

Kotlin/Java Spring Boot codebase workflow agent. Generates code adhering to Hexagonal Architecture, Kotlin/Java idioms, JPA patterns, JOOQ, and test conventions through Brainstorm → Plan → Implement → Verify phases. Activated by keywords: "implement", "feature development", "code writing", "plan", "implement"…

brody-0125/my-claude-skills · 108 tokens

release

Cut a brooks-lint release: set the version in package.json, propagate it across all four plugin manifests and every version-bearing text file (README badges, docs site metadata), write the CHANGELOG entry, validate, then commit, push, tag, and publish the GitHub release. Triggers when the maintainer asks to "release"…

hyhmrright/brooks-lint · 135 tokens

brooks-audit

Architecture audit that maps module dependencies, checks layering integrity, and flags structural decay across a codebase, drawing on twelve classic engineering books. Triggers when: user asks to audit architecture, review folder/module structure, check for circular imports, understand how the codebase is organized…

hyhmrright/brooks-lint · 143 tokens

brooks-test

Test quality review drawing on twelve classic engineering books — with primary focus on xUnit Test Patterns, The Art of Unit Testing, How Google Tests Software, and Working Effectively with Legacy Code — that diagnoses structural problems in an existing test suite: brittleness, mock abuse, coverage illusions, slow…

hyhmrright/brooks-lint · 161 tokens

setup-agentic-scaffolding

Set up the prerequisites for the Quarkus + LangChain4j agentic stack in the coding agent you are running — detect and (with approval) install the toolchain, register the Quarkus Agents MCP and context7 MCP servers, and write the conventions file into your project. User-invoked only, via /setup-agentic-scaffolding; it…

eldermoraes/quarkus-agentic-scaffolding · 97 tokens

modern-csharp

C# 12–14 language features with practical patterns — primary constructors, collection expressions, records, pattern matching, nullable reference types, and more.

zdanovichnick/dotnet-pilot · 34 tokens