跳到正文
cccskills
免费在 GitHub 公开

java-architect

Build and debug Java applications with Spring Boot 3.x. This skill guides application design, API implementation, database query tuning, authentication, and testing, including WebFlux applications that process requests without blocking.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

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.

查看安装方法

适用场景

  • Build APIs with Spring Boot
  • Improve slow JPA queries
  • Configure OAuth2/JWT authentication
  • Debug WebFlux and asynchronous processing

包含的文件(6)

  • SKILL.md5.7 KB
  • references/jpa-optimization.md10.6 KB
  • references/reactive-webflux.md9.2 KB
  • references/spring-boot-setup.md7.6 KB
  • references/spring-security.md14.8 KB
  • references/testing-patterns.md14.5 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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:

TopicReferenceLoad When
Spring Bootreferences/spring-boot-setup.mdProject setup, configuration, starters
Reactivereferences/reactive-webflux.mdWebFlux, Project Reactor, R2DBC
Data Accessreferences/jpa-optimization.mdJPA, Hibernate, query tuning
Securityreferences/spring-security.mdOAuth2, JWT, method security
Testingreferences/testing-patterns.mdJUnit 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())
                .oauth2ResourceServer(oauth2 -> oauth2.jwt(Customizer.withDefaults()))
                .build();
    }
}

Knowledge Reference

Spring Boot 3.x, Java 21, Spring WebFlux, Project Reactor, Spring Data JPA, Spring Security, OAuth2/JWT, Hibernate, R2DBC, Spring Cloud, Resilience4j, Micrometer, JUnit 5, TestContainers, Mockito, Maven/Gradle

Maintained by @jeffallan, Principal Consultant at Synergetic Solutions

Documentation

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Build Angular 17+ applications with standalone components, routing, and shared application state. Covers reactive data handling with RxJS, performance improvements, and unit and integration tests, with code and explanations of architecture choices.

中文简介正在准备中。当前显示英语简介。

  • Building Angular screens with standalone components
  • Managing shared application state with NgRx
  • Configuring lazy-loaded routes and access guards
Jeffallan/claude-skills1.2万2026年10月17日 更新

Design REST or GraphQL APIs by defining data relationships, requests, responses, and authentication. Produce OpenAPI specifications, machine-readable API descriptions, with consistent errors, pagination, and versioning plans, then validate contracts using a mock server.

中文简介正在准备中。当前显示英语简介。

  • Designing a new API from business requirements
  • Creating and validating OpenAPI specifications
  • Standardizing errors and paginated responses
Jeffallan/claude-skills1.2万2026年10月17日 更新

Design or review a system’s overall structure, compare technology choices, and plan for growth and failures. Produce architecture diagrams and Architecture Decision Records, documents that explain key choices, alternatives, and their consequences.

中文简介正在准备中。当前显示英语简介。

  • Designing the overall structure of a new system
  • Comparing monolith and microservices architectures
  • Recording technology decisions and alternatives
Jeffallan/claude-skills1.2万2026年10月17日 更新

Connect AI agents to Jira and Confluence through MCP, a protocol for accessing external tools. This skill guides issue searches and updates, page management, sprint workflows, authentication setup, and troubleshooting of Atlassian integrations.

中文简介正在准备中。当前显示英语简介。

  • Find Jira issues by assignee or status
  • Search and update Confluence pages
  • Turn meeting notes into Jira ticket updates
Jeffallan/claude-skills1.2万2026年10月17日 更新

Design controlled failure experiments for distributed systems to examine how services recover. Produce failure injection scripts, monitoring plans, rollback procedures, and exercise guides, then turn findings into documented improvements.

中文简介正在准备中。当前显示英语简介。

  • Planning controlled failure experiments
  • Testing recovery after Kubernetes Pod failures
  • Checking service behavior under network delays
Jeffallan/claude-skills1.2万2026年10月17日 更新

Design and implement command-line tools with subcommands, options, interactive prompts, and progress indicators. Get command structures, configuration handling, clear error messages, and shell completion scripts, with guidance for automated use and testing across operating systems.

中文简介正在准备中。当前显示英语简介。

  • Build a command-line tool with subcommands and options
  • Add interactive prompts and progress indicators
  • Provide bash, zsh, and fish command completion
Jeffallan/claude-skills1.2万2026年10月17日 更新

查看 Jeffallan 的全部技能

报告此技能的问题