loom-java

loom-java is a skill for Claude Code, Codex from cosmix/loom. It costs 14 tokens per session (6,971 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,971 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.06971
Opus 5.5 $0.00006 $0.02788
Sonnet 5.5 $0.00003 $0.01394
Haiku 4.5 $0.00001 $0.00697

Measured 21d ago against content hash aea400ccb080, 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 21d 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 ./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. 21d 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 (62 stars, last pushed today), licensed MIT. It adds 14 tokens to every session and 6,971 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

Other skills, from other repositories

authoring-java-sdk-tasks

Writes Airflow task logic in Java, Kotlin, or any JVM language using the Airflow Java SDK. Use when the user wants to implement Airflow tasks in Java/JVM, asks about @Builder.Dag/@Builder.Task/@Builder.XCom, the Task/BundleBuilder interfaces, reading connections/variables/XComs from Java, the JSON-to-Java type…

astronomer/agents · 152 tokens

configuring-airflow-language-sdks

Configures Airflow to run language SDK tasks (Java, Go, and future native SDKs) — register a coordinator, map a queue to it, ensure the runtime/artifact on workers, and tune coordinator options. Use when the user wants Airflow to route a queue to a native-language coordinator, asks about the [sdk]…

astronomer/agents · 155 tokens

aws-sdk-java-v2-bedrock

Provides Amazon Bedrock patterns using AWS SDK for Java 2.x. Invokes foundation models (Claude, Llama, Titan), generates text and images, creates embeddings for RAG, streams real-time responses, and configures Spring Boot integration. Use when asking about Bedrock integration, Java SDK for AI models, AWS generative…

giuseppe-trisciuoglio/developer-kit · 92 tokens

aws-lambda-java-integration

Provides AWS Lambda integration patterns for Java with cold start optimization. Use when deploying Java functions to AWS Lambda, choosing between Micronaut and Raw Java approaches, optimizing cold starts below 1 second, configuring API Gateway or ALB integration, or implementing serverless Java applications. Triggers…

giuseppe-trisciuoglio/developer-kit · 99 tokens

langchain4j-ai-services-patterns

Provides patterns to build declarative AI Services with LangChain4j for LLM integration, chatbot development, AI agent implementation, and conversational AI in Java. Generates type-safe AI services using interface-based patterns, annotations, memory management, and tools integration. Use when creating AI-powered Java…

giuseppe-trisciuoglio/developer-kit · 85 tokens

unit-test-parameterized

Provides parameterized testing patterns with JUnit 5, generates data-driven unit tests using @ParameterizedTest, @ValueSource, @CsvSource, @MethodSource. Creates tests that run the same logic with multiple input values. Use when writing data-driven Java tests, multiple test cases from single method, or boundary value…

giuseppe-trisciuoglio/developer-kit · 71 tokens