spring-rest-endpoint

spring-rest-endpoint is a skill for Claude Code from ShipWithAI/shipwithai-plugins. It costs 76 tokens per session (984 once invoked), scanned A, original, MIT.

A code template for adding a Spring Web REST endpoint, which is an HTTP interface used by applications to exchange data. It creates a controller, input and output data classes, a service method, and a mapper.

In plain words
What is it for?
Use it when adding read, create, update, or delete operations for a resource such as an order. It produces the main Java files needed for the endpoint.
Why use it?
It keeps database entities out of the web layer and checks request data through validation-ready input classes. It also follows existing project conventions where possible.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the shipwithai-java-backend-toolkit plugin — 11 skills, 1 agent shipped together

Good fit Use it when adding read, create, update, or delete operations for a…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shipwithai/shipwithai-plugins/spring-rest-endpoint
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ShipWithAI/shipwithai-plugins --skill spring-rest-endpoint
Clone the repo
git clone --depth 1 https://github.com/ShipWithAI/shipwithai-plugins

Made for: Claude Code.

Or install shipwithai-java-backend-toolkit, the plugin that ships this one along with the rest of its 11 skills, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for spring-rest-endpoint

README.md
[![agentmods](https://agentmods.dev/badge/skills/shipwithai/shipwithai-plugins/spring-rest-endpoint.svg)](https://agentmods.dev/skills/shipwithai/shipwithai-plugins/spring-rest-endpoint)
Your own site
<a href="https://agentmods.dev/skills/shipwithai/shipwithai-plugins/spring-rest-endpoint"><img src="https://agentmods.dev/badge/skills/shipwithai/shipwithai-plugins/spring-rest-endpoint.svg" alt="Measured on agentmods" height="20"></a>
Per session 76 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 984 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00076 $0.00984
Opus 5 $0.00038 $0.00492
Sonnet 5 $0.00015 $0.00197
Haiku 4.5 $0.00008 $0.00098

Measured 7d ago against content hash af330509e8a1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

spring-rest-endpoint scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/java-backend-toolkit/skills/spring-rest-endpoint/SKILL.md · 87 lines

How it starts

The opening of the file, as written. The whole thing — 87 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Spring REST Endpoint — Scaffold

Generates a controller that returns DTOs only, so the entity-in-controller guardrail never fires. Output: controller, response DTO, request DTO, a service method, and an entity→DTO mapper.

Step 1 — Detect conventions

  • Base package: infer from src/main/java/.../ (the deepest package holding existing *Controller.java, else the application's root package).
  • Existing patterns: if the project already has a mapper/dto package or MapStruct on the classpath, match it; otherwise generate a plain hand-written mapper.

Step 2 — Gather the resource

Ask (or take from argument): resource name (e.g. Order), and which operations (GET /{id}, GET list, POST, PUT, DELETE). Default to read + create if unspecified.

Step 3 — Render templates

From assets/, substitute {{PACKAGE}}, {{RESOURCE}}, {{RESOURCE_LOWER}}:

  • Controller.java.tmpl<pkg>/web/{{RESOURCE}}Controller.java
  • ResponseDto.java.tmpl<pkg>/web/dto/{{RESOURCE}}Response.java
  • RequestDto.java.tmpl<pkg>/web/dto/{{RESOURCE}}Request.java

Rules baked into the templates:

  • Controller methods return {{RESOURCE}}Response / List<{{RESOURCE}}Response> / ResponseEntity<{{RESOURCE}}Response>never the entity.
  • @PostMapping/@PutMapping take @Valid @RequestBody {{RESOURCE}}Request.
  • A {{RESOURCE}}Mapper (or inline mapping in the service) converts entity → response.

Step 4 — Wire the service

If a {{RESOURCE}}Service exists, add the method; otherwise generate a minimal service that depends on the repository and returns the mapped DTO. Keep the @Transactional boundary on the public service method (not the controller).

Variant — Cursor (keyset) pagination

For list endpoints that page large or frequently-written tables, prefer cursor pagination over OFFSET/Pageable. Offset re-scans and skips the leading rows (slower as the page number grows) and skips or duplicates rows when concurrent inserts/deletes shift the offset between requests. Keyset paging is stable because it pages by the last seen key, not a row count.

Read the full file on GitHub · 87 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 87 lines · 76 tokens per session scan A af330509e8a1

Subscribe to this mod's changes

spring-rest-endpoint is a skill published in the GitHub repository ShipWithAI/shipwithai-plugins (10 stars, last pushed 24d ago), licensed MIT. It adds 76 tokens to every session and 984 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.