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.
npx agentmods add skills/ericrisco/rsc-harness/javanpx skills add ericrisco/rsc-harness --skill javagit clone --depth 1 https://github.com/ericrisco/rsc-harnessWrote 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.
[](https://agentmods.dev/skills/ericrisco/rsc-harness/java)<a href="https://agentmods.dev/skills/ericrisco/rsc-harness/java"><img src="https://agentmods.dev/badge/skills/ericrisco/rsc-harness/java.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00089 | $0.04549 |
| Opus 5 | $0.00044 | $0.02275 |
| Sonnet 5 | $0.00018 | $0.00910 |
| Haiku 4.5 | $0.00009 | $0.00455 |
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 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.
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
.javafile. - Modeling a domain: record vs class, sealed hierarchy vs enum, where immutability belongs.
- Replacing
instanceof+cast chains or visitor boilerplate with a pattern-matchingswitch. - 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").
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.
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.
- yesterday First seen · 342 lines · 89 tokens per session scan A 5e3a0f613d47
java is a skill published in the GitHub repository ericrisco/rsc-harness (60 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. 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.
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…
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.
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…
zsxq-reply
以二哥(沉默王二)的身份回复知识星球「Java进阶之路&二哥编程星球」的帖子、提问和评论。完整工作流:扫描未回复的球友提问 → 参照二哥历史回复出草稿 → 用户确认后通过 zsxq-cli 发布。当用户说"看看星球有没有没回的提问"、"回复星球"、"星球回帖"、"帮我回答球友的问题"、"星球提问",或给出某条星球帖子链接/ID 要求回复时,必须使用此 Skill。涉及星球的任何发帖、评论、回答操作也走此 Skill。.
java-idioms
Java rewards clarity, type safety, and robust ecosystem tooling. Modern Java (17+ LTS) favors records, sealed classes, and pattern matching. Idiomatic Java = clean, readable, framework-aware.
spring-boot-idioms
Spring Boot (3.x) rewards auto-configuration, constructor injection, and actuator-driven observability. Idiomatic Spring = annotation-driven, testable, production-ready.