---
name: "spring-boot-3-native-graalvm-images"
description: "Compile Spring Boot 3 applications into instant-booting native executables using GraalVM."
metadata:
  author: "Spring"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "compile spring boot native image"
  - "graalvm native build tools spring"
  - "runtimehints spring boot 3"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Spring Boot 3 Native GraalVM AOT Compilation

Configures Spring Boot 3: Ahead-Of-Time (AOT) engine, configuring native hints (RuntimeHintsRegistrar), building native images with GraalVM Native Build Tools, reducing startup time to 30ms, and dropping RAM footprint to 40MB.

## When to Invoke
Invoke this skill whenever you need to:
- compile spring boot native image
- graalvm native build tools spring
- runtimehints spring boot 3

## Execution SOP & Rules
1. Add org.graalvm.buildtools.native plugin to pom.xml or build.gradle.
2. Register reflection hints for third-party libraries: class CustomHints implements RuntimeHintsRegistrar { ... }.
3. Build native executable: ./mvnw native:compile -Pnative or ./gradlew nativeCompile.
4. Run native executable directly: ./target/my-service with near-zero memory overhead.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
