java

java is a skill for Claude Code from dean0x/devflow. It costs 35 tokens per session (582 once invoked), scanned A, original, MIT.

A coding reference for modern Java design, including immutable data records, restricted class families, optional values, streams, and concurrent code. It favors combining small components over building deep class hierarchies.

In plain words
What is it for?
Use it when designing Java APIs, organizing packages, modeling data, handling missing values, writing stream code, or implementing concurrent features.
Why use it?
It helps prevent tightly coupled Java code and makes data, errors, and allowed types clearer.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it when designing Java APIs, organizing packages, modeling data, handling missing values, writing stream code, or implementing concurrent features.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dean0x/devflow/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 dean0x/devflow --skill java
Clone the repo
git clone --depth 1 https://github.com/dean0x/devflow

Made for: Claude Code.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/dean0x/devflow/java"><img src="https://agentmods.dev/badge/skills/dean0x/devflow/java.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 582 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00035 $0.00582
Opus 5.5 $0.00014 $0.00233
Sonnet 5.5 $0.00007 $0.00116
Haiku 4.5 $0.00003 $0.00058

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

Security

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

src/assets/skills/java/SKILL.md · 63 lines

How it starts

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

Java Patterns

Iron Law

FAVOR COMPOSITION OVER INHERITANCE

Delegation and interfaces over class hierarchies. Inheritance creates tight coupling, breaks encapsulation, and makes refactoring dangerous. Use interfaces for polymorphism, records for data, and sealed classes for restricted hierarchies. Extend only when the "is-a" relationship is genuinely invariant. — Effective Java, Item 18 [1, Item 18]

Type System (Modern Java)

  • Use records for pure data, not mutable POJOs with setName()/getName(). Validate in the compact constructor (Objects.requireNonNull).
  • Use sealed interfaces for type hierarchies. They close the subtype set, so a switch over them is exhaustive with no default:
public sealed interface Result<T> permits Success, Failure {
    record Success<T>(T value) implements Result<T> {}
    record Failure<T>(String error) implements Result<T> {}
}
switch (result) {
    case Success<User> s -> handleSuccess(s.value());
    case Failure<User> f -> handleError(f.error());
}
  • Never return null: return Optional, and chain with map/orElse, not isPresent()/get().
  • No raw generic types: List<User>, not List.

Error Handling

  • Use try-with-resources for every AutoCloseable resource.
  • Throw specific or unchecked custom exceptions that carry structured fields for context, not throws Exception.

Immutability and Composition

  • Prefer List.of/Map.of. Make defensive copies in constructors with List.copyOf.
  • Do not share mutable state across threads (HashMap): use ConcurrentHashMap or immutable data.
  • Constructor-inject collaborators. Never extend a class only to reuse methods; replace deep hierarchies (4+ levels) with interfaces and composition.
  • Use streams for collection transforms.

Extended References

  • references/sources.md — Full bibliography
  • references/violations.md — Common Java violations with citations
  • references/patterns.md — Extended Java patterns with citations
  • references/detection.md — Detection patterns for Java issues
  • references/modern-java.md — Modern Java features (17-21+) with JEP citations

Read the full file on GitHub · 63 lines

Files

What ships with it

5 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.

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 Changed · -86 lines 12555365f99c
  2. 1mo ago Changed · -28 tokens per session 4ec16ca95077
  3. 3mo ago First seen · 149 lines · 63 tokens per session scan A d5de779cc53d

Subscribe to this mod's changes

java is a skill published in the GitHub repository dean0x/devflow (23 stars, last pushed today), licensed MIT. It adds 35 tokens to every session and 582 once invoked, about $0.0001 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-08-30.

Related

java compared with skills from other repositories

java next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
javadean0x/devflowSkill23todayMITA35Claude Code
better-t-stackAmanVarshney01/create-better-t-stackSkill5.9ktodayMITA149Claude Code, Codex
printing-pressmvanhorn/cli-printing-pressSkill5.1ktodayMITA86Claude Code
fastapiericrisco/rsc-harnessSkill6915d agoMITA94Claude Code, Codex
goericrisco/rsc-harnessSkill6915d agoMITA86Claude Code, Codex
laravelericrisco/rsc-harnessSkill6915d agoMITA75Claude Code, Codex
design-reviewdimetron/pi-goSkill232todayMITA30Claude Code, Codex