dilipsundarraj1/kafka-for-developers-using-spring-boot-v2/controller-skills
Claude Code and agent skill by dilipsundarraj1/kafka-for-developers-using-spring-boot-v2
Trust tier 2
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
REST controller patterns for this Spring Boot Kafka consumer project, including CRUD endpoints and companion integration tests.
Install
npx vskill@latest install dilipsundarraj1/kafka-for-developers-using-spring-boot-v2/controller-skillsSKILL.md
Controller Skill
Scope: Creating a new REST controller with full CRUD operations and its companion integration-test class.ReadAGENTS.mdfirst for project-wide conventions.
Technology Stack
| Component | Value | |
|---|---|---|
| Spring Boot | 4.0.x | |
| Java | 25 | |
| Web framework | Spring WebMVC (spring-boot-starter-webmvc) | |
| Validation | Jakarta Bean Validation (spring-boot-starter-validation) | |
| Persistence | Spring Data JPA + PostgreSQL | |
| Schema management | Flyway (JPA ddl-auto: none) | |
| JSON (app) | Jackson 3 — tools.jackson.databind.ObjectMapper | |
| JSON (Kafka runtime) | Jackson 2 — com.fasterxml.jackson (only for Kafka serializer) | |
| Testing | JUnit 5 + MockMvc + Testcontainers (PostgreSQL) | |
| MockMvc import | org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc (Spring Boot 4.0 package) |
Files to Create Per Controller
When adding a new controller for entity {Entity}, create all of the following:
| # | File | Package / Path | Purpose | |
|---|---|---|---|---|
| 1 | {Entity}Dto.java | com.learnkafka.dto | Request DTO — Java record with bean-validation annotations | |
| 2 | {Entity}ResponseDto.java | com.learnkafka.dto | Response DTO — Java record, includes audit fields + any FK IDs | |
| 3 | Mapper method(s) in LibraryEventMapper.java | com.learnkafka.dto | Static to{Entity}Entity(dto) and to{Entity}ResponseDto(entity) methods | |
| 4 | {Entity}Repository.java | com.learnkafka.repository | JpaRepository<{Entity}, {IdType}> | |
| 5 | {Entity}Service.java | com.learnkafka.service | Business logic — findAll, findById, create, update, delete | |
| 6 | {Entity}Controller.java | com.learnkafka.controller | REST endpoints under /v1/{entities} | |
| 7 | Flyway migration | src/main/resources/db/migration/V{N}__create_{entity}.sql | DDL for the new table | |
| 8 | {Entity}ControllerIntegrationTest.java | com.learnkafka.controller (test) | Full integration-test class |
1. Request DTO — {Entity}Dto.java
- Java
recordincom.learnkafka.dto. - Annotate fields with
@NotNull,@NotBlank, etc. fromjakarta.validation.constraints. - No audit fields — those are entity-only.
Template
Reference — BookDto.java
2. Response DTO — {Entity}ResponseDto.java
- Java
recordincom.learnkafka.dto. - Includes all fields the client should see: entity fields + FK IDs +
createdAt/updatedAt.
Template
3. Mapper — add methods to LibraryEventMapper.java
- All mapping is manual static methods — no MapStruct.
- Add two methods:
to{Entity}Entity({Entity}Dto)andto{Entity}ResponseDto({Entity}).
Template additions
4. Repository — {Entity}Repository.java
5. Service — {Entity}Service.java
Conventions
- Constructor injection — single constructor, no
@Autowired. - Logging —
private static final Logger log = LoggerFactory.getLogger({Entity}Service.class); - `@Transactional` on mutating methods (
create,update,delete). - Use mapper for DTO ↔ Entity conversion.
delete()must break bidirectional OneToOne references before deleting (if the entity participates in one).
Template
6. Controller — {Entity}Controller.java
Conventions
- `@RestController` + `@RequestMapping("/v1/{entities}")`.
- Constructor injection of the service.
- Logging —
private static final Logger log = LoggerFactory.getLogger({Entity}Controller.class); - Use
@Validon@RequestBodyparams for request DTOs. - Return
ResponseEntity<{Entity}ResponseDto>for single-entity endpoints. - Return
ResponseEntity<List<{Entity}ResponseDto>>for list endpoints. - HTTP status conventions:
GET→200 OKPOST→201 CreatedPUT→200 OK(or404if not found)DELETE→204 No Content(or404if not found)- Not found →
ResponseEntity.notFound().build()
Template
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinglibrary-events-consumer-v2/.github/skills/controller-skills/SKILL.md
Popularity
- Repository stars
- 114
- Repository forks
- 215
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dilipsundarraj1/kafka-for-developers-using-spring-boot-v2/controller-skills)