agentsclimarketplace

Spring endpoint

Skill vaibhavsaxena022/skills/spring-endpoint

Scaffold a clean Spring Boot REST endpoint — controller, service, DTOs, and validation — following the project's existing layered conventions. Use when adding a new REST endpoint or resource to a Spring Boot project.From its SKILL.md

Install
npx -y skills add vaibhavsaxena022/skills --skill spring-endpoint

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

1.5 KB, 258 tokens by cl100k_base, as published. Nobody here has run it

Spring Boot Endpoint

Create a new REST endpoint that matches the project's existing structure.

Steps

  1. Inspect first. Read the codebase to learn its conventions: package layout, controller/service style, DTO/mapper pattern, error handling, and validation approach. Match them — do not introduce a new pattern.
  2. Build the layers:
    • Controller — thin. Map request → service call → response. Correct HTTP verb + status code (201 for create, 204 for delete). @Valid on request bodies.
    • Service — the business logic. Put @Transactional on write operations.
    • DTOs — separate request and response types (records preferred). Never expose entities directly.
    • Validation — bean-validation annotations (@NotNull, @Size, …) on the request DTO.
  3. Return errors through the project's existing exception handler — don't add a new one.

Rules

  • Constructor injection, never field injection.
  • Keep controllers free of business logic.
  • Add only what the endpoint needs — nothing speculative.
  • If the project has a mapper (MapStruct, manual), use it; don't hand-roll a new style.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.