raidan-ai/opencode-settings/java
Claude Code and agent skill by raidan-ai/opencode-settings
- community
Checking that the SKILL.md file is still in the repository.
Java development skill covering JDK/build tools (Maven, Gradle), Spring Boot (autoconfiguration, starters, embedded Tomcat), Jakarta EE basics, JDBC/JPA/Hibernate, records/sealed classes, streams/lambdas, concurrency (virtual threads), JUnit 5, Maven/Gradle lifecycle, JAR packaging, application properties, error handling, logging (SLF4J/Logback), testing (Mockito, Testcontainers), performance (JVM flags, GC), and security (OWASP, input validation). Use when building, extending, or debugging Jav…
Install
npx vskill@latest install raidan-ai/opencode-settings/javaSKILL.md
The same SKILL.md was published earlier as raidan-ai/opencode-settings/java.
Java Skill
Purpose
Provides production-grade Java development capabilities: build tools (Maven/Gradle), Spring Boot, JPA/Hibernate, records/sealed classes and modern language features, streams/lambdas, concurrency including virtual threads, JUnit 5 testing with Mockito and Testcontainers, JVM performance tuning, and security hardening.
When to Activate
- Scaffolding or building a Spring Boot application
- Authoring Maven or Gradle builds and managing dependencies
- Writing JPA/Hibernate entities and repositories
- Using Java 17+ features: records, sealed classes, streams, pattern matching
- Handling concurrency, including virtual threads (Project Loom)
- Writing unit/integration tests with JUnit 5, Mockito, Testcontainers
- Configuring application properties and profiles
- Implementing error handling and structured logging
- Tuning the JVM (flags, GC) and analyzing performance
- Hardening security (OWASP, input validation)
Core Knowledge
Build Tools
- Maven:
pom.xml, lifecycle (validate, compile, test, package, install),mvn spring-boot:run,mvn package. - Gradle:
build.gradle/build.gradle.kts,gradle bootRun,gradle build.
Spring Boot
- Starters bundle dependencies:
spring-boot-starter-web,-data-jpa,-security,-test. - Autoconfiguration wires beans from classpath; override via configuration classes and
application.properties. - Embedded Tomcat runs the app standalone (
mvn spring-boot:runorjava -jar app.jar).
Language Modernity (17+)
Workflow
- Scaffold — use Spring Initializr (start.spring.io) or
spring init; select starters and build tool. - Define build — configure
pom.xml/build.gradlewith dependencies and compiler release target. - Model data — create JPA entities and Spring Data repositories.
- Add logic — services with DI (
@Service, constructor injection), controllers (@RestController). - Configure —
application.properties/application.ymlwith profiles (dev/prod). - Secure — Spring Security, input validation (
@Valid, Bean Validation), OAuth/JWT as needed. - Test — JUnit 5 unit tests with Mockito; integration with Testcontainers;
mvn test. - Package/run —
mvn package→java -jar target/app.jar; tune JVM flags for production.
Tools
- Maven / Gradle — build and dependency management.
- Spring Boot CLI / Initializr — scaffolding.
- JUnit 5, Mockito, Testcontainers — testing.
- SLF4J + Logback — structured logging.
- JFR / JMC, jcmd, jstack — JVM profiling and diagnostics.
- Hibernate — JPA ORM.
MCP Requirements
No official Java MCP server is required. f4 (github.com/f4-dev/f4) is an optional community MCP server for Java projects — mention it but do not configure by default until verified.
Best Practices
- Favor records for immutable data carriers and immutable value objects.
- Use constructor injection over field injection in Spring beans.
- Program to interfaces; depend on abstractions.
- Use streams sparingly — avoid complex pipelines that hurt readability.
- Prefer virtual threads for lightweight concurrency where appropriate.
- Use
logger.info/debug/errorvia SLF4J; neverSystem.out. - Enable structured logging and request IDs in production.
- Use Bean Validation annotations on request DTOs.
- Pin dependency versions in build files; run the security/dependency audit plugin.
- Set JVM flags for production (
-Xms/-Xmx, choose GC like G1/ZGC appropriately).
Anti-patterns
- Using field injection without justification (breaks testability).
- Swallowing exceptions with empty catches — always log and propagate/handle.
- Logging sensitive data (passwords, tokens, PII).
- Exposing internal exceptions/stack traces in HTTP responses.
- Ignoring N+1 queries in JPA — tune fetch strategies and use
@EntityGraph. - Hardcoding config values instead of
application.properties/env. - Running without
@Transactionalwhere transactions are required. - Disabling input validation or relying on client-side validation alone.
- Building fat JARs with unnecessary transitive dependencies (bloat/security).
Verification
mvn clean verify(orgradle build) passes — compile + tests.mvn dependency:check/ GradledependencyUpdatesshow no known-vulnerable deps.- App starts and responds (
curl localhost:8080/actuator/health→ UP). - Logs show no uncaught exceptions or leaked stack traces.
- JUnit reports all tests green; integration tests with Testcontainers pass.
- Check with
jcmd/JFR that memory/GC behave within expectations under load. - Confirm profiles load correct config per environment.
Examples
Spring Boot REST controller with validation:
JPA entity + repository:
Record + service:
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/opencode/java/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/raidan-ai/opencode-settings/java)