Source profileQuality 69/100

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

kotlin-springboot

Get best practices for developing applications with Spring Boot and Kotlin.

Source repository stars
37,126
Declared platforms
0
Static risk flags
0
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, idiomatic Spring Boot applications using Kotlin.

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/kotlin-springboot"
    Safe inspection promptEditorial

    Inspect the Agent Skill "kotlin-springboot" from https://github.com/github/awesome-copilot/blob/9933dcad5be5caeb288cebcd370eeeb2fc2f1685/skills/kotlin-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) with the Kotlin plugins (kotlin-maven-plugin or org.jetbrains.kotlin.jvm).

      Build Tool: Use Maven (pom.xml) or Gradle (build.gradle) with the Kotlin plugins (kotlin-maven-plugin or org.jetbrains.kotlin.jvm).Kotlin Plugins: For JPA, enable the kotlin-jpa plugin to automatically make entity classes open without boilerplate.Starters: Use Spring Boot starters (e.g., spring-boot-starter-web, spring-boot-starter-data-jpa) as usual.
    2. 02

      Dependency Injection & Components

      Primary Constructors: Always use the primary constructor for required dependency injection. It's the most idiomatic and concise approach in Kotlin.

      Primary Constructors: Always use the primary constructor for required dependency injection. It's the most idiomatic and concise approach in Kotlin.Immutability: Declare dependencies as private val in the primary constructor. Prefer val over var everywhere to promote immutability.Component Stereotypes: Use @Service, @Repository, and @RestController annotations just as you would in Java.
    3. 03

      Configuration

      Externalized Configuration: Use application.yml for its readability and hierarchical structure.

      Externalized Configuration: Use application.yml for its readability and hierarchical structure.Type-Safe Properties: Use @ConfigurationProperties with data class to create immutable, type-safe configuration 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.Data Classes for DTOs: Use Kotlin data class for all DTOs. This provides equals(), hashCode(), toString(), and copy() for free and promotes immutability.Validation: Use Java Bean Validation (JSR 380) with annotations (@Valid, @NotNull, @Size) on your DTO data classes.
    5. 05

      Service Layer

      Business Logic: Encapsulate business logic within @Service classes.

      Business Logic: Encapsulate business logic within @Service classes.Statelessness: Services should be stateless.Transaction Management: Use @Transactional on service methods. In Kotlin, this can be applied to class or function level.

    Permission review

    Static risk signals and limitations

    No configured static risk pattern was detected

    This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.

    Evidence record

    Why each signal appears

    EvidenceSourceComputedTestedEditorial
    SignalValueEvidence typeMeaning
    Quality score69/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/kotlin-springboot/SKILL.md
    Commit
    9933dcad5be5caeb288cebcd370eeeb2fc2f1685
    License
    MIT
    Collected
    2026-07-28
    Default branch
    main
    View the original SKILL.md

    Spring Boot with Kotlin Best Practices

    Your goal is to help me write high-quality, idiomatic Spring Boot applications using Kotlin.

    Project Setup & Structure

    • Build Tool: Use Maven (pom.xml) or Gradle (build.gradle) with the Kotlin plugins (kotlin-maven-plugin or org.jetbrains.kotlin.jvm).
    • Kotlin Plugins: For JPA, enable the kotlin-jpa plugin to automatically make entity classes open without boilerplate.
    • Starters: Use Spring Boot starters (e.g., spring-boot-starter-web, spring-boot-starter-data-jpa) as usual.
    • Package Structure: Organize code by feature/domain (e.g., com.example.app.order, com.example.app.user) rather than by layer.

    Dependency Injection & Components

    • Primary Constructors: Always use the primary constructor for required dependency injection. It's the most idiomatic and concise approach in Kotlin.
    • Immutability: Declare dependencies as private val in the primary constructor. Prefer val over var everywhere to promote immutability.
    • Component Stereotypes: Use @Service, @Repository, and @RestController annotations just as you would in Java.

    Configuration

    • Externalized Configuration: Use application.yml for its readability and hierarchical structure.
    • Type-Safe Properties: Use @ConfigurationProperties with data class to create immutable, type-safe configuration objects.
    • Profiles: Use Spring Profiles (application-dev.yml, application-prod.yml) to manage environment-specific configurations.
    • Secrets Management: Never 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.
    • Data Classes for DTOs: Use Kotlin data class for all DTOs. This provides equals(), hashCode(), toString(), and copy() for free and promotes immutability.
    • Validation: Use Java Bean Validation (JSR 380) with annotations (@Valid, @NotNull, @Size) on your DTO data classes.
    • Error Handling: Implement a global exception handler using @ControllerAdvice and @ExceptionHandler for consistent error responses.

    Service Layer

    • Business Logic: Encapsulate business logic within @Service classes.
    • Statelessness: Services should be stateless.
    • Transaction Management: Use @Transactional on service methods. In Kotlin, this can be applied to class or function level.

    Data Layer (Repositories)

    • JPA Entities: Define entities as classes. Remember they must be open. It's highly recommended to use the kotlin-jpa compiler plugin to handle this automatically.
    • Null Safety: Leverage Kotlin's null-safety (?) to clearly define which entity fields are optional or required at the type level.
    • Spring Data JPA: Use Spring Data JPA repositories by extending JpaRepository or CrudRepository.
    • Coroutines: For reactive applications, leverage Spring Boot's support for Kotlin Coroutines in the data layer.

    Logging

    • Companion Object Logger: The idiomatic way to declare a logger is in a companion object.
      companion object {
          private val logger = LoggerFactory.getLogger(MyClass::class.java)
      }
      
    • Parameterized Logging: Use parameterized messages (logger.info("Processing user {}...", userId)) for performance and clarity.

    Testing

    • JUnit 5: JUnit 5 is the default and works seamlessly with Kotlin.
    • Idiomatic Testing Libraries: For more fluent and idiomatic tests, consider using Kotest for assertions and MockK for mocking. They are designed for Kotlin and offer a more expressive syntax.
    • Test Slices: Use test slice annotations like @WebMvcTest or @DataJpaTest to test specific parts of the application.
    • Testcontainers: Use Testcontainers for reliable integration tests with real databases, message brokers, etc.

    Coroutines & Asynchronous Programming

    • suspend functions: For non-blocking asynchronous code, use suspend functions in your controllers and services. Spring Boot has excellent support for coroutines.
    • Structured Concurrency: Use coroutineScope or supervisorScope to manage the lifecycle of coroutines.

    Alternatives

    Compare before choosing