Skip to content
Development
Skill

/java-programmer

Java-specific tooling, documentation standards, testing practices, and modern idioms. Use when working with Java code or Java-based projects on the JVM.

From plugin
opinionated-claude-skills
919 skills3 agents

Claude Code

$ npx -y skills add Pyroxin/opinionated-claude-skills --skill java-programmer --agent claude-code

SKILL.md

java-programmer.SKILL.md
name: java-programmer
description: Java-specific tooling, documentation standards, testing practices, and modern idioms. Use when working with Java code or Java-based projects on the JVM.

Java Programmer

Purpose

This skill provides guidance on Java-specific tooling, documentation standards, testing practices, and modern Java idioms. Java is a statically-typed, object-oriented language with a massive ecosystem and strong backwards compatibility guarantees. This skill focuses on navigating the Java ecosystem effectively, writing maintainable Java code, and applying functional programming concepts within Java's constraints.

When to Use This Skill

Use this skill when:

  • Working with Java codebases (any version, but especially Java 8+)
  • Making decisions about build tools, testing frameworks, or dependencies
  • Writing Javadoc documentation
  • Writing JUnit tests
  • Applying functional programming patterns in Java
  • Navigating the JVM ecosystem (choosing between JVM languages)

<core_philosophy>

Core Philosophy

**For foundational software engineering principles, see the software-engineer skill. For OOP principles (SOLID, GoF patterns), see the object-oriented-programmer skill.**

Java's Strengths and Constraints

Java excels in specific contexts but has limitations compared to more modern languages.

**Where Java shines:**

  • **Enterprise systems** — Mature ecosystem, strong tooling, extensive libraries
  • **Team stability** — Explicit types, verbose code, fewer "clever" tricks
  • **Long-term maintenance** — Backwards compatibility, gradual evolution
  • **JVM ecosystem** — Interop with Kotlin, Scala, Clojure, Groovy
  • **Performance** — JIT compilation, mature garbage collectors, profiling tools

**Where Java struggles:**

  • **Rapid prototyping** — Verbosity slows iteration
  • **Functional programming** — Retrofitted features, verbose syntax
  • **Type system** — Lacks algebraic data types, pattern matching (until recent versions)
  • **Ceremony** — Boilerplate reduces signal-to-noise ratio

**Staff insight:** If you're writing Java professionally but prefer functional languages, focus on using modern Java features (streams, Optional, lambdas) to bring functional thinking into Java's constraints. Don't fight the language—work within its idioms.

Documentation as Contract

Javadoc is more than comments—it's a contract between API and client. Treat it as seriously as the code itself.

**Quote to remember:** "Code is read more often than written." — Guido van Rossum. Documentation is read even more often than that. </core_philosophy>

<type_annotations>

Type Annotations and The Checker Framework Are Mandatory

Java's type system lacks many important guarantees. Type annotations with The Checker Framework enable compile-time verification of properties that the type system doesn't enforce.

**Why type annotations and static analysis matter:**

  • **Critical for LLM-assisted development** — Explicit contracts enable better code generation and reasoning
  • Eliminate entire classes of errors at compile time (NullPointerException, regex errors, format string bugs)
  • Make API contracts machine-readable (not just documented in Javadoc)
  • Enable static analysis to catch bugs before runtime
  • Self-documenting code (contracts visible in signatures)

**The Checker Framework is mandatory for all new projects:**

  • Use **JSpecify annotations** for nullness (`@Nullable`, `@NonNull` via defaults)
  • JSpecify provides multi-tool compatibility (works with Checker Framework, IntelliJ, NullAway, etc.)
  • Enable as many Checker Framework checkers as practical:
  • **Nullness Checker** (via JSpecify annotations) — Prevent NullPointerException
  • **Optional Checker** — Enforce proper Optional usage
  • **Regex Checker** — Verify regex string validity at compile time
  • **Format String Checker** — Verify printf/format string correctness
  • **Interning Checker** — Ensure string interning correctness
  • **Index Checker** — Prevent array bounds errors
  • **Lock Checker** — Verify lock usage and prevent race conditions
  • Additional checkers as applicable to domain

**Example with JSpecify nullness annotations:**

import org.jspecify.annotations.Nullable;
// @NonNull is the default assumption (no annotation needed)

public class UserService {
    /**
     * Finds user by ID.
     *
     * @param id the user ID (must not be null, default assumption)
     * @return user if found, null otherwise
     */
    public @Nullable User findById(String id) {
        // Checker verifies: id cannot be null (default @NonNull)
        // Checker requires: callers handle possible null return
        return repository.findById(id).orElse(null);
    }

    /**
     * Gets user display name.
     *
     * @param user the user (must not be null, default assumption)
     * @return display name (never null, default assumption)
     */
    public String getDisplayName(User user) {
        // Checker verifies: user cannot be null
        // Checker enforces: return value cannot be null
        String name = user.getName();
        return name != null ? name : "Guest";
    }
}

**Example with other Checker Framework annotations:**

import org.checkerframework.checker.regex.qual.Regex;
import org.checkerframework.checker.formatter.qual.FormatMethod;

public class ValidationService {
    /**
     * Validates input against pattern.
     *
     * @param input the input string
     * @param pattern the regex pattern (verified at compile time)
     * @return true if input matches pattern
     */
    public boolean matches(String input, @Regex String pattern) {
        // Checker verifies: pattern is valid regex at compile time
        return input.matches(pattern);
    }

    /**
     * Logs formatted message.
     *
     * @param format the format string (verified at compile time)
     * @param args the format arguments
     */
    @FormatMethod
    public void logFormatted(String format, Object... args) {
Read more
@pyroxin
Ships withopinionated-claude-skills

This project descends from the personal prompts I'd been keeping for Claude Code prior to the release of skills and plugins. Over time it's also evolved into a sandbox where I figure out what makes Claude reliably good at a task, and find prompts that work.

919 skills3 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
9
Star history of Pyroxin/opinionated-claude-skills on GitHub, a chart by star-history.com

Other skills on opinionated-claude-skills.

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills10d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about java-programmer.

Which coding agents can use java-programmer?
java-programmer installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.