crud-rest-controller

Generates Spring REST controllers with CRUD endpoints backed by Spring Data repositories.

Updated May 4, 2026
One-click install
npx skills add https://github.com/studenkov/FinanceTracker --skill crud-rest-controller-studenkov
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: crud-rest-controller
Source: https://github.com/studenkov/FinanceTracker/tree/main/.agents/skills/crud-rest-controller
Command: npx skills add https://github.com/studenkov/FinanceTracker --skill crud-rest-controller-studenkov

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing a full CRUD REST controller for a Spring entity involves repetitive boilerplate: endpoint mappings, pagination, filtering, DTO mapping, patch handling, and dependency setup. This Skill automates that entire workflow by generating a complete @RestController class from verified code examples, tailored to your project's language, Spring Boot version, and existing conventions. ## Core Features & Use Cases - Full CRUD generation: Creates GET_LIST, GET_ONE, GET_MANY, CREATE, PATCH, PATCH_MANY, DELETE, and DELETE_MANY endpoints, with the option to generate only a subset (e.g. read-only controllers). - DTO and mapper integration: Supports optional DTO mapping with automatic delegation to dto-creator and mapper-creator skills when no DTO or mapper exists. - Pagination and filtering: Supports Page, PagedModel, and Window pagination plus JPA Specification filters, automatically adding JpaSpecificationExecutor to the repository when needed. - Version-aware code: Detects Java vs Kotlin, Spring Boot 2/3/4, Jackson 2 vs 3, SpringDoc, and validation libraries to emit the correct imports and annotations. - Use Case: Ask to create a CRUD controller for your Product entity and receive a complete controller at /rest/products with paginated list endpoints, DTO mapping, and all required dependencies added to your build file. ## Quick Start Ask the assistant to create a CRUD REST controller for your entity, for example by saying: create a CRUD controller for the Product entity with pagination and DTO mapping.

Frequently Asked Questions about crud-rest-controller

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a CRUD REST controller in Spring Boot?

Invoke this skill and name the entity, for example: create a CRUD controller for Product. It generates a @RestController with GET, POST, PATCH, and DELETE endpoints backed by the entity's Spring Data repository, with optional DTO mapping, pagination, and filtering.

How to add pagination to a Spring Data REST endpoint?

The generated GET_LIST endpoint supports Page pagination by default, PagedModel wrapping on Spring Data 3.2+, and Window pagination for keyset-style scrolling without count queries. Pagination type is auto-detected from project conventions or confirmed with one question.

Does this work with Kotlin Spring Boot projects?

Yes. The skill auto-detects the project language via the Spring MCP get_project_summary tool and generates Kotlin controller code from dedicated Kotlin examples, including constructor injection and idiomatic null handling.

Can I generate a read-only REST controller without create or delete endpoints?

Yes. Method selection supports Full CRUD, Standard CRUD, Read-only (GET_LIST and GET_ONE), or a custom subset. Stating read-only or only GET in your prompt skips the question entirely.

What happens if my entity has no DTO or mapper?

If you choose DTO mode and none exists, the skill delegates to the dto-creator skill, which in turn delegates to mapper-creator for the entity-DTO mapper. After both are created, controller generation resumes automatically.

Why does the skill require the Amplicode IntelliJ plugin?

The skill relies on the Amplicode Spring MCP server for project introspection: entity details, repositories, dependencies, and existing endpoints. Without it, the skill invokes the amplicode-install skill to set up the plugin and MCP connection first.