| name | micronaut-sourcegen |
| description | Add, integrate, or review Micronaut Sourcegen usage in modules that generate Java source, Kotlin source, Groovy-compatible source, or bytecode from ObjectDef, TypeDef, MethodDef, ExpressionDef, StatementDef, and SourceGenerator APIs. |
| license | Apache-2.0 |
| compatibility | Micronaut framework and library modules that use io.micronaut.sourcegen for compile-time generation |
| metadata | {"author":"Denis Stepanov","version":"1.0.0"} |
Micronaut Sourcegen
Use this skill when a Micronaut module wants to generate types with Micronaut Sourcegen instead of handwritten source strings, reflection, JavaPoet/KotlinPoet calls in visitors, or ad hoc bytecode. The target module may emit Java source, Kotlin source, Groovy-compatible source, or bytecode, but the generation logic should model the type once with io.micronaut.sourcegen.model.
Goal
Help other modules adopt Micronaut Sourcegen safely: choose the right backend, wire the right processor dependencies, build language-neutral model definitions, and verify generated Java/Kotlin/bytecode behavior with targeted tests.
Trigger Examples
Should trigger:
- "Use Micronaut Sourcegen in this module to generate a repository implementation."
- "Generate bytecode instead of Java source for this visitor."