java

java is a skill for Claude Code, Codex from ericrisco/rsc-harness. It costs 89 tokens per session (4,549 once invoked), scanned A, original, MIT.

A guide for writing, reviewing, and refactoring modern Java code, targeting Java 21 and newer.

In plain words
What is it for?
It is for modeling domains with records and sealed interfaces, improving pattern matching, handling concurrent work with virtual threads, and building Stream or Optional pipelines.
Why use it?
It helps developers use current Java language and concurrency features instead of relying on older patterns that can add boilerplate or unsafe state handling.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md.

Good fit It is for modeling domains with records and sealed interfaces, improving pattern matching, handling concurrent work with virtual threads, and building Stream or Optional pipelines.

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

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 java

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/ericrisco/rsc-harness/java"><img src="https://agentmods.dev/badge/skills/ericrisco/rsc-harness/java.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,549 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00089 $0.04549
Opus 5.5 $0.00036 $0.01820
Sonnet 5.5 $0.00018 $0.00910
Haiku 4.5 $0.00009 $0.00455

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

Security

Grade A, and why

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 1mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/verify.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/java/SKILL.md · 342 lines

How it starts

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

Modern Java (21+)

Write, review, and refactor Java the way the language is shaped today, not the way it was in 2014.

Targets Java 21+ with Java 25 as the current LTS (released 2025-09-16, supported to 2033; Java 26 is the current non-LTS, 2026-03-17). "Modern" here means: records and sealed interfaces instead of JavaBeans and type hierarchies, exhaustive pattern-matching switch instead of instanceof+cast ladders, virtual threads instead of hand-tuned pools, and ScopedValue instead of ThreadLocal. If you are reaching for a telescoping constructor, a getter/setter bean, or a manual ExecutorService sized to a core count, stop.

When to use / When NOT to use

Use when:

  • Authoring, reviewing, or refactoring any .java file.
  • Modeling a domain: record vs class, sealed hierarchy vs enum, where immutability belongs.
  • Replacing instanceof+cast chains or visitor boilerplate with a pattern-matching switch.
  • Concurrency that blocks on I/O at scale: migrating thread pools / reactive chains to virtual threads, fan-out with structured concurrency, ThreadLocal -> ScopedValue.
  • Stream / Optional / Collector pipelines, and deciding when a plain loop beats a stream.
  • Setting up or fixing a pom.xml / build.gradle(.kts) for a current JDK (toolchain, --release, preview flags, JUnit 5).

When NOT to use (delegate):

  • Spring controllers, beans, starters, autoconfiguration, @Transactional -> spring-boot. This skill is the plain-JDK layer underneath; framework wiring is out of scope by topic.
  • Kotlin on the JVM (Android or server) -> kotlin-android. Java and Kotlin interop but are different languages; coroutines and Kotlin null-safety belong there.
  • Language-agnostic threat modeling / OWASP / authz -> secure-coding. This skill keeps only Java-specific controls (parametrized JDBC, compact-constructor validation, sane deser).
  • Containerfile / CI pipeline / shipping -> deployment. This skill keeps only a jlink/jpackage note and the JDK base-image choice.
  • PostgreSQL schema / index / query tuning -> postgresdb. This skill covers JDBC parametrization from the Java side only.
  • Recording per-project conventions in a workspace wiki -> harness (see "Project grounding").

Read the full file on GitHub · 342 lines

Files

What ships with it

6 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. 1mo ago First seen · 342 lines · 89 tokens per session scan A 5e3a0f613d47

Subscribe to this mod's changes

java is a skill published in the GitHub repository ericrisco/rsc-harness (237 stars, last pushed yesterday), licensed MIT. It adds 89 tokens to every session and 4,549 once invoked, about $0.0004 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-09-03.

Related

Other skills, from other repositories

effective-java

Generate and review Java code using patterns and best practices from Joshua Bloch's "Effective Java" (3rd Edition). Use this skill whenever the user asks about Java best practices, API design, object creation patterns, generics, enums, lambdas, streams, concurrency, serialization, method design, exception handling, or…

booklib-ai/booklib · 165 tokens

java-expert

Expert knowledge for Modern Java (21+) development, including Virtual Threads, performance tuning, and idiomatic clean code. Use for deep Java language/logic questions.

kinhluan/rules-quarkus-skills · 36 tokens

springboot-patterns

Spring Boot architecture patterns, REST API design, layered services, data access, caching, async processing, and logging. Use for Java Spring Boot backend work.

deepelementlab/jupyter-studio · 36 tokens

agentscope-java

Expert Java developer skill for AgentScope Java framework - a reactive, message-driven multi-agent system built on Project Reactor. Use when working with reactive programming, LLM integration, agent orchestration, multi-agent systems, or when the user mentions AgentScope, ReActAgent, Mono/Flux, Project Reactor, or…

agentscope-ai/agentscope-java · 91 tokens

dd-code-generation

Use pup CLI for immediate Datadog operations or generate code for integration into applications.

DataDog/pup · 16 tokens

java-unit-test

A code-generation guide for Java unit tests in Spring Boot projects. Unit tests check one small piece of code in isolation; Spring Boot is a Java framework for building web applications and services.

hashgraph-online/awesome-codex-plugins · 113 tokens