spring-boot-patterns

spring-boot-patterns is a skill for Claude Code from VersoXBT/claude-initial-setup. It costs 83 tokens per session (1,503 once invoked), scanned A, original, MIT.

A guide to common Spring Boot patterns for Java applications. Spring Boot is a Java framework that helps assemble web services and other applications using configuration, dependency injection, and built-in management endpoints.

In plain words
What is it for?
Use it when building Spring Boot services, wiring dependencies, separating application layers, configuring development and production profiles, or enabling actuator endpoints.
Why use it?
It helps keep application layers and environment settings organized. It also reduces confusion around service, repository, configuration, and monitoring patterns.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the claude-initial-setup plugin — 75 skills, 15 commands, 14 agents, 2 hooks shipped together

Good fit Use it when building Spring Boot services, wiring dependencies, separating application layers…

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

Made for: Claude Code.

Or install claude-initial-setup, the plugin that ships this one along with the rest of its 75 skills, 15 commands, 14 agents, 2 hooks.

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-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/versoxbt/claude-initial-setup/spring-boot-patterns.svg)](https://agentmods.dev/skills/versoxbt/claude-initial-setup/spring-boot-patterns)
Your own site
<a href="https://agentmods.dev/skills/versoxbt/claude-initial-setup/spring-boot-patterns"><img src="https://agentmods.dev/badge/skills/versoxbt/claude-initial-setup/spring-boot-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 83 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,503 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.00083 $0.01503
Opus 5 $0.00042 $0.00751
Sonnet 5 $0.00017 $0.00301
Haiku 4.5 $0.00008 $0.00150

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

Security

Grade A, and why

spring-boot-patterns 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/java/spring-boot-patterns/SKILL.md · 247 lines

How it starts

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

Spring Boot Patterns

Core patterns for building production-ready Spring Boot applications.

When to Use

  • User is setting up a Spring Boot project
  • User asks about @Component, @Service, @Repository usage
  • User needs dependency injection patterns
  • User is configuring profiles for dev/staging/prod
  • User asks about externalized configuration or actuator

Core Patterns

Stereotype Annotations -- Layer Separation

Use the correct annotation for each architectural layer. Spring applies different behaviors to each.

@Repository  // Data access -- translates persistence exceptions
public class UserRepository {
    private final JdbcTemplate jdbc;
    public UserRepository(JdbcTemplate jdbc) { this.jdbc = jdbc; }

    public Optional<User> findById(Long id) {
        return jdbc.query("SELECT * FROM users WHERE id = ?",
            new BeanPropertyRowMapper<>(User.class), id).stream().findFirst();
    }
}

@Service  // Business logic -- transactional boundaries live here
public class UserService {
    private final UserRepository userRepository;
    public UserService(UserRepository userRepository) { this.userRepository = userRepository; }

    @Transactional
    public User createUser(CreateUserRequest request) {
        return userRepository.save(new User(request.name(), request.email()));
    }
}

@RestController  // Web layer -- handles HTTP requests
@RequestMapping("/api/v1/users")
public class UserController {
    private final UserService userService;
    public UserController(UserService userService) { this.userService = userService; }

    @PostMapping
    @ResponseStatus(HttpStatus.CREATED)
    public UserResponse createUser(@Valid @RequestBody CreateUserRequest request) {
        return UserResponse.from(userService.createUser(request));
    }
}

Constructor Injection

Always use constructor injection. It makes dependencies explicit, supports immutability, and works with final fields. Avoid field injection with @Autowired.

@Service
public class OrderService {
    private final OrderRepository orderRepository;
    private final PaymentGateway paymentGateway;
    private final NotificationService notificationService;

    // Single constructor -- @Autowired is implicit, no annotation needed
    public OrderService(
            OrderRepository orderRepository,
            PaymentGateway paymentGateway,
            NotificationService notificationService) {
        this.orderRepository = orderRepository;
        this.paymentGateway = paymentGateway;
        this.notificationService = notificationService;
    }
}

Read the full file on GitHub · 247 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. 3d ago First seen · 247 lines · 83 tokens per session scan A 73d9214ca3fe

Subscribe to this mod's changes

spring-boot-patterns is a skill published in the GitHub repository VersoXBT/claude-initial-setup (4 stars, last pushed 4mo ago), licensed MIT. It adds 83 tokens to every session and 1,503 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-09-03.

Related

Other skills, from other repositories

claudehut-workflow

Use at the start of every session and whenever beginning a coding task in a Java/Spring backend - establishes the ClaudeHut 7-phase agentic workflow, the complexity-tier routing that lets small tasks skip deliberation phases, and the laws that govern which skills and rules must fire. Injected at session start; also…

taipt1504/claudehut · 86 tokens

java-expert

Use this skill when writing or reviewing Java code. Covers modern Java (17+), Spring Boot patterns, JPA/Hibernate, Maven/Gradle, testing with JUnit 5, security patterns, and production-grade enterp...

ApexIQ/skillsmith · 51 tokens

implement

Use in the Implement phase whenever writing or editing production Java code, or fixing a bug, in a Spring/Spring Boot project. Enforces test-first (red-green-refactor), executes the approved plan step by step, and honors the project's path-scoped tech-stack rules and the task's enforcement set. Preloaded into…

taipt1504/claudehut · 73 tokens

fastapi-templates

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

wshobson/agents · 37 tokens

java-patterns

Java: Spring Boot, CompletableFuture, records, sealed types, JPA/Hibernate, virtual threads. Triggers: Java, Spring, JPA, Hibernate, Maven, Gradle, virtual thread, sealed class.

softspark/ai-toolkit · 48 tokens

software-csharp-backend

Applies C# and .NET backend standards. Use when shaping API boundaries, data access, resilience, observability, or security defaults.

vasilyu1983/AI-Agents-public · 34 tokens