Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
bighardperson avatar

Java

  • 8 installs
  • 33 repo stars
  • Updated April 26, 2026
  • bighardperson/computer-science-skills-collection

java is a Claude skill that helps write robust Java by avoiding null traps, equality bugs, and concurrency pitfalls.

About

This skill helps write robust Java by flagging null traps, equality bugs, and concurrency pitfalls. It provides a critical-rules list plus reference files for nulls and Optional, collections, generics, concurrency, streams, testing, and the JVM. A developer uses it while writing or reviewing Java code.

  • Rules for avoiding null, equality, and concurrency bugs in Java
  • Reference files for nulls/Optional, collections, generics, concurrency, streams, testing, and the JVM
  • Concise critical-rules list of common Java pitfalls

Java by the numbers

  • 8 all-time installs (skills.sh)
  • Ranked #74 of 89 Java & JVM skills by installs in the Skillselion catalog
  • Data as of Jul 30, 2026 (Skillselion catalog sync)
At a glance

Java capabilities & compatibility

Free reference; requires a local JDK (java/javac).

Capabilities
java review · concurrency review · code review
Use cases
code review · testing · debugging
Platforms
macOS · Linux · Windows
Runs
Runs locally
Pricing
Free
From the docs

What Java says it does

Write robust Java avoiding null traps, equality bugs, and concurrency pitfalls.
SKILL.md
`==` compares references, not content
SKILL.md
npx skills add https://github.com/bighardperson/computer-science-skills-collection --skill java

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs8
repo stars33
Last updatedApril 26, 2026
Repositorybighardperson/computer-science-skills-collection

What it does

Write and review robust Java code that avoids null, equality, and concurrency pitfalls.

Who is it for?

Developers writing or reviewing Java who want to avoid common correctness pitfalls.

When should I use this skill?

You are writing or reviewing Java and need to avoid null, equality, or concurrency bugs.

By the numbers

  • 8 reference topic files
  • Integer caching from -128 to 127

Files

SKILL.mdMarkdownGitHub ↗

Quick Reference

TopicFile
Nulls, Optional, autoboxingnulls.md
Collections and iteration trapscollections.md
Generics and type erasuregenerics.md
Concurrency and synchronizationconcurrency.md
Classes, inheritance, memoryclasses.md
Streams and CompletableFuturestreams.md
Testing (JUnit, Mockito)testing.md
JVM, GC, modulesjvm.md

Critical Rules

  • == compares references, not content — always use .equals() for strings
  • Override equals() must also override hashCode() — HashMap/HashSet break otherwise
  • Optional.get() throws if empty — use orElse(), orElseGet(), or ifPresent()
  • Modifying while iterating throws ConcurrentModificationException — use Iterator.remove()
  • Type erasure: generic type info gone at runtime — can't do new T() or instanceof List<String>
  • volatile ensures visibility, not atomicity — count++ still needs synchronization
  • Unboxing null throws NPE — Integer i = null; int x = i; crashes
  • Integer == Integer uses reference for values outside -128 to 127 — use .equals()
  • Try-with-resources auto-closes — implement AutoCloseable, Java 7+
  • Inner classes hold reference to outer — use static nested class if not needed
  • Streams are single-use — can't reuse after terminal operation
  • thenApply vs thenCompose — compose for chaining CompletableFutures
  • Records are implicitly final — can't extend, components are final
  • serialVersionUID mismatch breaks deserialization — always declare explicitly

Related skills

Java & JVMbackend

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.