Skip to main content
skill CX Codex

spring-boot · mindrally — Claude Code skill: Spring Boot coding rules

A skill that gives your agent Spring Boot conventions: REST controllers, JUnit tests, security, build and deploy. Useful when the project is Java.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Mindrally/skills --skill spring-boot -a claude-code
Open on GitHub

What spring-boot does

The skill turns the assistant into a Spring Boot hand: Java, Spring Framework, Maven, JUnit. It lays out package structure — controllers, services, repositories, models, configurations — and asks for names that mean something: PascalCase for classes, camelCase for methods, ALL_CAPS for constants.

Inside is a set of rules by topic. Configuration lives in application.properties or application.yml, dependency injection goes through constructors rather than fields. Tests use JUnit 5, the web layer is checked with MockMvc, repositories with @DataJpaTest, and Testcontainers cover database integration. Separate sections cover Spring Security with BCrypt, logging through SLF4J and Logback, Actuator metrics, and API docs in Springdoc OpenAPI.

The skill assumes Java 17 or later and Spring Boot 3.x — on older versions the advice about records and sealed classes won't apply. Builds are described for Maven or Gradle, and sensitive settings are pushed into environment variables.

What it helps with

  • split code into controller, service and repository layers
  • write an integration test with Testcontainers instead of mocks
  • lock down REST endpoints with Spring Security and BCrypt
  • set up dev, test and prod profiles without touching code
  • expose health checks and metrics through Actuator

Example prompts for the agent

  • Split this service into controller, service and repository following the spring-boot skill
  • Write MockMvc and @SpringBootTest tests for OrderController
  • Review the Spring Security config and point out where field injection should become constructor injection

How to install spring-boot

1Skills CLI (Vercel)

npx skills add Mindrally/skills --skill spring-boot -a claude-code

2Manually: put the files in place

~/.claude/skills/spring-boot/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/spring-boot/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about spring-boot

How do I install spring-boot in Claude?

Run npx skills add Mindrally/skills --skill spring-boot -a claude-code. The skill file lands at ~/.claude/skills/spring-boot/SKILL.md.

What does the spring-boot skill do?

It gives the agent Spring Boot conventions: package layout, naming, constructor injection, testing, security, logging and build. The assistant follows them when writing or editing code.

Which Java and Spring Boot versions does it target?

It targets Java 17 or later and Spring Boot 3.x. On older versions the guidance on records, sealed classes and pattern matching does not apply.

Source text

SKILL.md · Apache-2.0
---
name: spring-boot
description: Expert guidance for Spring Boot application development with best practices for RESTful APIs, testing, security, and deployment
metadata:
  maintainer: Mindrally
  source: https://github.com/Mindrally/skills
---

# Spring Boot

You are an expert in Java programming, Spring Boot, Spring Framework, Maven, JUnit, and related Java technologies.

## Code Style and Structure

- Write clean, efficient, and well-documented Java code using Spring Boot conventions
- Follow RESTful API design patterns for web services
- Use descriptive method and variable names following camelCase convention
- Structure applications with consistent package organization (controllers, services, repositories, models, configurations)

## Spring Boot Specifics

- Leverage Spring Boot starters for rapid application development
- Use auto-configuration effectively to minimize boilerplate
- Implement proper annotations (@SpringBootApplication, @RestController, @Service, @Repository)
- Handle exceptions globally via @ControllerAdvice and @ExceptionHandler

## Naming Conventions

- Use PascalCase for class names (e.g., UserController, OrderService)
- Use camelCase for method and variable names (e.g., findUserById, isOrderValid)
- Use ALL_CAPS for constants (e.g., MAX_RETRY_ATTEMPTS, DEFAULT_PAGE_SIZE)

## Java and Spring Boot Usage

- Use Java 17 or later features when applicable (e.g., records, sealed classes, pattern matching)
- Leverage Spring Boot 3.x capabilities and features
- Use Spring Data JPA for database operations with proper entity relationships
- Implement Bean Validation using Jakarta Validation annotations

## Configuration and Properties

- Store configuration in application.properties or application.yml
- Use @Value or @ConfigurationProperties for type-safe configuration injection
- Implement environment-specific configurations using Spring Profiles (dev, test, prod)

## Dependency Injection

- Prefer constructor injection over field injection for better testability
- Use CDI annotations appropriately (@Autowired, @Qualifier)
- Follow the principle of programming to interfaces

## Testing

- Write comprehensive unit tests using JUnit 5 and Spring Boot Test
- Use MockMvc for testing REST endpoints and web layer components
- Implement integration tests with @SpringBootTest
- Use @DataJpaTest for repository layer testing
- Leverage Testcontainers for database integration testing

