Source profileQuality 71/100

github/awesome-copilot/skills/java-springboot/SKILL.md

java-springboot

Get best practices for developing applications with Spring Boot.

Source repository stars
37,126
Declared platforms
0
Static risk flags
1
Last source update
2026-07-28
Source checked
2026-07-28

Decision brief

What it does—and where it fits

Your goal is to help me write high-quality Spring Boot applications by following established best practices.

Best for

    Not for

    • Tasks that require unconfirmed production actions or broad system permissions.
    • Environments where the pinned source and install steps cannot be inspected.

    Compatibility matrix

    Platform support, with evidence labels

    PlatformStatusEvidenceWhat to check
    CodexNot declaredNo explicit evidencePortability before use
    Claude CodeNot declaredNo explicit evidencePortability before use
    CursorNot declaredNo explicit evidencePortability before use
    Gemini CLINot declaredNo explicit evidencePortability before use
    Open the compatibility checker

    Installation

    Inspect first. Install second.

    The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

    Source-detected install commandSource
    npx skills add https://github.com/github/awesome-copilot --skill "skills/java-springboot"
    Safe inspection promptEditorial

    Inspect the Agent Skill "java-springboot" from https://github.com/github/awesome-copilot/blob/9933dcad5be5caeb288cebcd370eeeb2fc2f1685/skills/java-springboot/SKILL.md at commit 9933dcad5be5caeb288cebcd370eeeb2fc2f1685. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

    Workflow

    What the source asks the agent to do

    1. 01

      Project Setup & Structure

      Build Tool: Use Maven (pom.xml) or Gradle (build.gradle) for dependency management.

      Build Tool: Use Maven (pom.xml) or Gradle (build.gradle) for dependency management.Starters: Use Spring Boot starters (e.g., spring-boot-starter-web, spring-boot-starter-data-jpa) to simplify dependency management.Package Structure: Organize code by feature/domain (e.g., com.example.app.order, com.example.app.user) rather than by layer (e.g., com.example.app.controller, com.example.app.service).
    2. 02

      Dependency Injection & Components

      Constructor Injection: Always use constructor-based injection for required dependencies. This makes components easier to test and dependencies explicit.

      Constructor Injection: Always use constructor-based injection for required dependencies. This makes components easier to test and dependencies explicit.Immutability: Declare dependency fields as private final.Component Stereotypes: Use @Component, @Service, @Repository, and @Controller/@RestController annotations appropriately to define beans.
    3. 03

      Configuration

      Externalized Configuration: Use application.yml (or application.properties) for configuration. YAML is often preferred for its readability and hierarchical structure.

      Externalized Configuration: Use application.yml (or application.properties) for configuration. YAML is often preferred for its readability and hierarchical structure.Type-Safe Properties: Use @ConfigurationProperties to bind configuration to strongly-typed Java objects.Profiles: Use Spring Profiles (application-dev.yml, application-prod.yml) to manage environment-specific configurations.
    4. 04

      Web Layer (Controllers)

      RESTful APIs: Design clear and consistent RESTful endpoints.

      RESTful APIs: Design clear and consistent RESTful endpoints.DTOs (Data Transfer Objects): Use DTOs to expose and consume data in the API layer. Do not expose JPA entities directly to the client.Validation: Use Java Bean Validation (JSR 380) with annotations (@Valid, @NotNull, @Size) on DTOs to validate request payloads.

    Permission review

    Static risk signals and limitations

    Network access

    medium · line 40

    The documentation includes network, browsing, or remote request actions.

    **Custom Queries:** For complex queries, use `@Query` or the JPA Criteria API.

    Evidence record

    Why each signal appears

    EvidenceSourceComputedTestedEditorial
    SignalValueEvidence typeMeaning
    Quality score71/100ComputedDocumentation, specificity, maintenance, and trust rules
    Repository stars37,126SourceRepository attention, not individual Skill quality
    Compatibility0 platformsSourceDeclared in the catalog source record
    Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

    Pinned source

    Provenance and original SKILL.md

    Repository
    github/awesome-copilot
    Skill path
    skills/java-springboot/SKILL.md
    Commit
    9933dcad5be5caeb288cebcd370eeeb2fc2f1685
    License
    MIT
    Collected
    2026-07-28
    Default branch
    main
    View the original SKILL.md

    Spring Boot Best Practices

    Your goal is to help me write high-quality Spring Boot applications by following established best practices.

    Project Setup & Structure

    • Build Tool: Use Maven (pom.xml) or Gradle (build.gradle) for dependency management.
    • Starters: Use Spring Boot starters (e.g., spring-boot-starter-web, spring-boot-starter-data-jpa) to simplify dependency management.
    • Package Structure: Organize code by feature/domain (e.g., com.example.app.order, com.example.app.user) rather than by layer (e.g., com.example.app.controller, com.example.app.service).

    Dependency Injection & Components

    • Constructor Injection: Always use constructor-based injection for required dependencies. This makes components easier to test and dependencies explicit.
    • Immutability: Declare dependency fields as private final.
    • Component Stereotypes: Use @Component, @Service, @Repository, and @Controller/@RestController annotations appropriately to define beans.

    Configuration

    • Externalized Configuration: Use application.yml (or application.properties) for configuration. YAML is often preferred for its readability and hierarchical structure.
    • Type-Safe Properties: Use @ConfigurationProperties to bind configuration to strongly-typed Java objects.
    • Profiles: Use Spring Profiles (application-dev.yml, application-prod.yml) to manage environment-specific configurations.
    • Secrets Management: Do not hardcode secrets. Use environment variables, or a dedicated secret management tool like HashiCorp Vault or AWS Secrets Manager.

    Web Layer (Controllers)

    • RESTful APIs: Design clear and consistent RESTful endpoints.
    • DTOs (Data Transfer Objects): Use DTOs to expose and consume data in the API layer. Do not expose JPA entities directly to the client.
    • Validation: Use Java Bean Validation (JSR 380) with annotations (@Valid, @NotNull, @Size) on DTOs to validate request payloads.
    • Error Handling: Implement a global exception handler using @ControllerAdvice and @ExceptionHandler to provide consistent error responses.

    Service Layer

    • Business Logic: Encapsulate all business logic within @Service classes.
    • Statelessness: Services should be stateless.
    • Transaction Management: Use @Transactional on service methods to manage database transactions declaratively. Apply it at the most granular level necessary.

    Data Layer (Repositories)

    • Spring Data JPA: Use Spring Data JPA repositories by extending JpaRepository or CrudRepository for standard database operations.
    • Custom Queries: For complex queries, use @Query or the JPA Criteria API.
    • Projections: Use DTO projections to fetch only the necessary data from the database.

    Logging

    • SLF4J: Use the SLF4J API for logging.
    • Logger Declaration: private static final Logger logger = LoggerFactory.getLogger(MyClass.class);
    • Parameterized Logging: Use parameterized messages (logger.info("Processing user {}...", userId);) instead of string concatenation to improve performance.

    Testing

    • Unit Tests: Write unit tests for services and components using JUnit 5 and a mocking framework like Mockito.
    • Integration Tests: Use @SpringBootTest for integration tests that load the Spring application context.
    • Test Slices: Use test slice annotations like @WebMvcTest (for controllers) or @DataJpaTest (for repositories) to test specific parts of the application in isolation.
    • Testcontainers: Consider using Testcontainers for reliable integration tests with real databases, message brokers, etc.

    Security

    • Spring Security: Use Spring Security for authentication and authorization.
    • Password Encoding: Always encode passwords using a strong hashing algorithm like BCrypt.
    • Input Sanitization: Prevent SQL injection by using Spring Data JPA or parameterized queries. Prevent Cross-Site Scripting (XSS) by properly encoding output.

    Alternatives

    Compare before choosing