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.
npx skills add jabrena/plinth --skill 303-frameworks-spring-boot-validation -a claude-codeWhat 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
@Validor@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
@Validis 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-code2Manually: put the files in place
~/.claude/skills/303-frameworks-spring-boot-validation/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/303-frameworks-spring-boot-validation/
1Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 303-frameworks-spring-boot-validation -a codex2Manually: put the files in place
.agents/skills/303-frameworks-spring-boot-validation/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 303-frameworks-spring-boot-validation -a cursor2Manually: put the files in place
.cursor/skills/303-frameworks-spring-boot-validation/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install jabrena/plinth 303-frameworks-spring-boot-validation2Manually: put the files in place
.github/skills/303-frameworks-spring-boot-validation/SKILL.md1Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 303-frameworks-spring-boot-validation -a gemini-cli2Platform CLI
gemini skills install https://github.com/jabrena/plinth --path skills/303-frameworks-spring-boot-validationManually: put the files in place
.devin/skills/303-frameworks-spring-boot-validation/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 303-frameworks-spring-boot-validation -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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