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 skills add lugassawan/swe-workbench --skill language-javagit clone --depth 1 https://github.com/lugassawan/swe-workbenchWrote 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/lugassawan/swe-workbench/language-java)<a href="https://agentmods.dev/skills/lugassawan/swe-workbench/language-java"><img src="https://agentmods.dev/badge/skills/lugassawan/swe-workbench/language-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.
<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="Reviewed on agentmods" width="80" 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.1 | $0.00061 | $0.01320 |
| Opus 5.5 | $0.00024 | $0.00528 |
| Sonnet 5.5 | $0.00012 | $0.00264 |
| Haiku 4.5 | $0.00006 | $0.00132 |
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 1mo 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.
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
recordfor immutable data carriers — equals, hashCode, toString, and accessors for free. sealedcloses a hierarchy; exhaustiveswitchreplacesinstanceofchains.
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. Optionalis not a null check replacement — it signals "absence is a valid outcome."- Annotate parameters and fields with
@NonNull/@Nullablefor 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 fornewCachedThreadPool()with virtual-thread semantics.- Do not pool virtual threads; create-per-task is the idiom.
- Watch for carrier-thread pinning:
synchronizedblocks and some native calls pin a virtual thread to its carrier. PreferReentrantLockwhen 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.
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.
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.
- 1mo ago First seen · 130 lines · 61 tokens per session scan A 73b4a4663027
language-java is a skill published in the GitHub repository lugassawan/swe-workbench (3 stars, last pushed yesterday), licensed MIT. It adds 61 tokens to every session and 1,320 once invoked, about $0.0002 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.
Other skills, from other repositories
go-api-design
Enforces Go package and API design — small exported surfaces, packages named for what they provide, functional options instead of growing constructors, context first, no init side effects, and changes that stay backward compatible. Use when creating or restructuring Go packages, designing an exported API or library…
go-idiom
Enforces idiomatic Go style — name length scaled to scope, no stutter, useful zero values, guard clauses, correct defer placement, composition over inheritance, and doc comments in the required form. Use when writing, reviewing, or refactoring any Go code, and when the user asks whether something is idiomatic…
go-tests
Enforces idiomatic Go testing — table-driven cases with subtests, the standard library over assertion frameworks, t.Cleanup for teardown, httptest for HTTP, golden files, fuzzing, and benchmarks that measure. Use when writing or reviewing Go tests, and when the user mentions table tests, t.Run, t.Parallel, testify…
java-clean-code
Complete Clean Code reference for Java 21+ in one skill — naming, methods, comments, general quality, and tests, with modern idioms (records, sealed types, pattern matching, Optional, streams). Use when writing, reviewing, or refactoring any Java code and you want the whole catalog at once rather than one focused area.
java-clean-functions
Enforces method design in Java 21+ — small methods that do one thing, at most three parameters, no boolean flag arguments, no null returns or arguments, and command-query separation. Use when writing or refactoring Java methods and constructors, and when the code shows long methods, parameter lists of four or more…
java-clean-general
Enforces general code quality in Java 21+ — DRY, no magic numbers, immutability by default, sealed hierarchies and pattern matching over instanceof chains, encapsulation over getters and setters, and streams used where they clarify. Use when reviewing or refactoring Java for quality, and when the code shows…