Spring Boot Best Practices

Spring Boot Best Practices is a skill for Claude Code, Codex from kousen/claude-code-training. It costs 17 tokens per session (1,382 once invoked), scanned A, original, MIT.

A set of rules for generating and reviewing Spring Boot code, a Java framework for building web applications and services.

In plain words
What is it for?
Use it when creating or checking Spring Boot controllers, services, repositories, data models, configuration, and error handling.
Why use it?
It keeps common code choices and project structure consistent, such as how services receive dependencies and how REST endpoints are organized.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when creating or checking Spring Boot controllers, services, repositories, data models, configuration, and error handling.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kousen/claude-code-training/spring-boot-skill
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 kousen/claude-code-training --skill spring-boot-skill
Clone the repo
git clone --depth 1 https://github.com/kousen/claude-code-training

Made for: Claude Code, Codex.

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 Boot Best Practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/kousen/claude-code-training/spring-boot-skill/github.svg)](https://agentmods.dev/skills/kousen/claude-code-training/spring-boot-skill)
Your own site
<a href="https://agentmods.dev/skills/kousen/claude-code-training/spring-boot-skill"><img src="https://agentmods.dev/badge/skills/kousen/claude-code-training/spring-boot-skill/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for Spring Boot Best Practices

Your own site · 80×15
<a href="https://agentmods.dev/skills/kousen/claude-code-training/spring-boot-skill"><img src="https://agentmods.dev/badge/skills/kousen/claude-code-training/spring-boot-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,382 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00017 $0.01382
Opus 5.5 $0.00007 $0.00553
Sonnet 5.5 $0.00003 $0.00276
Haiku 4.5 $0.00002 $0.00138

Measured 1mo ago against content hash bb76035a1aa7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

Spring Boot Best Practices 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 1mo 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-and-plugins/spring-boot-skill/SKILL.md · 233 lines

How it starts

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

Spring Boot Code Generation Guidelines

When generating or reviewing Spring Boot code, follow these best practices:

Dependency Injection

  • Use constructor injection, never field injection with @Autowired
  • Mark injected fields as private final
  • Let Lombok's @RequiredArgsConstructor generate constructors when appropriate
// Good
@Service
@RequiredArgsConstructor
public class UserService {
    private final UserRepository userRepository;
    private final EmailService emailService;
}

// Avoid
@Service
public class UserService {
    @Autowired
    private UserRepository userRepository; // Field injection - avoid
}

Package Structure

Follow standard Spring Boot layering:

com.example.project/
├── controller/       # REST endpoints, @RestController
├── service/          # Business logic, @Service
├── repository/       # Data access, extends JpaRepository
├── model/            # JPA entities, @Entity
├── dto/              # Data transfer objects
├── config/           # Configuration classes, @Configuration
└── exception/        # Custom exceptions and @ControllerAdvice

REST Controllers

  • Use proper HTTP methods (GET, POST, PUT, DELETE, PATCH)
  • Return ResponseEntity<T> for explicit status codes
  • Use @Valid for request body validation
  • Include API versioning in paths (e.g., /api/v1/users)
@RestController
@RequestMapping("/api/v1/users")
@RequiredArgsConstructor
public class UserController {
    private final UserService userService;

    @GetMapping("/{id}")
    public ResponseEntity<UserDto> getUser(@PathVariable Long id) {
        return userService.findById(id)
            .map(ResponseEntity::ok)
            .orElse(ResponseEntity.notFound().build());
    }

    @PostMapping
    public ResponseEntity<UserDto> createUser(@Valid @RequestBody CreateUserRequest request) {
        UserDto created = userService.create(request);
        return ResponseEntity.status(HttpStatus.CREATED).body(created);
    }
}

Read the full file on GitHub · 233 lines

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. 1mo ago First seen · 233 lines · 17 tokens per session scan A bb76035a1aa7

Subscribe to this mod's changes

Spring Boot Best Practices is a skill published in the GitHub repository kousen/claude-code-training (339 stars, last pushed 7d ago), licensed MIT. It adds 17 tokens to every session and 1,382 once invoked, about $0.0001 per session on Opus 5.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

wxjava-api-contributor

A contributor guide for adding or maintaining official WeChat API support in WxJava, a Java software development kit. It covers services, request and response data objects, data conversion, HTTP handling, starter configuration, and regression tests.

binarywang/WxJava · 68 tokens

azure-communication-callautomation-java

Build call automation workflows with Azure Communication Services Call Automation Java SDK. Use when implementing IVR systems, call routing, call recording, DTMF recognition, text-to-speech, or AI-powered call flows.

microsoft/skills · 49 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

azure-communication-common-java

Azure Communication Services common utilities for Java. Use when working with CommunicationTokenCredential, user identifiers, token refresh, or shared authentication across ACS services.

microsoft/skills · 35 tokens

azure-communication-sms-java

Send SMS messages with Azure Communication Services SMS Java SDK. Use when implementing SMS notifications, alerts, OTP delivery, bulk messaging, or delivery reports.

microsoft/skills · 36 tokens

java-coding-standards

Java coding standards for Spring Boot services: naming, immutability, Optional usage, streams, exceptions, generics, and project layout.

hashgraph-online/awesome-codex-plugins · 35 tokens