Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

spring-controller

FreeNo executable scriptsNot checked

Generate a Spring REST controller for a named entity with CRUD endpoints, validation, OpenAPI documentation, and integration tests. Invoke as…

kousenby kousen★ 351 GitHub stars

About this skill

Spring REST Controller Scaffold

Generate a $ARGUMENTSController with the following:

  • @RestController and @RequestMapping("/api/$ARGUMENTS") (lowercased plural)
  • CRUD endpoints with proper HTTP verbs and status codes:
    • GET /api/$ARGUMENTS — list (with pagination params)
    • GET /api/$ARGUMENTS/{id} — fetch one (404 on miss)
    • POST /api/$ARGUMENTS — create (201 + Location header)
    • PUT /api/$ARGUMENTS/{id} — update (200 or 404)
    • DELETE /api/$ARGUMENTS/{id} — delete (204)
  • Request and response DTOs for $ARGUMENTS (don't expose the JPA entity directly)
  • @Valid + Jakarta validation annotations on the request DTOs
  • OpenAPI annotations (@Operation, @ApiResponses)
  • Integration tests using @SpringBootTest + MockMvc covering happy path, validation failure, and 404

Conventions

  • Constructor injection (no field @Autowired)
  • ResponseEntity return types so HTTP status is explicit
  • Use the project's existing exception handler if @ControllerAdvice is present
  • Match the package layout of existing controllers

Usage: /spring-controller User → UserController, UserRequest, UserResponse, UserControllerIntegrationTest

Install spring-controller in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

FAQ

What does the spring-controller skill do?

Generate a Spring REST controller for a named entity with CRUD endpoints, validation, OpenAPI documentation, and integration tests. Invoke as /spring-controller <Entity>.

How do I install the spring-controller skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the spring-controller skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare spring-controller with