loom-java

loom-java is a skill for Claude Code, Codex from cosmix/loom. It costs 14 tokens per session (6,998 once invoked), scanned A, original, MIT.

Java language guidance for Java 21 and later, covering Maven and Gradle builds, Spring Boot, virtual threads, and JUnit 5 tests. Maven and Gradle are tools for building Java projects and managing dependencies.

In plain words
What is it for?
Use it to build, test, inspect dependencies, format, and check Java applications and libraries without changing the repository's existing build system.
Why use it?
It helps catch mistakes that compile successfully, such as comparing boxed values incorrectly, losing duplicate map entries, misusing transactions, or running no tests while reporting success.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is @ValueSource(strings = {"../escape.json", "/etc/passwd", "a/../../b"}).

Good fit Use it to build, test, inspect dependencies, format, and check Java applications and libraries without changing the repository's existing build system.

Compare 6 skills from other repositories ↓
View source ↗ cosmix/loom
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/cosmix/loom
agentmods
npx agentmods add skills/cosmix/loom/loom-java

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/cosmix/loom/loom-java"><img src="https://agentmods.dev/badge/skills/cosmix/loom/loom-java.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 14 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,998 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00014 $0.06998
Opus 5.5 $0.00006 $0.02799
Sonnet 5.5 $0.00003 $0.01400
Haiku 4.5 $0.00001 $0.00700

Measured 12d ago against content hash d49082a58f90, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

loom-java scanned grade A with 1 finding 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 12d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

.map(url -> executor.submit(() -> fetch(url))) // one virtual thread per blocking call
skills/loom-java/SKILL.md · 396 lines

How it starts

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

Java Language Expertise

Overview

Idiomatic, production-grade Java 21+ (25 is the current LTS): records, sealed hierarchies, pattern matching, streams, virtual threads, the Maven and Gradle builds, JUnit 5 and Spring Boot. Assumes the reader knows the language. The content is decision rules and the traps that survive review: == on boxed values, Collectors.toMap on a duplicate key, @Transactional on a self-call, a pinned virtual thread, a test task that runs zero JUnit 5 tests and reports success.

Tooling

Use the wrapper the repository ships (./gradlew, ./mvnw); it pins the build tool version. Keep the existing build tool: a Maven-to-Gradle migration is a separate, requested change.

Task Gradle Maven
Full gate ./gradlew check ./mvnw -q verify
Compile main and tests ./gradlew testClasses ./mvnw -q test-compile
Unit tests, whole suite (the stage gate's) ./gradlew test ./mvnw -q test
One test ./gradlew test --tests 'com.acme.FooTest.bar' ./mvnw test -Dtest='FooTest#bar'
Dependency tree ./gradlew dependencies --configuration runtimeClasspath ./mvnw dependency:tree
Why is X on the classpath ./gradlew dependencyInsight --dependency jackson-databind ./mvnw dependency:tree -Dincludes=com.fasterxml.jackson.core
Format ./gradlew spotlessApply ./mvnw spotless:apply
  • Gradle: check runs test plus every verification task a plugin attaches (Spotless's spotlessCheck, Checkstyle, SpotBugs); Error Prone runs inside compileJava. build is check plus assemble. A test task whose inputs have not changed is skipped as UP-TO-DATE; --rerun (Gradle 7.6+) forces it.
  • Maven: Surefire runs unit tests in the test phase (default includes **/Test*.java, **/*Test.java, **/*Tests.java, **/*TestCase.java); Failsafe runs *IT.java in integration-test/verify. Pin maven-surefire-plugin 3.x in <pluginManagement>: older Maven super-POMs bind Surefire 2.12.4, which runs no JUnit 5 tests and reports success.
  • Versions: Gradle keeps them in the version catalog (gradle/libs.versions.toml) and imports BOMs with platform(...); Maven imports BOMs in <dependencyManagement> with <scope>import</scope>. Conflict resolution differs: Gradle picks the highest requested version, Maven picks the nearest declaration in the tree, which can silently downgrade a transitive dependency. maven-enforcer-plugin's dependencyConvergence rule turns that into a build error.
  • Static analysis: javac -Xlint:all -Werror; Error Prone (javac plugin, compile-time bug patterns); NullAway (an Error Prone check) with JSpecify @NullMarked/@Nullable; SpotBugs on bytecode; Checkstyle or PMD for style rules. Format with Spotless running google-java-format or palantir-java-format.

Read the full file on GitHub · 396 lines

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. 12d ago Changed d49082a58f90
  2. 2mo ago First seen · 396 lines · 14 tokens per session scan A aea400ccb080

Subscribe to this mod's changes

loom-java is a skill published in the GitHub repository cosmix/loom (66 stars, last pushed yesterday), licensed MIT. It adds 14 tokens to every session and 6,998 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-26.

Related

loom-java compared with skills from other repositories

loom-java next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
loom-javacosmix/loomSkill66yesterdayMITA14Claude Code, Codex
authoring-java-sdk-tasksastronomer/agentsSkill465todayApache-2.0A152Claude Code
configuring-airflow-language-sdksastronomer/agentsSkill465todayApache-2.0A155Claude Code
jakarta-data-persistenceAdamBien/airailsSkill76yesterdayMITA199Claude Code
jackson-3-migrationnavikt/copilotSkill65yesterdayMITA53Claude Code, Codex
zcfgAdamBien/airailsSkill76yesterdayMITA75Claude Code
memory-persistenceAdamBien/airailsSkill76yesterdayMITA161Claude Code