Java Patterns

Java Patterns is a skill for Claude Code, Codex from AmariahAK/atlarix-skills. It costs 2 tokens per session (422 once invoked), scanned A, original, Apache-2.0.

A set of patterns for building Java services and libraries. It covers null handling, clear layers, immutable data, errors, builds with Maven or Gradle, and tests.

In plain words
What is it for?
It helps organize controllers, services, and data access; handle errors; and run Java tests with JUnit and integration tools.
Why use it?
It helps avoid confusing project structure, hidden failures, unsafe null use, and code that is difficult to test.

Skill for Claude CodeCodex

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

Good fit It helps organize controllers, services, and data access; handle errors; and run Java tests with JUnit and integration tools.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/amariahak/atlarix-skills/java
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.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/amariahak/atlarix-skills/java"><img src="https://agentmods.dev/badge/skills/amariahak/atlarix-skills/java.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 422 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00002 $0.00422
Opus 5.5 $0.00001 $0.00169
Sonnet 5.5 $0.00000 $0.00084
Haiku 4.5 $0.00000 $0.00042

Measured 1mo ago against content hash 89b9d0aaba95, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

Java Patterns 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.

skills/java/SKILL.md · 67 lines

What it actually says

Java Patterns

When to use this skill

Use this skill when working on Java services/libs and you want clean layering, safe null handling, predictable build structure (Maven/Gradle), and testable code.

Core patterns

Null handling (be explicit)

Prefer:

  • returning empty collections over null
  • Optional<T> for return values (not for fields)
  • null checks at boundaries (inputs)

Avoid:

  • Optional in fields/DTOs as a general rule (depends on ecosystem)

Layering

Keep boundaries clear:

  • controllers/handlers (HTTP, RPC)
  • services (business logic)
  • repositories/DAOs (persistence)

Immutability by default

Prefer:

  • final fields
  • constructors that enforce invariants
  • builders only when needed

Exceptions

Rules:

  • throw exceptions with actionable messages
  • don’t catch-and-ignore
  • wrap lower-level exceptions with context

Tests

Patterns:

  • JUnit for unit tests
  • integration tests for persistence and wiring
  • avoid heavy mocks; mock at boundaries

Atlarix tool notes

  • Explore: identify build system (pom.xml vs build.gradle) and entry points.
  • Build: run mvn test or gradle test depending on project.
  • Debug: inspect stack traces; find first application frame.
  • Review: verify layering and that exceptions don’t leak secrets.

Common mistakes to avoid

  • God services with too many responsibilities
  • Catching Exception broadly and hiding failures
  • NPEs due to missing boundary validation

Mini-checklist

  • Clear layers
  • Nulls handled intentionally
  • Tests cover critical paths
  • Build commands documented
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. 1mo ago First seen · 67 lines · 2 tokens per session scan A 89b9d0aaba95

Subscribe to this mod's changes

Java Patterns is a skill published in the GitHub repository AmariahAK/atlarix-skills (2 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 2 tokens to every session and 422 once invoked, about $0.0000 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.

Related

Other skills, from other repositories

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

senior-java

World-class Java and Spring Boot development skill for enterprise applications, microservices, and cloud-native systems. Expertise in Spring Framework, Spring Boot 3.x, Spring Cloud, JPA/Hibernate, and reactive programming with WebFlux. Includes project scaffolding, dependency management, security implementation, and…

xuansenpa1/skillrevise · 65 tokens

senior-java

World-class Java and Spring Boot development skill for enterprise applications, microservices, and cloud-native systems. Expertise in Spring Framework, Spring Boot 3.x, Spring Cloud, JPA/Hibernate, and reactive programming with WebFlux. Includes project scaffolding, dependency management, security implementation, and…

UCSB-NLP-Chang/Skill-Usage · 65 tokens

senior-java

World-class Java and Spring Boot development skill for enterprise applications, microservices, and cloud-native systems. Expertise in Spring Framework, Spring Boot 3.x, Spring Cloud, JPA/Hibernate, and reactive programming with WebFlux. Includes project scaffolding, dependency management, security implementation, and…

benchflow-ai/skillsbench · 65 tokens

spring-mcp-contracts

Develops and verifies JSON contracts of the Spring plugin's MCP tools using Java/Kotlin PSI, UAST, scoped Spring models and bounded response regression tests. Use when changing an endpoint lookup or contract tool, URL matching, the call-chain trace, a bean lookup or listing tool, a parameter source or requiredness, a…

explyt/spring-plugin · 102 tokens

create-spring-boot-project

Creates a new Spring Boot project by downloading it from start.spring.io using curl, then extracting it into the target directory. Use this when a user asks to create, generate, initialize, or scaffold a new Spring Boot project.

spring-projects/spring-tools · 52 tokens