← スキル一覧に戻る

java-patterns
by Zate
⭐ 4🍴 0📅 2026年1月24日
SKILL.md
name: java-patterns description: This skill should be used for Java/Spring patterns, dependency injection, streams, Optional, Kotlin, Spring Boot, Maven, Gradle, JVM backend whenToUse: Java code, Spring Boot, JUnit, Kotlin, .java files, .kt files, Maven, Gradle, JVM backend, Spring framework, Jakarta EE whenNotToUse: Non-JVM code, Android-specific (use Android docs) seeAlso:
- skill: testing-strategies when: JUnit test architecture
- skill: api-design when: Spring REST APIs
- skill: architecture-patterns when: Java application structure
Java Patterns
Idiomatic Java/Spring patterns for Java 17+.
Records
public record User(String name, String email) {}
Optional
Optional.ofNullable(user)
.map(User::getEmail)
.orElse("default@example.com");
Streams
List<String> names = users.stream()
.filter(u -> u.isActive())
.map(User::getName)
.collect(Collectors.toList());
Spring Dependency Injection
@Service
public class UserService {
private final UserRepository repo;
public UserService(UserRepository repo) {
this.repo = repo;
}
}
JUnit 5
@Test
void shouldReturnUser() {
User user = service.findById(1L);
assertThat(user.getName()).isEqualTo("test");
}
@ParameterizedTest
@ValueSource(strings = {"a", "b", "c"})
void shouldValidate(String input) {
assertTrue(validator.isValid(input));
}
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です