303-frameworks-spring-boot-validation — скилл для Claude Code
Скилл для ИИ-агента, который наводит порядок в валидации Spring Boot: Bean Validation на DTO, @Valid на границах API, группы ограничений и единый формат ошибок 400.
npx skills add jabrena/plinth --skill 303-frameworks-spring-boot-validation -a claude-codeЧто делает 303-frameworks-spring-boot-validation
Скилл описывает, как агенту проектировать и править валидацию в Spring Boot-приложении. Внутри — правила и примеры «хорошо/плохо» по аннотациям Bean Validation на DTO и командных моделях, @Valid и @Validated на контроллерах и параметрах методов, группам валидации для сценариев create/update, своим аннотациям-ограничениям с валидаторами и единообразным ответам 400 при провале проверки. Отдельно разбирается валидация вложенных DTO и @ConfigurationProperties.
Работает это по шагам. Сначала агент читает references/303-frameworks-spring-boot-validation.md и осматривает проект, потом определяет минимальный безопасный набор правок, вносит их по паттернам из референса и в конце прогоняет сборку с тестами. Правило жёсткое: перед любой правкой нужно выполнить ./mvnw compile или mvn compile. Если компиляция падает, работа останавливается. После улучшений — ./mvnw clean verify или mvn clean verify.
Скилл рассчитан на Maven-проект: команды завязаны на mvnw или mvn, так что в Gradle-сборке шаги проверки придётся перекладывать самому. Ставить его есть смысл, когда валидация в проекте размазана по контроллерам и хочется свести её к одному набору правил.
Какие задачи решает
- добавить Bean Validation на DTO запросов
- проверить, где на границах API потерялись
@Validи@Validated - развести правила для создания и обновления через группы валидации
- написать свою аннотацию-ограничение с валидатором
- сделать единый ответ 400 на ошибки валидации
Примеры запросов агенту
- Добавь валидацию в Spring Boot: пройди по DTO запросов и расставь ограничения Bean Validation
- Проверь правила валидации в REST-контроллерах и покажи, где не хватает
@Valid - Сделай единый формат ответа 400 для ошибок валидации
Как установить 303-frameworks-spring-boot-validation
1Через Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 303-frameworks-spring-boot-validation -a claude-code2Вручную: положить файлы
~/.claude/skills/303-frameworks-spring-boot-validation/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/303-frameworks-spring-boot-validation/
1Через Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 303-frameworks-spring-boot-validation -a codex2Вручную: положить файлы
.agents/skills/303-frameworks-spring-boot-validation/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 303-frameworks-spring-boot-validation -a cursor2Вручную: положить файлы
.cursor/skills/303-frameworks-spring-boot-validation/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install jabrena/plinth 303-frameworks-spring-boot-validation2Вручную: положить файлы
.github/skills/303-frameworks-spring-boot-validation/SKILL.md1Через Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 303-frameworks-spring-boot-validation -a gemini-cli2Командой платформы
gemini skills install https://github.com/jabrena/plinth --path skills/303-frameworks-spring-boot-validationВручную: положить файлы
.devin/skills/303-frameworks-spring-boot-validation/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 303-frameworks-spring-boot-validation -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о 303-frameworks-spring-boot-validation
Как установить 303-frameworks-spring-boot-validation в Claude?
Выполните npx skills add jabrena/plinth --skill 303-frameworks-spring-boot-validation -a claude-code. Скилл появится в ~/.claude/skills/303-frameworks-spring-boot-validation/SKILL.md.
Что делает этот скилл?
Задаёт агенту правила валидации в Spring Boot: Bean Validation на DTO, @Valid и @Validated на границах API, группы ограничений, свои ограничения, валидация вложенных DTO и @ConfigurationProperties, единые ответы 400.
Что нужно, чтобы скилл сработал?
Maven-проект: перед правками агент запускает ./mvnw compile или mvn compile, а после — ./mvnw clean verify или mvn clean verify. Если компиляция не проходит, изменения не применяются.
Исходный текст
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