Skip to main content
skill CX Codex

303-frameworks-spring-boot-validation — Claude Code skill for Spring

A skill that tells your coding agent how to design and review Spring Boot validation: Bean Validation on DTOs, @Valid at API boundaries, constraint groups and consistent 400 responses.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add jabrena/plinth --skill 303-frameworks-spring-boot-validation -a claude-code
Open on GitHub

What 303-frameworks-spring-boot-validation does

The skill gives an agent a set of rules and good/bad examples for validation in Spring Boot. It covers Bean Validation annotations on DTOs and command models, @Valid and @Validated on controllers and method parameters, validation groups for create/update flows, custom constraint annotations with their validators, and one consistent 400 response shape for failures. Nested DTO validation and @ConfigurationProperties validation are part of the same reference.

The workflow has four steps. The agent reads references/303-frameworks-spring-boot-validation.md, inspects the project, picks the smallest safe set of changes, applies them following the reference patterns, then runs the build and tests and reports what changed. One rule is mandatory: run ./mvnw compile or mvn compile before touching anything. If compilation fails, the agent stops. After the improvements it runs ./mvnw clean verify or mvn clean verify.

Those commands assume a Maven project, so on a Gradle build you will have to map the verification steps yourself. Worth installing when validation logic is scattered across controllers and you want it pulled back to one set of rules.

What it helps with

  • add Bean Validation constraints to request DTOs
  • find API boundaries missing @Valid or @Validated
  • split create and update rules with validation groups
  • write a custom constraint annotation and validator
  • return one 400 error format for validation failures

Example prompts for the agent

  • Add validation support in Spring Boot: go through the request DTOs and apply Bean Validation constraints
  • Review the validation rules in my REST controllers and point out where @Valid is missing
  • Make validation failures return a consistent 400 response body

How to install 303-frameworks-spring-boot-validation

1Skills CLI (Vercel)

npx skills add jabrena/plinth --skill 303-frameworks-spring-boot-validation -a claude-code

2Manually: put the files in place

~/.claude/skills/303-frameworks-spring-boot-validation/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/303-frameworks-spring-boot-validation/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about 303-frameworks-spring-boot-validation

How do I install 303-frameworks-spring-boot-validation in Claude?

Run npx skills add jabrena/plinth --skill 303-frameworks-spring-boot-validation -a claude-code. The skill lands in ~/.claude/skills/303-frameworks-spring-boot-validation/SKILL.md.

What does this skill do?

It gives the agent Spring Boot validation rules: Bean Validation on DTOs, @Valid and @Validated at API boundaries, constraint groups, custom constraints, nested DTO and @ConfigurationProperties validation, and consistent 400 responses.

What does the skill need to run?

A Maven project. Before applying changes the agent runs ./mvnw compile or mvn compile, and afterwards ./mvnw clean verify or mvn clean verify. If compilation fails, the changes are not applied.

Source text

SKILL.md · Apache-2.0
---
name: 303-frameworks-spring-boot-validation
description: Use when you need to design, review, or improve validation in Spring Boot applications — including Bean Validation on request DTOs, @Valid/@Validated at API boundaries, constraint groups, custom constraints, @ConfigurationProperties validation, nested DTO validation, and consistent validation error handling. This should trigger for requests such as Add validation support in Spring Boot; Review Spring Boot validation rules; Improve request validation in Spring Boot REST APIs; Add custom Bean Validation constraints in Spring Boot; Validate configuration properties in Spring Boot. Part of Plinth Toolkit
license: Apache-2.0
metadata:
  author: Juan Antonio Breña Moral
  version: 0.19.0
---
# Spring Boot Validation Guidelines

Apply Spring Boot validation best practices at API boundaries.

**What is covered in this Skill?**

- Bean Validation annotations on DTOs and command models
- @Valid / @Validated on controllers and method parameters
- Validation groups for create/update workflows
- Custom constraint annotations and validators
- Consistent 400 error responses for validation failures

**Scope:** Apply recommendations based on the reference rules and good/bad examples.

## Constraints

Before applying validation changes, ensure the project compiles. After improvements, run full verification.

- **MANDATORY**: Run `./mvnw compile` or `mvn compile` before applying any change
- **SAFETY**: If compilation fails, stop immediately
- **VERIFY**: Run `./mvnw clean verify` or `mvn clean verify` after applying improvements
- **BEFORE APPLYING**: Read the reference for detailed rules and examples

## When to use this skill

- Add validation support in Spring Boot
- Review Spring Boot validation rules
- Improve request validation in Spring Boot REST APIs
- Add custom Bean Validation constraints in Spring Boot
- Validate configuration properties in Spring Boot
- Improve nested DTO validation in Spring Boot

## Workflow

1. **Read reference and assess project context**

Read `references/303-frameworks-spring-boot-validation.md` and inspect the current project setup before proposing changes.

2. **Gather scope and decide target improvements**

Identify requested outcomes, constraints, and the minimum safe set of changes to apply.

3. **Apply framework-aligned changes**

Implement or refactor validation-related configuration/code following the reference patterns and project conventions.

4. **Run verification and report results**

Execute appropriate build/tests and summarize what changed, what was verified, and any follow-up actions.

## Reference

For detailed guidance, examples, and constraints, see [references/303-frameworks-spring-boot-validation.md](references/303-frameworks-spring-boot-validation.md).

© Juan Antonio Breña Moral · Apache-2.0 · jabrena/plinth

Similar skills

All skills for Backend and APIs →

From the same set51

411-frameworks-quarkus-jdbc A skill for programmatic JDBC in Quarkus: Agroal DataSource, parameterized SQL, transactions, batching and Dev Services. Useful when reviewing data access. CX Codex +1 312installs 701-technologies-openapi Guides you through an OpenAPI 3.x contract: spec structure, reusable schemas, security schemes, breaking-change checks. Useful when the contract lives apart from the code. CX Codex +1 309installs 521-frameworks-micronaut-testing-unit-tests Enforces unit testing standards for Micronaut apps: prefers fast Mockito tests without context boots and reserves @MicronautTest for HTTP or @MockBean setups. CX Codex +1 304installs 522-frameworks-micronaut-testing-integration-tests Guides writing Micronaut integration tests using Testcontainers and Maven test configurations. CX Codex +1 303installs 512-frameworks-micronaut-data A skill for Micronaut Data work: entity mapping, repositories, transactions, pagination, projections and Testcontainers tests. CX Codex +1 303installs 502-frameworks-micronaut-rest Guides your coding agent in designing and reviewing Micronaut REST APIs. Enforces strict HTTP semantics and OpenAPI alignment. CX Codex +1 302installs 304-frameworks-spring-boot-security Configures Spring Boot security, endpoint authorization, and SecurityFilterChain. It helps implement JWT resource servers, method security, and safe headers. CX Codex +1 301installs 501-frameworks-micronaut-core A skill that reviews and fixes Micronaut Java code: beans, configuration, @Requires, scheduling and blocking I/O. CX Codex +1 302installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor