spring-boot-endpoint
Skill0 starsChanged 4 days agoMITView on GitHub
The skill scaffolds a Spring Boot REST feature across controller, service, repository, DTO, mapper, exception handling and tests; use it when adding a Java endpoint or implementing a complete backend resource.
In this repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- api-design-reviewSkill
- codebase-reviewSkill
- commit-and-dcoSkill
- django-app-scaffoldSkill
- dockerfile-auditSkill
- exhaustive-prompt-specSkill
- incident-postmortemSkill
- log-triageSkill
- pr-review-tableSkill
- react-component-specSkill
- readme-writerSkill
- repo-polishSkill
- runbook-writerSkill
- security-reviewSkill
- test-plan-writerSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 11 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Use this skill when asked to add a Spring Boot REST endpoint, implement a Java backend feature, scaffold a CRUD resource, or create a …
- Very specific: line 27
Read references/layout.md and match the repository's existing naming and layering conventions.
- Distinctive: line 32
Add a mapper that avoids leaking persistence entities through the API.
- Distinctive: line 33
Add centralized exception mapping with stable error response fields and correct HTTP status codes.
- Distinctive: line 34
Add unit tests for service behavior and web-layer tests for validation, success and error responses.
- Distinctive: line 35
Run the repository's actual formatter, compile and test commands.
- Distinctive: line 45
Ask for the persistence technology if no existing repository pattern is visible.
- Distinctive: line 46
Keep a caller-provided ID out of create DTOs unless the business contract requires client-generated identifiers.
- Distinctive: line 48
Do not create a duplicate exception framework when one exists.
- Distinctive: line 53
Do not put business rules in controllers.
- Distinctive: line 54
Do not return JPA entities directly.
- Distinctive: line 55
Do not invent dependencies, package names or authorization policy.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Purpose
Generate a complete layered Spring Boot feature with consistent controller, service, repository, DTO, mapper, exception handling and tests.
When to use
Use this skill when asked to add a Spring Boot REST endpoint, implement a Java backend feature, scaffold a CRUD resource, or create a controller-service-repository implementation.
Inputs needed
- Resource name and business behavior.
- Request and response fields with types and validation rules.
- Existing package root and persistence technology when extending a repository.
- Authentication and authorization requirements for the endpoint.
Step-by-step procedure
- Inspect existing build files, Java version, package layout, API conventions and test framework.
- Read
references/layout.mdand match the repository's existing naming and layering conventions. - Define request/response DTOs separately from persistence entities and expose only approved fields.
- Implement a controller that validates input and delegates business behavior to a service.
- Implement a service that owns transaction boundaries and domain rules.
- Implement a repository using the project's persistence abstraction and explicit query boundaries.
- Add a mapper that avoids leaking persistence entities through the API.
- Add centralized exception mapping with stable error response fields and correct HTTP status codes.
- Add unit tests for service behavior and web-layer tests for validation, success and error responses.
- Run the repository's actual formatter, compile and test commands; return only complete files and observed results.
Exact output format
Return sections in this order: Assumptions, File tree, Complete source files, Tests, Commands and results. Under Complete source files, use one heading per path and include the entire file. Include the controller, service implementation, repository interfaces, DTOs, mapper, domain types, exception handler and tests that the feature requires. Under Commands and results, list exact commands and observed exit codes.
Edge cases
- Ask for the persistence technology if no existing repository pattern is visible.
- Keep a caller-provided ID out of create DTOs unless the business contract requires client-generated identifiers.
- Distinguish missing resources from validation failures and conflicts.
- Do not create a duplicate exception framework when one exists.
Do not
- Do not put business rules in controllers.
- Do not return JPA entities directly.
- Do not invent dependencies, package names or authorization policy.
Worked example summary
A POST /api/v1/orders feature accepts a validated customer ID and line items, creates an order in a service transaction, persists it through a repository and returns an order response DTO. Tests cover valid creation, invalid quantity, unknown customer and duplicate idempotency key.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

