502-frameworks-micronaut-rest — Claude Code skill: how to install
Guides your coding agent in designing and reviewing Micronaut REST APIs. Enforces strict HTTP semantics and OpenAPI alignment.
npx skills add jabrena/plinth --skill 502-frameworks-micronaut-rest -a claude-codeWhat 502-frameworks-micronaut-rest does
This skill guides code generation and refactoring for Micronaut HTTP services. It aligns @Controller endpoints with standard REST semantics using explicit HTTP method annotations and HttpResponse status handling. You get DTO validation via @Valid alongside centralized Problem Details exception handlers.
The guidelines also cover bounded pagination with Pageable and Idempotency-Key headers for write retries. For concurrency, it enforces ETag and If-Match. When dealing with contracts, it supports OpenAPI Generator stubs and micronaut-openapi configurations.
The workflow strictly enforces project integrity. The agent must execute ./mvnw compile before making any edits. If compilation breaks, all changes halt immediately. After edits, it verifies everything with ./mvnw clean verify.
What it helps with
- align Micronaut controllers with an OpenAPI specification
- configure centralized Problem Details exception handling
- implement optimistic locking using ETag and If-Match
- apply Bean Validation to incoming request DTOs
- set up bounded pagination using Pageable
Example prompts for the agent
- Review our Micronaut controllers and align them with the OpenAPI contract.
- Add Problem Details exception handlers and Bean Validation to user DTOs.
- Configure bounded pagination with Pageable and set up ETag caching.
How to install 502-frameworks-micronaut-rest
1Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 502-frameworks-micronaut-rest -a claude-code2Manually: put the files in place
~/.claude/skills/502-frameworks-micronaut-rest/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/502-frameworks-micronaut-rest/
1Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 502-frameworks-micronaut-rest -a codex2Manually: put the files in place
.agents/skills/502-frameworks-micronaut-rest/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 502-frameworks-micronaut-rest -a cursor2Manually: put the files in place
.cursor/skills/502-frameworks-micronaut-rest/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install jabrena/plinth 502-frameworks-micronaut-rest2Manually: put the files in place
.github/skills/502-frameworks-micronaut-rest/SKILL.md1Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 502-frameworks-micronaut-rest -a gemini-cli2Platform CLI
gemini skills install https://github.com/jabrena/plinth --path skills/502-frameworks-micronaut-restManually: put the files in place
.devin/skills/502-frameworks-micronaut-rest/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 502-frameworks-micronaut-rest -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 502-frameworks-micronaut-rest
How do I install 502-frameworks-micronaut-rest in Claude Code?
Run npx skills add jabrena/plinth --skill 502-frameworks-micronaut-rest -a claude-code in your terminal to install the skill.
What does 502-frameworks-micronaut-rest do?
It instructs your AI agent on REST API best practices for Micronaut applications. This includes controller routing, DTO validation, error mapping, and OpenAPI sync.
What happens if the project fails to compile?
The skill stops changes immediately if ./mvnw compile or mvn compile fails. The agent will not modify controller code until the build compiles successfully.
Source text
SKILL.md · Apache-2.0
--- name: 502-frameworks-micronaut-rest description: Use when you need to design, review, or improve REST APIs with Micronaut — including @Controller routes, HTTP status codes, DTOs, Bean Validation, exception handlers, pagination, idempotency, ETag/If-Match, caching headers, versioning, contract-first OpenAPI (OpenAPI Generator), optional runtime OpenAPI via micronaut-openapi, and security annotations. This should trigger for requests such as Review or improve Micronaut @Controller REST APIs; Add validation, error handling, or align controllers with the OpenAPI contract on Micronaut HTTP layer; Design Micronaut controllers and DTO validation; Add Micronaut exception handlers and Problem Details responses; Improve pagination filtering or OpenAPI alignment in Micronaut APIs. Part of Plinth Toolkit license: Apache-2.0 metadata: author: Juan Antonio Breña Moral version: 0.19.0 --- # Micronaut REST API Guidelines Apply REST design principles for Micronaut HTTP applications. **What is covered in this Skill?** - Semantic HTTP with @Get/@Post/@Put/@Patch/@Delete and HttpResponse status control - Resource-oriented paths and stable DTO contracts - @Valid on request bodies with Bean Validation - Centralized error mapping (ExceptionHandler / problem JSON when applicable) - Pagination with Pageable and bounded sizes - OpenAPI contract file (API-first) and OpenAPI Generator for server stubs - Security annotations (@Secured) on sensitive routes - Idempotency-Key for retried writes - ETag / If-Match for optimistic concurrency - Cache-Control discipline - API versioning patterns - ISO-8601 time types in DTOs **Scope:** Apply recommendations based on the reference rules and good/bad code examples. ## Constraints Compile before REST refactors; verify after. - **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 - **EDGE CASE**: If request scope is ambiguous, stop and ask a clarifying question before applying changes - **EDGE CASE**: If required inputs, files, or tooling are missing, report what is missing and ask whether to proceed with setup guidance ## When to use this skill - Review or improve Micronaut @Controller REST APIs - Add validation, error handling, or align controllers with the OpenAPI contract on Micronaut HTTP layer - Design Micronaut controllers and DTO validation - Add Micronaut exception handlers and Problem Details responses - Improve pagination filtering or OpenAPI alignment in Micronaut APIs ## Workflow 1. **Read reference and assess project context** Read `references/502-frameworks-micronaut-rest.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 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/502-frameworks-micronaut-rest.md](references/502-frameworks-micronaut-rest.md).
© Juan Antonio Breña Moral · Apache-2.0 · jabrena/plinth