---
name: "micronaut-ahead-of-time-compilation"
description: "Eliminate runtime reflection and proxies using Micronaut compile-time dependency injection."
metadata:
  author: "Micronaut"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "micronaut compile time di"
  - "micronaut declarative @client"
  - "micronaut data repository"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Micronaut Ahead-of-Time Dependency Injection Framework

Configures Micronaut: compile-time annotation processing, declarative HTTP clients (@Client), Micronaut Data for compile-time pre-computed SQL queries, and instant startup on JVM or GraalVM Native.

## When to Invoke
Invoke this skill whenever you need to:
- micronaut compile time di
- micronaut declarative @client
- micronaut data repository

## Execution SOP & Rules
1. Annotate beans with @Singleton and inject via constructor without @Inject annotations.
2. Create declarative client: @Client('/users') public interface UserClient { @Get('/{id}') Single<User> get(Long id); }.
3. Create repository: @JdbcRepository(dialect = Dialect.POSTGRES) public interface UserRepository extends CrudRepository<User, Long> { ... }.
4. Run application: ./mvnw mn:run with sub-second JVM startup times.

## 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.
