
Coding Java
- 51 installs
- 6 repo stars
- Updated March 13, 2026
- alphaonedev/openclaw-graph
coding-java is a skill that helps an AI assistant write modern Java 21+ code including records, sealed classes, virtual threads, and Spring Boot 3 apps.
About
A coding skill that helps an AI assistant write and debug modern Java 21+ code. It covers records, sealed classes, pattern matching, and Project Loom virtual threads, plus Spring Boot 3 applications built with Maven or Gradle. A developer uses it when working on enterprise-grade JVM backends that need current language syntax.
- Java 21+ features: records, sealed classes, pattern matching, virtual threads
- Spring Boot 3 backend development
- Maven and Gradle build/dependency management
Coding Java by the numbers
- 51 all-time installs (skills.sh)
- Ranked #36 of 89 Java & JVM skills by installs in the Skillselion catalog
- Data as of Jul 28, 2026 (Skillselion catalog sync)
coding-java capabilities & compatibility
- Use cases
- api development · refactoring · debugging
What coding-java says it does
This skill enables the AI to assist with Java 21+ development, focusing on modern features like records, sealed classes, pattern matching, and virtual threads from Project Loom, plus Spring Boot 3 app
Implement sealed classes to limit subclasses: Use `sealed interface Shape permits Circle, Square {}`.
npx skills add https://github.com/alphaonedev/openclaw-graph --skill coding-javaAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 51 |
|---|---|
| repo stars | ★ 6 |
| Last updated | March 13, 2026 |
| Repository | alphaonedev/openclaw-graph ↗ |
What it does
Write and debug Java 21+ backend code using records, sealed classes, virtual threads, and Spring Boot 3.
Who is it for?
Java 21+ backends and Spring Boot 3 services using Maven or Gradle.
When should I use this skill?
Implementing sealed classes, pattern matching in switch, or virtual-thread concurrency in a Spring Boot 3 project.
By the numbers
- 6 key capabilities listed
Files
coding-java
Purpose
This skill enables the AI to assist with Java 21+ development, focusing on modern features like records, sealed classes, pattern matching, and virtual threads from Project Loom, plus Spring Boot 3 applications using Maven or Gradle for building and dependency management.
When to Use
Use this skill for projects requiring Java 21+ syntax, such as implementing sealed classes for restricted inheritance, pattern matching in switch statements, or scalable applications with virtual threads. Apply it in backend development with Spring Boot 3, or when managing builds with Maven/Gradle for enterprise-grade Java apps.
Key Capabilities
- Handle Java records for immutable data classes: Define with
record Point(int x, int y) {}. - Implement sealed classes to limit subclasses: Use
sealed interface Shape permits Circle, Square {}. - Utilize pattern matching in switch: Example:
switch (obj) { case String s -> process(s); default -> handleDefault(); }. - Manage virtual threads for concurrency: Launch with
Thread.startVirtualThread(() -> task());in Java 21+. - Build Spring Boot 3 apps: Configure with
@SpringBootApplicationand use embedded Tomcat. - Automate builds: Run Maven with
mvn spring-boot:runor Gradle withgradle bootRunfor project compilation.
Usage Patterns
To accomplish tasks, structure code or commands precisely. For example, to create a Java record for a data model: 1. Write: public record User(String name, int age) {}. 2. Use in main method: User user = new User("Alice", 30); System.out.println(user);.
Another example: Set up a Spring Boot 3 app with virtual threads. 1. Add dependency in pom.xml: <dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency>. 2. In controller: @RestController public class MyController { @GetMapping("/") public String home() { Thread.startVirtualThread(() -> logMessage()); return "Hello"; } }. 3. Run with Maven: mvn spring-boot:run --define spring.threads.virtual.enabled=true.
Common Commands/API
Use these exact commands for building and running projects:
- Maven:
mvn clean install -DskipTeststo compile;mvn spring-boot:runto start app. - Gradle:
gradle build --no-daemonfor compilation;gradle bootRun --args='--server.port=8080'for running. - Java API for virtual threads:
ExecutorService executor = Executors.newVirtualThreadPerTaskExecutor(); executor.submit(() -> { /* task code */ });. - Spring Boot API: Access endpoints like
http://localhost:8080/api/dataafter defining@GetMapping("/api/data") public ResponseEntity<?> getData() { return ResponseEntity.ok(data); }. - Config formats: Use application.properties for settings, e.g.,
server.port=8080; or YAML:server: port: 8080.
Integration Notes
Integrate by setting environment variables for secure keys, e.g., export $SPRING_API_KEY for external services in Spring Boot. For IDEs, add plugins like Spring Tools Suite and configure build tools: In VS Code, use extensions for Maven/Gradle. To link with databases, add dependencies in build.gradle: implementation 'org.springframework.boot:spring-boot-starter-data-jpa', then configure datasource in application.yml: spring.datasource.url=jdbc:mysql://localhost/dbname. Ensure Java 21+ is set via SDK manager.
Error Handling
Handle errors prescriptively: For build failures, check logs for "Compilation error" and fix syntax, e.g., if sealed class is misused, ensure all permitted subclasses are defined. For virtual threads, catch InterruptedException with try { Thread.startVirtualThread(() -> { throw new RuntimeException(); }); } catch (Exception e) { log.error(e.getMessage()); }. In Spring Boot, use @ExceptionHandler for API errors: @ControllerAdvice public class GlobalExceptionHandler { @ExceptionHandler(Exception.class) public ResponseEntity<?> handleError(Exception e) { return ResponseEntity.status(500).body("Error: " + e.getMessage()); } }. For Maven/Gradle, use --debug flag to diagnose, e.g., mvn clean install --debug.
Graph Relationships
- Related to: coding-general (via cluster 'coding' for shared coding tools).
- Connected to: coding-python (for cross-language development patterns).
- Links with: devops-deployment (for integrating Java builds with CI/CD pipelines).