java-spring-development — Claude Code skill: Spring Boot 3.x
Teaches the agent to build enterprise apps with Spring Boot 3.x and Java 17+: layered architecture, REST APIs, Spring Data JPA, Spring Security, and tests.
npx skills add Mindrally/skills --skill java-spring-development -a claude-codeWhat java-spring-development does
The skill sets guidelines for Spring Boot 3.x development with Java 17+ features (records, sealed classes, pattern matching). Inside: project structure (controllers, services, repositories, models, configurations), dependency injection patterns (constructor injection, @RequiredArgsConstructor with Lombok), REST API design with proper status codes and DTOs, Spring Data JPA setup (lazy loading, pagination, custom queries), schema migrations via Flyway or Liquibase. Adds sections on Spring Security (BCrypt, CORS, roles), input validation, testing (JUnit 5, Mockito, @SpringBootTest, MockMvc, test containers), caching (Redis, Caffeine), async processing (@Async), logging (SLF4J, Logback, correlation IDs), and monitoring with Spring Boot Actuator.
The agent follows SOLID, designs for microservices, uses Springdoc OpenAPI for docs. Tests follow Given-When-Then; migrations are versioned and never modified after application.
What it helps with
- Build a REST API with versioning, DTOs, and error handling
- Configure Spring Security with roles, BCrypt, and CORS
- Write a JPA repository with pagination and custom queries
- Add Redis caching with TTL and eviction strategy
- Cover business logic with Mockito unit tests
Example prompts for the agent
- Create a controller at
/api/orderswith pagination and DTO validation - Set up Spring Security: JWT tokens,
ADMINandUSERroles - Add a Flyway migration for the
paymentstable with a foreign key toorders
How to install java-spring-development
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill java-spring-development -a claude-code2Manually: put the files in place
~/.claude/skills/java-spring-development/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/java-spring-development/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill java-spring-development -a codex2Manually: put the files in place
.agents/skills/java-spring-development/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill java-spring-development -a cursor2Manually: put the files in place
.cursor/skills/java-spring-development/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Mindrally/skills java-spring-development2Manually: put the files in place
.github/skills/java-spring-development/SKILL.md1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill java-spring-development -a gemini-cli2Platform CLI
gemini skills install https://github.com/Mindrally/skills --path java-spring-developmentManually: put the files in place
.devin/skills/java-spring-development/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add Mindrally/skills --skill java-spring-development -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about java-spring-development
How to install java-spring-development in Claude Code?
Run npx skills add Mindrally/skills --skill java-spring-development -a claude-code, the file will appear at ~/.claude/skills/java-spring-development/SKILL.md.
What does java-spring-development do?
Teaches the agent to build Spring Boot 3.x applications: layered structure, REST APIs, Spring Data JPA, Spring Security, tests, caching, migrations, and Actuator monitoring.
Which Java version does the skill require?
Java 17 and above — the skill uses records, sealed classes, and pattern matching from newer language versions.
Source text
SKILL.md · Apache-2.0
--- name: java-spring-development description: Java Spring Boot development guidelines with best practices for building robust, secure, and maintainable enterprise applications metadata: maintainer: Mindrally source: https://github.com/Mindrally/skills --- # Java Spring Development Best Practices ## Core Principles - Write clean, efficient, and well-documented Java code with accurate Spring Boot examples - Use Spring Boot 3.x with Java 17+ features (records, sealed classes, pattern matching) - Prefer constructor injection over field injection for better testability - Follow SOLID principles and RESTful API design patterns - Design for microservices architecture suitability ## Project Structure Organize code using the standard layered pattern: ``` project/ ├── controllers/ # REST controllers ├── services/ # Business logic ├── repositories/ # Data access layer ├── models/ # Domain entities and DTOs └── configurations/ # Spring configurations ``` ## Dependency Injection - Use constructor injection for required dependencies - Leverage `@RequiredArgsConstructor` with Lombok for cleaner code - Keep constructors simple and avoid logic in them - Use `@Qualifier` when multiple implementations exist ## REST API Design - Use appropriate HTTP methods (GET, POST, PUT, DELETE, PATCH) - Return proper HTTP status codes - Implement consistent error response format - Use DTOs to control API contract - Version APIs when needed ## Data Access ### Spring Data JPA - Define proper entity relationships (@OneToMany, @ManyToOne, etc.) - Use lazy loading appropriately to avoid N+1 queries - Implement pagination for large result sets - Use query methods and @Query for custom queries ### Database Migrations - Use Flyway or Liquibase for schema migrations - Version migration scripts properly - Never modify existing migrations - Test migrations in development before production ## Security ### Spring Security - Implement authentication and authorization properly - Use BCrypt for password encoding - Configure CORS appropriately - Protect endpoints based on roles/permissions - Use HTTPS in production ### Secure Coding - Validate all user inputs - Sanitize data to prevent injection attacks - Avoid exposing sensitive information in responses - Use parameterized queries ## Testing ### Unit Testing - Use JUnit 5 for unit tests - Mock dependencies with Mockito - Test business logic thoroughly - Follow Given-When-Then pattern ### Integration Testing - Use @SpringBootTest for integration tests - Use MockMvc for web layer testing - Test database operations with test containers - Test security configurations ## Performance ### Caching - Use Spring Cache abstraction - Configure appropriate cache providers (Redis, Caffeine) - Set proper TTL for cached data - Implement cache eviction strategies ### Async Processing - Use @Async for non-blocking operations - Configure thread pools appropriately - Handle exceptions in async methods - Consider using reactive patterns for high concurrency ## Logging and Monitoring ### Logging - Use SLF4J with Logback - Log at appropriate levels - Include correlation IDs for tracing - Avoid logging sensitive data ### Monitoring - Use Spring Boot Actuator for health and metrics - Export metrics to monitoring systems - Set up proper health checks - Monitor application performance ## API Documentation - Use Springdoc OpenAPI for API documentation - Document all endpoints with descriptions - Include request/response examples - Keep documentation up to date with code
© Mindrally · Apache-2.0 · Mindrally/skills