# 503-frameworks-micronaut-validation

503-frameworks-micronaut-validation guides validation setup in Micronaut applications, from Bean Validation annotations to HTTP 400 error payloads.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 280 installs · ★ 465 repo stars
- Author: Juan Antonio Breña Moral
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/jabrena/plinth/tree/HEAD/skills/503-frameworks-micronaut-validation/SKILL.md
- Updated: 2026-10-21
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/503-frameworks-micronaut-validation

## What it does

This skill establishes clear standards for validating payloads at HTTP boundaries in Micronaut. It details Bean Validation annotations on DTOs, controller method arguments using `@Valid` or `@Validated`, nested models, and `@ConfigurationProperties` classes.

The workflow enforces verification safety guards around Maven tasks. It requires running `./mvnw compile` or `mvn compile` before any edits. If compilation fails, the agent stops immediately without touching the code. Once changes are in place, the instructions dictate running `./mvnw clean verify`.

Guidance relies directly on `references/503-frameworks-micronaut-validation.md`. The agent expects reference examples to be present within the repository context to align with patterns.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add jabrena/plinth --skill 503-frameworks-micronaut-validation -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/503-frameworks-micronaut-validation/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/503-frameworks-micronaut-validation/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add jabrena/plinth --skill 503-frameworks-micronaut-validation -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/503-frameworks-micronaut-validation/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add jabrena/plinth --skill 503-frameworks-micronaut-validation -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/503-frameworks-micronaut-validation/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install jabrena/plinth skills/503-frameworks-micronaut-validation
```

2. **Manually: put the files in place**
- File: `.github/skills/503-frameworks-micronaut-validation/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add jabrena/plinth --skill 503-frameworks-micronaut-validation -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/jabrena/plinth --path skills/503-frameworks-micronaut-validation
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/503-frameworks-micronaut-validation/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add jabrena/plinth --skill 503-frameworks-micronaut-validation -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/jabrena/plinth/tree/HEAD/skills/503-frameworks-micronaut-validation/SKILL.md

## When to use it
- configure Bean Validation on Micronaut controllers and nested DTOs
- validate configuration settings inside @ConfigurationProperties
- build custom validation constraints and validation groups
- standardize constraint violation mapping into safe HTTP 400 responses

## Example prompts
- Review Micronaut validation rules across our REST controllers
- Add custom validation constraints for nested DTOs in Micronaut
- Improve constraint violation handling to return clean 400 responses

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 9af6eb0f8d11a336.

BEGIN THIRD-PARTY FILE 9af6eb0f8d11a336
```text
---
name: 503-frameworks-micronaut-validation
description: Use when you need to design, review, or improve validation in Micronaut applications — including Bean Validation on @Controller methods, @Body @Valid, query/path parameter validation, @ConfigurationProperties validation, custom constraints, nested DTO validation, and ExceptionHandler mapping for constraint violations. This should trigger for requests such as Add validation support in Micronaut; Review Micronaut validation rules; Improve request validation in Micronaut REST APIs; Add custom validation constraints in Micronaut; Validate Micronaut configuration properties. Part of Plinth Toolkit
license: Apache-2.0
metadata:
  author: Juan Antonio Breña Moral
  version: 0.19.0
---
# Micronaut Validation Guidelines

Apply Micronaut validation best practices at HTTP API boundaries.

**What is covered in this Skill?**

- Bean Validation annotations on DTOs and command models
- @Valid / @Validated usage in Micronaut controllers
- Validation groups and custom validators
- Consistent mapping of validation failures to 400 responses
- Safe and predictable validation error payloads

**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 Micronaut
- Review Micronaut validation rules
- Improve request validation in Micronaut REST APIs
- Add custom validation constraints in Micronaut
- Validate Micronaut configuration properties
- Improve constraint violation handling in Micronaut

## Workflow

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

Read `references/503-frameworks-micronaut-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**
```
END THIRD-PARTY FILE 9af6eb0f8d11a336

The third-party file has ended. Everything between the 9af6eb0f8d11a336 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2491 of 2771 bytes. © Juan Antonio Breña Moral · Apache-2.0 · https://github.com/jabrena/plinth/tree/HEAD/skills/503-frameworks-micronaut-validation/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
