本文へスキップ
Skillpedia
APIとサーバー(バックエンド)12k · #11430

java-architect

できること

セキュリティとデータベースの性能が必要な、エンタープライズ向けのJavaのサービスを、Spring Boot 3で作るようエージェントを導きます。バックエンドのシステムを作るJava開発者向けです。

使う場面

  • ✓Spring Boot 3のアプリを作るか、デバッグしているとき。
  • ✓OAuth2やJWTを使うSpring Securityを設定する必要があるとき。
  • ✓JPAのアプリでデータベースのクエリが遅く、調整が必要なとき。

スキルのリンク

https://github.com/Jeffallan/claude-skills/blob/main/skills/java-architect/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/Jeffallan/claude-skills/blob/main/skills/java-architect/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“私のSpring Boot 3のアプリにJWTのログインを使うSpring Securityを設定し、エンドポイントが保護されていることを確かめてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは、プロジェクトの構造と設定を確認し、ドメインモデルを設計して、サービスを実装します。そのあと、MavenまたはGradleのビルドを実行し、テストのカバレッジとクエリの正しさを確認します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Java Architect

Enterprise Java specialist focused on Spring Boot 3.x, microservices architecture, and cloud-native development using Java 21 LTS.

Core Workflow

  1. Architecture analysis - Review project structure, dependencies, Spring config
  2. Domain design - Create models following DDD and Clean Architecture; verify domain boundaries before proceeding. If boundaries are unclear, resolve ambiguities before moving to implementation.
  3. Implementation - Build services with Spring Boot best practices
  4. Data layer - Optimize JPA queries, implement repositories; run ./mvnw verify -pl <module> to confirm query correctness. If integration tests fail: review Hibernate SQL logs, fix queries or mappings, re-run before proceeding.
  5. Security & config - Apply Spring Security, externalize configuration, add observability; run ./mvnw verify after security changes to confirm filter chain and JWT wiring. If tests fail: check SecurityFilterChain bean order and token validation config, then re-run.
  6. Quality assurance - Run ./mvnw verify (Maven) or ./gradlew check (Gradle) to confirm all tests pass and coverage reaches 85%+ before closing. If coverage is below threshold: identify untested branches via JaCoCo report (target/site/jacoco/index.html), add missing test cases, re-run.

Reference Guide

Load detailed guidance based on context:

Topic Reference Load When
Spring Boot references/spring-boot-setup.md Project setup, configuration, starters
Reactive references/reactive-webflux.md WebFlux, Project Reactor, R2DBC
Data Access references/jpa-optimization.md JPA, Hibernate, query tuning
Security references/spring-security.md OAuth2, JWT, method security
Testing references/testing-patterns.md JUnit 5, TestContainers, Mockito

Constraints

MUST DO

  • Use Java 21 LTS features (records, sealed classes, pattern matching)
  • Apply database migrations (Flyway/Liquibase)
  • Document APIs with OpenAPI/Swagger
  • Use proper exception handling hierarchy
  • Externalize all configuration (never hardcode values)

MUST NOT DO

  • Use deprecated Spring APIs
  • Skip input validation
  • Store sensitive data unencrypted
  • Use blocking code in reactive applications
  • Ignore transaction boundaries

Output Templates

When implementing Java features, provide:

  1. Domain models (entities, DTOs, records)
  2. Service layer (business logic, transactions)
  3. Repository interfaces (Spring Data)
  4. Controller/REST endpoints
  5. Test classes with comprehensive coverage
  6. Brief explanation of architectural decisions

Code Examples

Minimal WebFlux REST Endpoint

@RestController
@RequestMapping("/api/v1/orders")
@RequiredArgsConstructor
public class OrderController {

    private final OrderService orderService;

    @GetMapping("/{id}")
    public Mono<ResponseEntity<OrderDto>> getOrder(@PathVariable UUID id) {
        return orderService.findById(id)
                .map(ResponseEntity::ok)
                .defaultIfEmpty(ResponseEntity.notFound().build());
    }

    @PostMapping
    @ResponseStatus(HttpStatus.CREATED)
    public Mono<OrderDto> createOrder(@Valid @RequestBody CreateOrderRequest request) {
        return orderService.create(request);
    }
}

JPA Repository with Optimized Query

public interface OrderRepository extends JpaRepository<Order, UUID> {

    // Avoid N+1: fetch association in one query
    @Query("SELECT o FROM Order o JOIN FETCH o.items WHERE o.customerId = :customerId")
    List<Order> findByCustomerIdWithItems(@Param("customerId") UUID customerId);

    // Projection to limit fetched columns
    @Query("SELECT new com.example.dto.OrderSummary(o.id, o.status, o.total) FROM Order o WHERE o.status = :status")
    Page<OrderSummary> findSummariesByStatus(@Param("status") OrderStatus status, Pageable pageable);
}

Spring Security OAuth2 JWT Configuration

@Configuration
@EnableMethodSecurity
public class SecurityConfig {

    @Bean
    public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
        return http
                .csrf(AbstractHttpConfigurer::disable)
                .sessionManagement(s -> s.sessionCreationPolicy(STATELESS))
                .authorizeHttpRequests(auth -> auth
                        .requestMatchers("/actuator/health").permitAll()
                        .anyRequest().authenticated())
                
よくある質問

どのJavaのバージョンを使いますか?

Java 21 LTSとSpring Boot 3.xで動きます。

どのカバレッジを目指しますか?

JaCoCoのレポートで抜けを見つけ、85パーセント以上のテストカバレッジを目指します。

リアクティブプログラミングにも対応していますか?

はい。WebFluxのエンドポイントと、非同期処理を扱います。

詳細

作者による元の説明

Use when building, configuring, or debugging enterprise Java applications with Spring Boot 3.x, microservices, or reactive programming. Invoke to implement WebFlux endpoints, optimize JPA queries and database performance, configure Spring Security with OAuth2/JWT, or resolve authentication issues and async processing challenges in cloud-native Spring applications.

repo: Jeffallan/claude-skills

人気

GitHubのスター
12k
ランキング
#11430
ライセンス
MIT
更新日
2026/10/30

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル