spring-service

A command that generates a Spring Boot service class for a named entity, along with its tests. Spring Boot is a Java framework for building web applications and services.

In plain words
What is it for?
It helps create services with repository access, create/read/update/delete operations, logging, exception handling, request mapping, and JUnit 5 with Mockito tests.
Why use it?
It removes repetitive setup for common data operations while following the existing project's structure. It also provides tests for normal cases, missing records, and write-operation edge cases.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/kousen/claude-code-training/spring-service
Any agent
npx skills add kousen/claude-code-training --skill spring-service
Clone the repo
git clone --depth 1 https://github.com/kousen/claude-code-training

Made for: Claude Code, Codex.

Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 315 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00034 $0.00315
Opus 5 $0.00017 $0.00158
Sonnet 5 $0.00007 $0.00063
Haiku 4.5 $0.00003 $0.00032

Measured 3d ago against content hash 7fcb4dac738d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

spring-service 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 3d 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.

skills/spring-service/SKILL.md · 29 lines

What it actually says

Spring Service Scaffold

Generate a $ARGUMENTSService with:

  • @Service annotation
  • Constructor injection of $ARGUMENTSRepository (no field @Autowired)
  • CRUD methods: findAll(), findById(id), create(request), update(id, request), delete(id)
  • Domain exceptions (e.g., EntityNotFoundException) thrown for missing-by-id; let @ControllerAdvice translate to HTTP if present
  • SLF4J logging at meaningful boundaries — entry on writes, warn on validation rejection, debug on reads
  • Unit tests using JUnit 5 + Mockito, with @MockitoBean and @MockitoSpyBean where appropriate
  • Use modern Java idioms (records for DTOs, pattern matching, var where readable)

Constraints

  • Match the existing project package layout
  • Don't introduce Lombok if the project doesn't already use it
  • If the project uses MapStruct, generate a mapper interface; otherwise, write the mapping inline
  • Tests should cover happy path, not-found, and at least one validation/edge case per write method

Usage: /spring-service UserUserService, UserServiceTest

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. 3d ago First seen · 29 lines · 34 tokens per session scan A 7fcb4dac738d

Subscribe to this mod's changes

spring-service is a skill published in the GitHub repository kousen/claude-code-training (335 stars, last pushed 6d ago), licensed MIT. It adds 34 tokens to every session and 315 once invoked, about $0.0002 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-30.

Related

Other skills, from other repositories

airflow-java-sdk

Guide for contributing to the Airflow Java SDK (AIP-108). Use this skill whenever a contributor is working in the java-sdk/ directory or on the Java coordinator in task-sdk/src/airflow/sdk/coordinators/java/ — whether they want to add a feature, write tests, fix a bug, understand the architecture, or prepare a PR.…

apache/airflow · 119 tokens

jni-type-conversion

How to use @JniType annotations for ergonomic JNI. Relevant for Java files that use @NativeMethods or @CalledByNative.

chromium/chromium · 32 tokens

wxjava-module-selector

根据微信公众号、小程序、微信支付、企业微信、开放平台、视频号或微信小店、腾讯企点和微信智能对话等业务场景,为用户选择合适的 WxJava Maven 模块、BOM 和示例入口。适用于用户询问“该用哪个模块”、依赖坐标、产品边界或单/多账号 Starter 选择时。.

binarywang/WxJava · 86 tokens

azure-ai-formrecognizer-java

Azure AI Document Intelligence SDK for Java (com.azure:azure-ai-documentintelligence). Use for extracting text, tables, key-value pairs from documents, receipts, invoices, IDs, or building custom document models. Triggers: "document intelligence java", "form recognizer java", "extract text from PDF java", "OCR…

microsoft/skills · 92 tokens

azure-ai-anomalydetector-java

Build anomaly detection applications with Azure AI Anomaly Detector SDK for Java. Use when implementing univariate/multivariate anomaly detection, time-series analysis, or AI-powered monitoring.

microsoft/skills · 43 tokens

azure-communication-chat-java

Build real-time chat applications with Azure Communication Services Chat Java SDK. Use when implementing chat threads, messaging, participants, read receipts, typing notifications, or real-time chat features.

microsoft/skills · 41 tokens