Skip to main content
skill CX Codex

java — Claude Code skill: Spring Boot and enterprise Java

A skill that tells the agent how to write Java: layered structure, Spring Boot 3.x, JUnit and Mockito tests. Useful when a Java codebase needs one consistent style.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Mindrally/skills --skill java -a claude-code
Open on GitHub

What java does

The skill is a rule set for the agent when it writes Java. It covers clean code, Java 17+ features, SOLID with high cohesion and low coupling, and naming conventions (PascalCase for classes, camelCase for methods).

Spring Boot 3.x gets its own section: constructor injection instead of field injection, exception handling through @ControllerAdvice and @ExceptionHandler, Spring Data JPA for database work, Spring Security for auth. Code is organised in layers — controller, service, repository — with DTOs and Bean Validation. There is an alternative track too: Quarkus with Dev Mode, GraalVM native builds, CDI annotations and MicroProfile APIs.

Testing means JUnit and Mockito plus integration tests. Performance advice is connection pooling, caching and query profiling. One thing to know: the rules assume Java 17+ and Spring Boot 3.x, so on an older stack the agent will have to skip part of them.

What it helps with

  • split code into controller, service and repository layers
  • move dependency injection from fields to constructors
  • set up global exception handling with @ControllerAdvice
  • add Bean Validation to request DTOs
  • pick between Spring Boot and Quarkus for a new service

Example prompts for the agent

  • add a new REST controller for orders following the java skill
  • rewrite this service to use constructor injection
  • write an integration test with JUnit and Mockito for the repository

How to install java

1Skills CLI (Vercel)

npx skills add Mindrally/skills --skill java -a claude-code

2Manually: put the files in place

~/.claude/skills/java/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/java/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about java

How do I install the java skill in Claude?

Run npx skills add Mindrally/skills --skill java -a claude-code. The skill file lands at ~/.claude/skills/java/SKILL.md.

What does the java skill do?

It gives the agent rules for Java work: Spring Boot 3.x, layered structure, DTOs, validation, JUnit and Mockito tests. The agent follows them while writing or editing code.

Do I need Spring Boot to use it?

Most rules target Spring Boot 3.x, but there is a Quarkus section with CDI, MicroProfile and GraalVM builds. A Quarkus project can use the skill as well.

Source text

SKILL.md · Apache-2.0
---
name: java
description: Expert in Java development with Spring Boot and enterprise patterns
metadata:
  maintainer: Mindrally
  source: https://github.com/Mindrally/skills
---

# Java

You are an expert in Java development with deep knowledge of Spring Boot, enterprise patterns, and modern Java features.

## Core Principles

- Write clean, efficient, and well-documented Java code
- Follow Java 17+ features and best practices
- Apply SOLID principles with high cohesion and low coupling
- Use proper naming conventions (PascalCase for classes, camelCase for methods)

## Spring Boot

- Follow Spring Boot 3.x best practices
- Use constructor injection over field injection
- Implement proper exception handling via `@ControllerAdvice` and `@ExceptionHandler`
- Leverage Spring Data JPA for database operations
- Use Spring Security for authentication and authorization

## Code Structure

- Organize code in layers (controller, service, repository)
- Use DTOs for data transfer
- Implement proper validation with Bean Validation
- Follow RESTful API design principles

## Quarkus (Alternative)

- Utilize Quarkus Dev Mode for faster development cycles
- Optimize for GraalVM native builds
- Use CDI annotations (@Inject, @Named, @Singleton)
- Implement MicroProfile APIs for enterprise applications
- Focus on reactive patterns with Vert.x or Mutiny

## Testing

- Write unit tests with JUnit
- Use Mockito for mocking dependencies
- Implement integration tests
- Follow test-driven development practices

## Performance

- Use connection pooling
- Implement caching strategies
- Optimize database queries
- Profile and monitor applications

## Error Handling

- Use proper exception hierarchy
- Implement global exception handling
- Return meaningful error responses
- Log errors appropriately

## Dependencies

- Spring Boot, Spring Framework
- Maven or Gradle
- JUnit, Mockito
- Quarkus, Jakarta EE, MicroProfile (alternative stack)

© Mindrally · Apache-2.0 · Mindrally/skills

Similar skills

All skills for Programming languages →

From the same set168

python This skill tells your coding agent how to write Python: PEP 8, type hints, early returns, async for I/O. Useful when the agent edits or generates code in a Python repo. CX Codex +1 983installs nlp-natural-language-processing Technical guidelines for natural language processing tasks using transformers, spaCy, and NLTK. Guides agents on proper tokenization, entity extraction, and vector search. CX Codex +1 980installs ui-design Gives the agent a checklist for interfaces: accessibility, responsive layout, performance. Useful when it writes or reviews frontend code. CX Codex +1 981installs internationalization-i18n This skill gives the agent a rulebook for internationalization: translations, locale-aware dates and numbers, RTL layout. Useful when an app ships in more than one language. CX Codex +1 978installs zustand-state-management Enforces Zustand store best practices in React and TypeScript apps, covering store slices, SSR, and testing. It helps eliminate selector re-renders and hydration bugs. CX Codex +1 959installs typescript Enforces strict TypeScript standards and functional code patterns in your AI assistant. It bans any, replaces enums with maps, and caps function length at 20 lines. CX Codex +1 955installs python-uv Makes the agent manage Python packages through uv only, no pip or poetry. Useful when the project already runs on uv or when environments keep drifting apart. CX Codex +1 956installs pixi-js A skill that steers your coding agent toward performant Pixi.js games in TypeScript, with mobile and rendering advice baked in. CX Codex +1 948installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor