/java-development:java-springbootfrom java-development
Applies Spring Boot best practices for project structure, dependency injection, configuration, REST controllers, DTO validation, services, transactions, Spring Data JPA, logging, testing, and security. Use when asked for Spring Boot guidance or to implement Java backend code.
Ships in java-development. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Turn Spring Boot implementation requests into high-quality Java applications with domain-oriented packages, explicit dependencies, externalized configuration, validated APIs, transactional services, safe persistence, structured logging, and focused tests.
| Concern | Preferred approach | Avoid |
|---|---|---|
| Build tool | Maven pom.xml or Gradle build.gradle. | Manual dependency jars. |
| Dependencies | Spring Boot starters such as spring-boot-starter-web and spring-boot-starter-data-jpa. | Hand-picking transitive Spring libraries. |
| Packages | feature/domain packages such as com.example.app.order and com.example.app.user. | Layer-only packages such as com.example.app.controller, com.example.app.service, and repository for every domain. |
| Boundaries | Keep controller DTOs, service logic, repository contracts, and persistence models explicit. | Letting web, persistence, and domain concerns leak into each other. |
| Need | Use |
|---|---|
| Required dependencies | constructor-based injection with private final fields. |
| General bean | @Component. |
| Business operation | @Service. |
| Persistence adapter | @Repository. |
| MVC page controller | @Controller. |
| REST endpoint | @RestController. |
Do not use field injection for required collaborators. Constructor injection makes dependencies explicit, testable, and immutable.
| Concern | Rule |
|---|---|
| Files | Use application.yml or application.properties; prefer YAML for hierarchical settings when the project already uses it. |
| Type safety | Bind settings with @ConfigurationProperties to strongly-typed Java objects instead of scattering @Value keys. |
| Environments | Use Spring Profiles such as application-dev.yml and application-prod.yml for environment-specific configuration. |
| Secrets | Do not hardcode secrets. Use environment variables, HashiCorp Vault, AWS Secrets Manager, or the platform's secret store. |
| Area | Practice |
|---|---|
| REST API | Use clear resource-oriented endpoints and consistent status codes. |
| DTOs | Expose and consume DTOs; do not return JPA entities directly to clients. |
| Validation | Use Java Bean Validation / JSR 380 annotations such as @Valid, @NotNull, and @Size on request DTOs. |
| Errors | Centralize responses with @ControllerAdvice and @ExceptionHandler. |
| Sanitization | Prevent SQL injection with Spring Data JPA or parameterized queries; encode output to prevent Cross-Site Scripting (XSS). |
| Area | Practice |
|---|---|
| Business logic | Put business rules in @Service classes, not controllers or repositories. |
| Statelessness | Keep services stateless except for injected dependencies. |
| Transactions | Apply @Transactional at the most granular service method that owns the unit of work. |
| Repositories | Extend JpaRepository or CrudRepository for standard persistence. |
| Complex queries | Use @Query, the JPA Criteria API, or projections. |
| Read models | Use DTO projections to fetch only needed columns. |
| Topic | Rule |
|---|---|
| Logging API | Use SLF4J. Declare private static final Logger logger = LoggerFactory.getLogger(MyClass.class);. |
| Log messages | Prefer parameterized logging: logger.info("Processing user {}...", userId);. |
| Unit tests | Use JUnit 5 with Mockito for services and components. |
| Integration tests | Use @SpringBootTest when the full application context is required. |
| Test slices | Use @WebMvcTest for controllers and @DataJpaTest for repositories. |
| External dependencies in tests | Consider Testcontainers for real databases or brokers. |
| Authentication | Use Spring Security for authentication and authorization. |
| Passwords | Encode passwords with BCrypt. |
## Spring Boot implementation guidance
**Target:** <feature, class, or endpoint>
| Area | Recommendation | Concrete API or file |
| --- | --- | --- |
| Structure | <package/module choice> | `<package>` |
| Web | <controller/DTO/validation rule> | `@RestController`, `@Valid` |
| Service | <business logic and transaction boundary> | `@Service`, `@Transactional` |
| Data | <repository/query/projection rule> | `JpaRepository`, `@Query` |
| Tests | <unit/slice/integration strategy> | `@WebMvcTest`, `@DataJpaTest`, `@SpringBootTest` |
### Risks to avoid
- <anti-pattern and correction>
private final fields.application.yml or application.properties, with secrets outside source code.@Transactional at the right boundary.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
4 skills in this plugin
/create-spring-boot-java-projectCreate a Spring Boot Java project skeleton from Spring Initializr with Maven, Java 21, common data dependencies, SpringDoc, ArchUnit, local Docker Compose services for Redis, PostgreSQL, and MongoDB, application.properties settings, .gitignore entries, and Maven validation. Use when asked to create or scaffold a Spring Boot Java project./java-docsWrite and review Java Javadoc comments for public, protected, generic, deprecated, and complex members. Use this skill when the user asks for Java documentation, Javadoc best practices, missing comments, API docs, or documentation cleanup in Java code./java-junitApply JUnit 5 best practices for Java tests, including Maven or Gradle setup, standard and parameterized tests, lifecycle hooks, assertions, Mockito isolation, tags, nested tests, and test commands. Use when asked for JUnit 5+ guidance or to write Java unit tests.npx claudepluginhub gbb-acelerators/awesome-harness-primitives --plugin java-developmentOther plugins' skills for the same job