Skip to content
Development
Skill

/java-crud

Generates a complete Spring Boot CRUD feature (entity, repository, service, controller, DTOs, tests) in an existing project. Use when user asks to "add CRUD for", "generate entity", "create a feature for", "add REST endpoints for", "scaffold a feature", or "build CRUD for".

From plugin
claude-java-plugins
1726 skills6 agents5 commands

Claude Code

$ npx -y skills add ducpm2303/claude-java-plugins --skill java-crud --agent claude-code

SKILL.md

java-crud.SKILL.md
description: Generates a complete Spring Boot CRUD feature (entity, repository, service, controller, DTOs, tests) in an existing project. Use when user asks to "add CRUD for", "generate entity", "create a feature for", "add REST endpoints for", "scaffold a feature", or "build CRUD for".
argument-hint: "<EntityName> [fields: field:type, ...] [Java version] [Spring Boot version]"

/java-crud — Spring Boot CRUD Generator

You are a Spring Boot code generator. Add a complete CRUD feature to an **existing** project.

> **Starting a new project from scratch?** Use `/java-scaffold` instead.

Step 1 — Gather requirements

Parse arguments if provided. Otherwise ask (in a single message):

1. **Entity name** — e.g., `Product`, `CustomerOrder` 2. **Fields** — name and type, e.g., `name:String, price:BigDecimal, category:String, active:boolean` 3. **Soft delete?** — yes/no 4. **Java version** — check `pom.xml` / `build.gradle`, ask if not found 5. **Spring Boot version** — 2.x (`javax.persistence`) or 3.x+ (`jakarta.persistence`)

Confirm before generating:

Adding CRUD feature: Product
Fields: id (auto), name (String), price (BigDecimal), category (String), active (boolean)
Java: 17 | Spring Boot: 3.2 | Soft delete: no
Generate? (yes to proceed)

Step 2 — Detect base package

Check `src/main/java/` for the existing package structure. Match the project's conventions.

Step 3 — Generate all layers

Use the templates in `references/templates.md`. Generate files in this order, stating the full path before each:

1. `src/main/java/{package}/entity/{Entity}.java` 2. `src/main/java/{package}/repository/{Entity}Repository.java` 3. `src/main/java/{package}/dto/{Entity}Request.java` + `{Entity}Response.java` 4. `src/main/java/{package}/service/{Entity}Service.java` 5. `src/main/java/{package}/controller/{Entity}Controller.java` 6. `src/test/java/{package}/service/{Entity}ServiceTest.java`

**Spring Boot version rules:**

  • 3.x+: use `jakarta.persistence.*`, `@SQLRestriction` for soft delete
  • 2.x: use `javax.persistence.*`, `@Where(clause = "deleted = false")` for soft delete

**Java version rules:**

  • 16+: use records for DTOs
  • 8–15: use plain classes with constructors and getters

Step 4 — Post-generation checklist

  • [ ] Replace `com.example` with actual base package
  • [ ] Add `spring-boot-starter-validation` if not already in build file
  • [ ] Add a `GlobalExceptionHandler` (`@RestControllerAdvice`) if not already present
  • [ ] Run `mvn compile` or `./gradlew build` to verify

Step 5 — Next Steps

  • Add more tests → `/java-test`
  • Review the generated code → `/java-review`
  • Check JPA patterns → `/java-jpa`
  • Security review → `/java-security-check`
Read more
@ducpm2303
Ships withclaude-java-plugins

A Claude Code plugin marketplace with 3 focused plugins for Java developers. All plugins support Java 8 through Java 21 and tailor advice to your target Java version.

1726 skills6 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
17
Star history of ducpm2303/claude-java-plugins on GitHub, a chart by star-history.com

Other skills on claude-java-plugins.

java-adr

java-adr

Creates, lists, and manages Architecture Decision Records for Java projects. Use when user asks to "create an ADR", "document…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills11d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about java-crud.

Which coding agents can use java-crud?
java-crud installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.