java-expert

java-expert is a skill for Claude Code, Codex from kinhluan/rules-quarkus-skills. It costs 36 tokens per session (3,208 once invoked), scanned A, original, MIT.

A coding guide for modern Java 21 and newer, including language features, concurrency, performance, and clean code practices.

In plain words
What is it for?
Use it when designing, reviewing, or troubleshooting Java code, especially code involving virtual threads, performance, cloud services, or concurrency.
Why use it?
It helps answer difficult Java design and logic questions with consistent, current patterns instead of relying on older Java habits.

Skill for Claude CodeCodex

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

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/kinhluan/rules-quarkus-skills/java-expert
Any agent
npx skills add kinhluan/rules-quarkus-skills --skill java-expert
Clone the repo
git clone --depth 1 https://github.com/kinhluan/rules-quarkus-skills

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-expert

README.md
[![agentmods](https://agentmods.dev/badge/skills/kinhluan/rules-quarkus-skills/java-expert.svg)](https://agentmods.dev/skills/kinhluan/rules-quarkus-skills/java-expert)
Your own site
<a href="https://agentmods.dev/skills/kinhluan/rules-quarkus-skills/java-expert"><img src="https://agentmods.dev/badge/skills/kinhluan/rules-quarkus-skills/java-expert.svg" alt="Measured on agentmods" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,208 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.1 $0.00036 $0.03208
Opus 5 $0.00018 $0.01604
Sonnet 5 $0.00007 $0.00642
Haiku 4.5 $0.00004 $0.00321

Measured 6d ago against content hash 586c2515ae81, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

java-expert 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 6d 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.

.agent-skills/java-expert/SKILL.md · 358 lines

How it starts

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

java-expert

Keyword: java | Platforms: gemini,claude,codex

High-Performance Modern Java Expert Skill - Specialized in Java 21+ and cloud-native architecture.

Core Mandates

  • Google Java Style: Strictly adhere to the Google Java Style Guide for formatting, naming, and structure.
  • Java 21+ First: Mandate var (LVTI) where readable, Records for DTOs, and Pattern Matching for instanceof and switch.
  • Concurrency: Prefer Virtual Threads (@RunOnVirtualThread in Quarkus or Executors.newVirtualThreadPerTaskExecutor()) over traditional Thread Pools for I/O-bound tasks.
  • Immutability: Use record, final fields, and unmodifiable collections (List.of, Map.of).
  • Functional Style: Leverage Streams, Optional, and Functional Interfaces to reduce boilerplate and side effects.
  • Visibility: Default to package-private or private. Only public what must be exposed (API/SPI).

Virtual Threads (Project Loom)

When to Use Virtual Threads

Is the task I/O-bound (DB queries, HTTP calls, file reads)?
  YES → Virtual Threads (scales to millions of concurrent tasks)
  NO → Is it CPU-bound (crypto, compression, ML inference)?
    YES → Platform Threads with ForkJoinPool (work-stealing)
    NO → Is it reactive streaming with backpressure?
      YES → Mutiny / Vert.x (Reactive Streams)
      NO → Virtual Threads (default choice for most workloads)

Patterns

// PATTERN 1: Simple virtual thread executor
try (var executor = Executors.newVirtualThreadPerTaskExecutor()) {
    List<Future<String>> futures = urls.stream()
        .map(url -> executor.submit(() -> fetchUrl(url)))
        .toList();

    List<String> results = futures.stream()
        .map(f -> { try { return f.get(); } catch (Exception e) { throw new RuntimeException(e); } })
        .toList();
}

// PATTERN 2: Structured Concurrency (Preview in 21, stable in 25)
try (var scope = new StructuredTaskScope.ShutdownOnFailure()) {
    var userTask  = scope.fork(() -> userService.findById(id));
    var orderTask = scope.fork(() -> orderService.findByUser(id));
    scope.join().throwIfFailed();
    return new UserProfile(userTask.get(), orderTask.get());
}

// PATTERN 3: Quarkus integration
@Path("/users")
public class UserResource {
    @GET
    @RunOnVirtualThread  // Offloads blocking call to virtual thread
    public List<User> list() {
        return User.listAll();  // Blocking Panache call - safe on VT
    }
}

Read the full file on GitHub · 358 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. 6d ago First seen · 358 lines · 36 tokens per session scan A 586c2515ae81

Subscribe to this mod's changes

java-expert is a skill published in the GitHub repository kinhluan/rules-quarkus-skills (3 stars, last pushed 2mo ago), licensed MIT. It adds 36 tokens to every session and 3,208 once invoked, about $0.0002 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-08-31.

Related

Other skills, from other repositories

java

Use when writing, reviewing or refactoring modern Java (21+, 25 LTS) — records and sealed interfaces as algebraic data types, exhaustive pattern-matching switch over instanceof ladders, virtual-thread concurrency, structured concurrency and ScopedValue replacing ThreadLocal, Stream and Optional pipelines…

ericrisco/rsc-harness · 89 tokens

video-cover-image

Generate matched 3:4, 16:9, and 4:3 short-video cover images from toBeBetterJavaer video scripts or AI/Java technical topics. Use when the user asks for 视频封面, 封面图, 横版和竖版, 小红书/抖音/B站/快手封面, pure-text covers with 白色大字+黄色小字, reference-image-matched covers, or wants a repeatable cover workflow for Markdown scripts under…

itwanger/toBeBetterJavaer · 113 tokens

neo4j-driver-java-skill

Neo4j Java Driver v6 — driver lifecycle, Maven/Gradle setup, executableQuery, executeRead/Write managed transactions, explicit transactions, async/reactive patterns, error handling, data type mapping, connection pool tuning, causal consistency/bookmarks. Use when writing Java or Kotlin code that connects to Neo4j via…

neo4j-contrib/neo4j-skills · 154 tokens

neo4j-spring-data-skill

Use when building Spring Boot applications with Neo4j using Spring Data Neo4j (SDN 7.x/8.x) — @Node entity mapping, @Relationship, @RelationshipProperties, Neo4jRepository, ReactiveNeo4jRepository, @Query annotations, application.yml configuration, projections, Neo4jClient, Neo4jTemplate, transactions, auditing, or…

neo4j-contrib/neo4j-skills · 148 tokens

java-expert

Expert-level Java development with Java 21+ features, Spring Boot, Maven/Gradle, and enterprise best practices. Use when the user mentions JVM, Spring, Maven, Gradle, or enterprise, or when the task involves Modern Java, Spring Boot, Build Tools, or Dependency Injection.

personamanagmentlayer/pcl · 63 tokens

coding-standards

Two thresholds apply — consider and enforce.

alexmond/jhelm · 21 tokens