Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Creates and scaffolds a new Spring Boot project (3.x or 4.x) by downloading from Spring Initializr, generating package structure (DDD or Layered architecture), configuring JPA, SpringDoc OpenAPI, and Docker Compose services (PostgreSQL, Redis, MongoDB). Use when creating a new Java Spring Boot project from scratch, bootstrapping a microservice, or initializing a backend application.
.claude/skills/giuseppe-trisciuoglio-spring-boot-project-creator/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-06 | ✗→✓ | ▲ Improved | 160% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 118% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 219% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 165% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 215% | 0% |
Generates a fully configured Spring Boot project from scratch using the Spring Initializr API. The skill walks the user through selecting project parameters, choosing an architecture style (DDD or Layered), configuring data stores, and setting up Docker Compose for local development. The result is a build-ready project with standardized structure, dependency management, and configuration.
Before starting, ensure the following tools are installed:
Follow these steps to create a new Spring Boot project.
Ask the user for the following project parameters using AskUserQuestion. Provide sensible defaults:
| Parameter | Default | Options | |-----------|---------|---------| | Group ID | com.example | Any valid Java package name | | Artifact ID | demo | Kebab-case identifier | | Package Name | Same as Group ID | Valid Java package | | Spring Boot Version | 3.4.5 | 3.4.x, 4.0.x (check start.spring.io for latest) | | Java Version | 21 | 17, 21 | | Architecture | User choice | DDD or Layered | | Docker Services | User choice | PostgreSQL, Redis, MongoDB (multi-select) | | Build Tool | maven | maven, gradle |
Use curl to download the project scaffold from start.spring.io.
Base dependencies (always included):
web — Spring Web MVCvalidation — Jakarta Bean Validationdata-jpa — Spring Data JPAtestcontainers — Testcontainers supportConditional dependencies (based on Docker Services selection):
postgresqldata-redisdata-mongodbbash# Example for Spring Boot 3.4.5 with PostgreSQL only curl -s https://start.spring.io/starter.zip \ -d type=maven-project \ -d language=java \ -d bootVersion=3.4.5 \ -d groupId=com.example \ -d artifactId=demo \ -d packageName=com.example \ -d javaVersion=21 \ -d packaging=jar \ -d dependencies=web,data-jpa,postgresql,validation,testcontainers \ -o starter.zip unzip -o starter.zip -d ./demo rm starter.zip cd demo
Edit pom.xml to add SpringDoc OpenAPI and ArchUnit for architectural testing.
xml<!-- SpringDoc OpenAPI --> <dependency> <groupId>org.springdoc</groupId> <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId> <version>2.8.15</version> </dependency> <!-- ArchUnit for architecture tests --> <dependency> <groupId>com.tngtech.archunit</groupId> <artifactId>archunit-junit5</artifactId> <version>1.4.1</version> <scope>test</scope> </dependency>
Based on the user's choice, create the package structure under src/main/java/<packagePath>/.
src/main/java/com/example/
├── controller/ # REST controllers (@RestController)
├── service/ # Business logic (@Service)
├── repository/ # Data access (@Repository, Spring Data interfaces)
├── model/ # JPA entities (@Entity)
│ └── dto/ # Request/Response DTOs (Java records)
├── config/ # Configuration classes (@Configuration)
└── exception/ # Custom exceptions and @ControllerAdviceCreate placeholder classes for each layer:
@RestControllerAdvice with standard error handlingsrc/main/java/com/example/
├── domain/ # Core domain (framework-free)
│ ├── model/ # Entities, Value Objects, Aggregates
│ ├── repository/ # Repository interfaces (ports)
│ └── exception/ # Domain exceptions
├── application/ # Use cases / Application services
│ ├── service/ # @Service orchestration
│ └── dto/ # Input/Output DTOs (records)
├── infrastructure/ # External adapters
│ ├── persistence/ # JPA entities, Spring Data repos
│ └── config/ # Spring @Configuration
└── presentation/ # REST API layer
├── controller/ # @RestController
└── exception/ # @RestControllerAdviceCreate placeholder classes for each layer:
@RestControllerAdvice with standard error handlingCreate src/main/resources/application.properties with the selected services.
Always include:
properties# Application spring.application.name=${artifactId} # SpringDoc OpenAPI springdoc.swagger-ui.doc-expansion=none springdoc.swagger-ui.operations-sorter=alpha springdoc.swagger-ui.tags-sorter=alpha
If PostgreSQL is selected:
properties# PostgreSQL / JPA spring.datasource.driver-class-name=org.postgresql.Driver spring.datasource.url=jdbc:postgresql://localhost:5432/${POSTGRES_DB:postgres} spring.datasource.username=${POSTGRES_USER:postgres} spring.datasource.password=${POSTGRES_PASSWORD:changeme} spring.jpa.hibernate.ddl-auto=update spring.jpa.show-sql=true spring.jpa.properties.hibernate.format_sql=true
If Redis is selected:
properties# Redis spring.data.redis.host=localhost spring.data.redis.port=6379 spring.data.redis.password=${REDIS_PASSWORD:changeme}
If MongoDB is selected:
properties# MongoDB spring.data.mongodb.host=localhost spring.data.mongodb.port=27017 spring.data.mongodb.authentication-database=admin spring.data.mongodb.username=${MONGO_USER:root} spring.data.mongodb.password=${MONGO_PASSWORD:changeme} spring.data.mongodb.database=${MONGO_DB:test}
Create docker-compose.yaml at the project root with only the services the user selected.
yamlservices: # Include if PostgreSQL selected postgresql: image: postgres:17 ports: - "5432:5432" environment: POSTGRES_USER: ${POSTGRES_USER:-postgres} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme} POSTGRES_DB: ${POSTGRES_DB:-postgres} volumes: - ./postgres_data:/var/lib/postgresql/data # Include if Redis selected redis: image: redis:7 ports: - "6379:6379" command: redis-server --requirepass ${REDIS_PASSWORD:-changeme} volumes: - ./redis_data:/data # Include if MongoDB selected mongodb: image: mongo:8 ports: - "27017:27017" environment: MONGO_INITDB_ROOT_USERNAME: ${MONGO_USER:-root} MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD:-changeme} volumes: - ./mongo_data:/data/db
.env File for Docker ComposeCreate a .env file at the project root with default credentials for local development:
env# PostgreSQL POSTGRES_USER=postgres POSTGRES_PASSWORD=changeme POSTGRES_DB=postgres # Redis REDIS_PASSWORD=changeme # MongoDB MONGO_USER=root MONGO_PASSWORD=changeme MONGO_DB=test
Include only the variables for the services the user selected. Docker Compose automatically loads this file.
Append Docker Compose volume directories and the .env file to .gitignore:
# Docker Compose
.env
postgres_data/
redis_data/
mongo_data/Run the Maven build to confirm the project compiles and tests pass:
bash./mvnw clean verify
If the build succeeds, inform the user. If it fails, diagnose and fix the issue before proceeding.
Display a summary of the created project:
Project Created Successfully
Artifact: <artifactId>
Spring Boot: <version>
Java: <javaVersion>
Architecture: <DDD | Layered>
Build Tool: Maven
Docker: <services list>
Directory: ./<artifactId>/
Next Steps:
1. cd <artifactId>
2. docker compose up -d
3. ./mvnw spring-boot:run
4. Open http://localhost:8080/swagger-ui.htmlTraditional three-tier architecture with clear separation of concerns:
| Layer | Package | Responsibility | |-------|---------|---------------| | Presentation | controller/ | HTTP endpoints, request/response mapping | | Business | service/ | Business logic, transaction management | | Data Access | repository/ | Database operations via Spring Data | | Domain | model/ | JPA entities and DTOs |
Best for: Simple CRUD applications, small-to-medium services, teams new to Spring Boot.
Domain-Driven Design with hexagonal boundaries:
| Layer | Package | Responsibility | |-------|---------|---------------| | Domain | domain/ | Entities, value objects, domain services (framework-free) | | Application | application/ | Use cases, orchestration, DTO mapping | | Infrastructure | infrastructure/ | JPA adapters, external integrations, configuration | | Presentation | presentation/ | REST controllers, error handling |
Best for: Complex business domains, microservices with rich logic, long-lived projects.
User request: "Create a Spring Boot project for a REST API with PostgreSQL"
bashcurl -s https://start.spring.io/starter.zip \ -d type=maven-project \ -d bootVersion=3.4.5 \ -d groupId=com.example \ -d artifactId=my-api \ -d packageName=com.example.myapi \ -d javaVersion=21 \ -d dependencies=web,data-jpa,postgresql,validation,testcontainers \ -o starter.zip
Result: Layered project with controller/, service/, repository/, model/ packages, PostgreSQL Docker Compose, and SpringDoc OpenAPI.
User request: "Bootstrap a Spring Boot 3 microservice with DDD, PostgreSQL and Redis"
bashcurl -s https://start.spring.io/starter.zip \ -d type=maven-project \ -d bootVersion=3.4.5 \ -d groupId=com.acme \ -d artifactId=order-service \ -d packageName=com.acme.order \ -d javaVersion=21 \ -d dependencies=web,data-jpa,postgresql,data-redis,validation,testcontainers \ -o starter.zip
Result: DDD project with domain/, application/, infrastructure/, presentation/ packages, PostgreSQL + Redis Docker Compose, and SpringDoc OpenAPI.
domain/.docker-compose.yaml to avoid unexpected breaking changes../mvnw clean verify after setup to ensure everything compiles and tests pass..env file (git-ignored) — never commit secrets to version control.spring.jpa.hibernate.ddl-auto=update setting is for development only — use Flyway or Liquibase in production.| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-06 | fail→pass | 11,041 | 6,270 | -43% | 1 | 1 | 0% | 1,720 | 4,469 | +160% | 0 | 0 | — |
case-01 | fail→fail | 43,505 | 3,856 | -91% | 1 | 1 | 0% | 4,933 | 3,976 | -19% | 0 | 0 | — |
case-02 | fail→fail | 27,029 | 5,905 | -78% | 1 | 1 | 0% | 6,184 | 4,110 | -34% | 0 | 0 | — |
case-03 | fail→fail | 35,275 | 3,650 | -90% | 1 | 1 | 0% | 4,533 | 3,974 | -12% | 0 | 0 | — |
case-04 | fail→fail | 12,951 | 4,405 | -66% | 1 | 1 | 0% | 1,418 | 4,180 | +195% | 0 | 0 | — |
case-05 | fail→pass | 12,537 | 5,663 | -55% | 1 | 1 | 0% | 2,007 | 4,380 | +118% | 0 | 0 | — |
case-07 | pass→pass | 10,568 | 3,584 | -66% | 1 | 1 | 0% | 1,933 | 3,912 | +102% | 0 | 0 | — |
case-08 | fail→pass | 7,196 | 3,248 | -55% | 1 | 1 | 0% | 1,254 | 4,004 | +219% | 0 | 0 | — |
case-09 | fail→pass | 11,692 | 4,099 | -65% | 1 | 1 | 0% | 1,550 | 4,115 | +165% | 0 | 0 | — |
case-10 | pass→pass | 7,198 | 3,718 | -48% | 1 | 1 | 0% | 1,161 | 4,012 | +246% | 0 | 0 | — |
case-11 | pass→pass | 4,584 | 1,803 | -61% | 1 | 1 | 0% | 842 | 3,632 | +331% | 0 | 0 | — |
case-12 | pass→pass | 4,626 | 3,689 | -20% | 1 | 1 | 0% | 836 | 3,974 | +375% | 0 | 0 | — |
case-13 | fail→pass | 7,160 | 3,910 | -45% | 1 | 1 | 0% | 1,269 | 4,002 | +215% | 0 | 0 | — |
case-14 | pass→pass | 6,182 | 4,124 | -33% | 1 | 1 | 0% | 1,210 | 4,087 | +238% | 0 | 0 | — |
case-15 | fail→pass | 4,947 | 2,420 | -51% | 1 | 1 | 0% | 800 | 3,734 | +367% | 0 | 0 | — |
case-16 | fail→fail | 12,054 | 8,801 | -27% | 1 | 1 | 0% | 2,254 | 5,058 | +124% | 0 | 0 | — |
case-17 | fail→pass | 15,762 | 3,364 | -79% | 1 | 1 | 0% | 1,542 | 3,868 | +151% | 0 | 0 | — |
case-18 | pass→pass | 16,333 | 8,290 | -49% | 1 | 1 | 0% | 2,522 | 5,035 | +100% | 0 | 0 | — |
case-19 | pass→pass | 13,595 | 2,424 | -82% | 1 | 1 | 0% | 2,135 | 3,725 | +74% | 0 | 0 | — |
case-20 | pass→pass | 10,281 | 11,793 | +15% | 1 | 1 | 0% | 2,134 | 5,848 | +174% | 0 | 0 | — |
case-21 | pass→pass | 7,981 | 7,043 | -12% | 1 | 1 | 0% | 1,501 | 4,759 | +217% | 0 | 0 | — |
case-22 | pass→pass | 11,525 | 8,502 | -26% | 1 | 1 | 0% | 2,082 | 4,804 | +131% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +32 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.