Java

Write robust Java avoiding null traps, equality bugs, and concurrency pitfalls.

MIT-0 · Free to use, modify, and redistribute. No attribution required.
7 · 1.6k · 11 current installs · 11 all-time installs
byIván@ivangdavila
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the content: Java guidance on nulls, equality, concurrency, etc. Declared binary requirements (java, javac) are reasonable and proportional for a Java-focused skill (they are only required/checked, not used to access unrelated services). No unrelated environment variables or credentials are requested.
Instruction Scope
SKILL.md and the included markdown files are purely documentation and coding guidance. They do not instruct the agent to read system files, access credentials, call external endpoints, or perform actions outside producing or validating Java code.
Install Mechanism
No install spec (instruction-only). Nothing is downloaded or written to disk by the skill package itself, minimizing install-time risk.
Credentials
The skill requires no environment variables or credentials. The lack of secrets or config-path requirements is proportional to a documentation/reference skill.
Persistence & Privilege
Skill is not marked always:true and does not request persistent system changes. It is user-invocable and can be invoked autonomously per platform defaults—appropriate for a reference skill. There is no evidence it modifies other skills or system-wide settings.
Assessment
This skill is a read-only collection of Java best-practice notes and appears low-risk. Before installing, verify you trust the skill source if that matters for governance; ensure your agent environment has legitimate java/javac binaries if the platform will validate those. Because the skill is allowed to be invoked autonomously by default, be aware an agent could use the guidance to write or suggest code during automated runs — but the skill itself does not request credentials, perform network calls, or install software.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.1
Download zip
latestvk973qmab2n16zydspea55xtkzs815ymf

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

Runtime requirements

Clawdis
OSLinux · macOS · Windows
Binsjava, javac

SKILL.md

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

Files

9 total
Select a file
Select a file to preview.

Comments

Loading comments…