## Performance and Scalability

- Implement caching strategies using Spring Cache abstraction
- Use @Async for asynchronous, non-blocking operations
- Optimize database queries using proper indexing and fetch strategies
- Consider connection pooling with HikariCP

## Security

- Implement Spring Security for authentication and authorization
- Use BCrypt for secure password encoding
- Configure CORS settings appropriately for web applications
- Implement proper input validation to prevent injection attacks

## Logging and Monitoring

- Use SLF4J with Logback for structured logging
- Implement appropriate log levels (ERROR, WARN, INFO, DEBUG)
- Leverage Spring Boot Actuator for health checks, metrics, and monitoring
- Integrate with monitoring tools (Prometheus, Grafana)

## API Documentation

- Use Springdoc OpenAPI for comprehensive API documentation
- Provide detailed annotations for endpoints, parameters, and responses
- Generate interactive API documentation with Swagger UI

## Build and Deployment

- Use Maven or Gradle for dependency management and builds
- Implement multi-stage Docker builds for optimized container images
- Configure CI/CD pipelines for automated testing and deployment
- Use environment variables for sensitive configuration

## General Best Practices

- Follow RESTful API design principles with proper HTTP methods and status codes
- Design for microservices architecture when appropriate
- Adhere to SOLID principles for clean, maintainable code
- Maintain high cohesion within components and low coupling between them
- Implement proper error handling with meaningful error responses

© Mindrally · Apache-2.0 · Mindrally/skills

Similar skills

Everything for Backend and APIs →

spring-boot by other authors comes first.

spring-boot Claude MPM Team A skill that gives your agent a Spring Boot 3.x reference: auto-configuration, dependency injection, REST controllers, Actuator. Useful when you write Java services. CX Codex +1 309installs spring-boot-engineer https://github.com/Jeffallan Generates Spring Boot 3.x code, JPA repositories, REST controllers, and Spring Security 6 configurations. Useful when writing Java microservices and reactive endpoints. CX Codex +1 8,400installs 302-frameworks-spring-boot-rest Juan Antonio Breña Moral A skill that guides an agent through designing and reviewing Spring Boot REST APIs: methods, status codes, DTOs, versioning, pagination, RFC 7807 errors. CX Codex +1 392installs 303-frameworks-spring-boot-validation Juan Antonio Breña Moral A skill that tells your coding agent how to design and review Spring Boot validation: Bean Validation on DTOs, @Valid at API boundaries, constraint groups and consistent 400 responses. CX Codex +1 303installs java-spring-boot pluginagentmarketplace Generates production-grade Spring Boot 3.x code, covering REST controllers, Spring Security with JWT, Spring Data JPA repositories, and Actuator metrics. CX Codex +1 11,800installs spring-boot-crud-patterns giuseppe-trisciuoglio A skill that builds the whole CRUD layer for Spring Boot 3 services: aggregates, JPA repositories, DTOs and REST controllers in a feature-based layout. CX Codex +1 3,900installs spring-boot-development manutej A skill that gives your coding agent a Spring Boot reference: auto-configuration, dependency injection, REST controllers, Spring Data and Spring Security. CX Codex +1 534installs

From the same set168

fastify-typescript Gives the agent a rulebook for Fastify and TypeScript: validation schemas, plugins, Prisma access and Jest tests. Useful when you build a typed REST API. CX Codex +1 856installs performance-optimization A rule set for web performance: server-side rendering, CSS, JavaScript, assets and caching. Useful when your agent writes frontend code and you want a bar to hold it to. CX Codex +1 848installs sass-best-practices A skill that hands your agent a rulebook for indented-syntax Sass: file layout, variables, mixins, BEM. Useful when the project stylesheets are .sass, not SCSS. CX Codex +1 845installs elixir A skill that tells your coding agent how to write Elixir and Phoenix: functional patterns, Ecto, LiveView, OTP. Useful when the project actually runs on BEAM. CX Codex +1 836installs responsive-design A skill that hands your coding agent a set of responsive design rules: mobile-first CSS, flexible layouts, media queries, adaptive images and type. CX Codex +1 830installs ghost Gives your agent working knowledge of Ghost CMS theme development: Handlebars templates, partials, Tailwind CSS and Alpine.js wiring, image and SEO work. CX Codex +1 828installs websocket-development A rule set that steers the agent through building WebSocket servers and clients: connections, messages, scaling, security. CX Codex +1 826installs hono-typescript Hands your agent a rulebook for building Hono and TypeScript APIs on Cloudflare Workers, Deno, Bun and Node.js. Useful once the project already runs on Hono. CX Codex +1 819installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor