create-slidev-presenta…
Build or edit Slidev (sli.dev) presentations for tech talks, workshops, conference sessions, and live-coding demos. Use when the user asks to create slides, a…
Java coding standards for enterprise applications. Includes naming conventions, modern Java features, design patterns, and recommended tooling.
$ npx -y skills add b33eep/claude-code-setup --skill standards-java --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/standards-javaContext preview
The summary Claude sees to decide when to auto-load this skill.
Java coding standards for enterprise applications. Includes naming conventions, modern Java features, design patterns, and recommended tooling.
name: standards-java description: Java coding standards for enterprise applications. Includes naming conventions, modern Java features, design patterns, and recommended tooling. type: context applies_to: [java, maven, gradle, junit, spring, jakarta, quarkus, mockito, testcontainers, hibernate, jpa] file_extensions: [".java"]
1. **Simplicity**: Simple, understandable code 2. **Readability**: Readability over cleverness 3. **Maintainability**: Code that's easy to maintain 4. **Testability**: Code that's easy to test 5. **SOLID**: Follow SOLID principles for object-oriented design 6. **DRY**: Don't Repeat Yourself - but don't overdo it
| Element | Convention | Example | |---------|------------|---------| | Classes | PascalCase | `UserService`, `OrderRepository` | | Interfaces | PascalCase | `UserRepository`, `PaymentProcessor` | | Methods | camelCase | `getUserById`, `calculateTotal` | | Variables | camelCase | `firstName`, `totalAmount` | | Constants | UPPER_SNAKE_CASE | `MAX_RETRY_COUNT`, `DEFAULT_TIMEOUT` | | Packages | lowercase.dot.separated | `com.example.service`, `com.example.repository` | | Test Classes | ClassNameTest | `UserServiceTest`, `OrderRepositoryTest` | | Test Methods | descriptive_snake_case or camelCase | `shouldReturnUserWhenIdExists` |
myproject/ ├── pom.xml ├── src/ │ ├── main/ │ │ ├── java/ │ │ │ └── com/example/myapp/ │ │ │ ├── Application.java # Main entry point │ │ │ ├── config/ │ │ │ │ └── AppConfig.java # Configuration │ │ │ ├── domain/ │ │ │ │ └── User.java # Domain models │ │ │ ├── repository/ │ │ │ │ └── UserRepository.java # Data access │ │ │ ├── service/ │ │ │ │ └── UserService.java # Business logic │ │ │ └── controller/ │ │ │ └── UserController.java # REST endpoints │ │ └── resources/ │ │ ├── application.properties │ │ └── application-dev.properties │ └── test/ │ ├── java/ │ │ └── com/example/myapp/ │ │ ├── service/ │ │ │ └── UserServiceTest.java │ │ └── repository/ │ │ └── UserRepositoryTest.java │ └── resources/ │ └── application-test.properties └── README.md
myproject/ ├── build.gradle or build.gradle.kts ├── settings.gradle or settings.gradle.kts ├── src/ │ ├── main/ │ │ └── java/... # Same structure as Maven │ └── test/ │ └── java/... # Same structure as Maven └── README.md
> **Recommended:** Use the latest LTS for new projects (currently Java 21 or Java 25).
// Replace verbose POJOs with records
public record User(String id, String name, String email) {
// Compact constructor for validation
public User {
if (name == null || name.isBlank()) {
throw new IllegalArgumentException("Name cannot be blank");
}
}
// Custom methods allowed
public String displayName() {
return name.toUpperCase();
}
}
// Usage
var user = new User("1", "John Doe", "john@example.com");
System.out.println(user.name()); // Auto-generated accessor// Define closed set of subclasses
public sealed interface Result<T>
permits Success, Failure {
}
public record Success<T>(T value) implements Result<T> {}
public record Failure<T>(String error) implements Result<T> {}
// Pattern matching exhaustiveness
public <T> void handleResult(Result<T> result) {
switch (result) {
case Success<T> s -> System.out.println("Success: " + s.value());
case Failure<T> f -> System.out.println("Error: " + f.error());
// No default needed - compiler knows all cases
}
}// Old way
if (obj instanceof String) {
String s = (String) obj;
System.out.println(s.toUpperCase());
}
// Modern way - pattern matching
if (obj instanceof String s) {
System.out.println(s.toUpperCase());
}
// Pattern matching in switch
public String formatValue(Object obj) {
return switch (obj) {
case Integer i -> "Number: " + i;
case String s -> "Text: " + s;
case null -> "null";
default -> "Unknown: " + obj;
};
}// Old way
String json = "{\n" +
" \"name\": \"John\",\n" +
" \"age\": 30\n" +
"}";
// Modern way - text block
String json = """
{
"name": "John",
"age": 30
}
""";// Old switch statement
String result;
switch (day) {
case MONDAY:
case FRIDAY:
result = "Work";
break;
case SATURDAY:
case SUNDAY:
result = "Weekend";
break;
default:
result = "Unknown";
}
// Modern switch expression
String result = switch (day) {
case MONDAY, FRIDAY -> "Work";
case SATURDAY, SUNDAY -> "Weekend";
default -> "Unknown";
};// Traditional platform threads - expensive, limited scalability
try (var executor = Executors.newFixedThreadPool(100)) {
for (int i = 0; i < 10000; i++) {
executor.submit(() -> fetchData());
}
}
// Virtual threads - lightweight, millions possible
try (var executor = ExecutPersistent memory for Claude Code via Markdown files. 📖 Read the Documentation for detailed guides, tutorials, and reference.
Repo: b33eep/claude-code-setup
Build or edit Slidev (sli.dev) presentations for tech talks, workshops, conference sessions, and live-coding demos. Use when the user asks to create slides, a…
Guide users through creating, reviewing, and fixing custom skills for Claude — both command skills (invoked via /slash) and context skills (auto-loaded by tech…
Gradle build tool standards focusing on Kotlin DSL. Covers project configuration, dependency management, and custom plugin/task development with Gradle 9 LTS.
This skill provides JavaScript coding standards and is automatically loaded for JavaScript projects. It includes modern ES2025 patterns, async handling, and…
Kotlin coding standards for modern applications. Includes naming conventions, coroutines, flows, modern Kotlin 2.3.0 features, and recommended tooling.
This skill provides Python coding standards and is automatically loaded for Python projects. It includes naming conventions, best practices, and recommended…