spring-boot-3-expert
Skill22 starsChanged 3 months agoMITView on GitHub
Teaches an agent how to write modern Spring Boot 3 applications.
In this repository3 other files it gives its agents.
The file
Files
Spring Boot 3 Expert Skill
This skill provides guidelines and best practices for developing modern Spring Boot 3 applications.
Dependency Injection
Strictly forbid field injection (using @Autowired on fields). You must mandate constructor injection. Use final fields and Lombok's @RequiredArgsConstructor when appropriate to reduce boilerplate code.
Example Context:
@Service
@RequiredArgsConstructor
public class OrderService {
private final OrderRepository orderRepository;
private final PaymentClient paymentClient;
// No @Autowired needed; constructor generated by Lombok
}Architecture
Enforce a strict layered architecture:
- Controller Layer: Responsible only for HTTP request mapping and delegating to services.
- Service Layer: Contains the core business logic.
- Repository Layer: Handles data access and interactions with the database.
Example Context:
@RestController
@RequestMapping("/api/v1/orders")
@RequiredArgsConstructor
public class OrderController {
private final OrderService orderService;
@PostMapping
public ResponseEntity<OrderResponse> createOrder(@RequestBody @Valid OrderRequest request) {
return ResponseEntity.ok(orderService.processOrder(request));
}
}Data Modeling
Mandate the use of Java 14+ record types for all DTOs (Data Transfer Objects), Requests, and Responses. This ensures immutability and concise class definitions.
Example Context:
public record OrderRequest(
@NotBlank String customerId,
@Positive BigDecimal amount,
@NotEmpty List<String> itemIds
) {}Configuration
Emphasize the use of @ConfigurationProperties for managing application configuration over scattered @Value annotations to provide strongly-typed configuration.
Example Context:
@ConfigurationProperties(prefix = "app.payment")
public record PaymentProperties(
@NotBlank String apiUrl,
@Min(1000) int timeoutMs,
int maxRetries
) {}Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

