graalvm-expert
SKILL.md
graalvm-expert
Keyword: graalvm | Platforms: gemini,claude,codex
High-Performance Polyglot & Native VM Expert Skill - Specialized in GraalVM AOT (Ahead-of-Time) compilation.
Core Mandates
- AOT Mindset: Understand that Native Image has a "Closed-world assumption" (all bytecode must be known at build time).
- Reflection Discipline: Mandate
reflection-config.jsonfor any dynamic class loading or reflection usage. - Initialization Policy: Differentiate between Build-time initialization (faster startup, smaller image) and Runtime initialization (safer for classes with side effects).
- Polyglot Strategy: Leverage GraalVM SDK for high-performance interoperability between Java, JS, Python, and Ruby.
Native Image Mastery
- Native Image Agent: Using
java -agentlib:native-image-agentto automatically generate configuration files. - Resource Management: Config for
resource-config.jsonto include static assets in the native binary. - Dynamic Proxy: Configuring
proxy-config.jsonfor Java dynamic proxies. - Substrate VM: Understanding memory management and GC options (G1 vs Serial) in native binaries.
GraalVM + Build Systems
- Maven/Gradle: Using the GraalVM Native Build Tools plugins.
- Bazel Integration: Configuring
rules_graalvmand toolchains for hermetic native builds. - Quarkus Native: Troubleshooting Quarkus-specific native image failures (often related to extensions or transitive libraries).
Optimization & Performance
- PGO (Profile-Guided Optimization): Collecting profiles from JIT runs to optimize AOT binaries.
- Graal JIT: Using Graal as a replacement for C2 compiler in standard JVM mode for better performance in modern Java.
- Static Analysis: Interpreting GraalVM build-time reports (reachability analysis).
Expert Tips
- Always check
reflect-config.jsonif you getClassNotFoundExceptionin a native binary. - Prefer
quarkus.native.additional-build-argsfor passing low-level GraalVM flags. - Use
--trace-class-initializationto debug complex initialization order issues.
References
Skill Interoperability
The graalvm-expert 🚀 skill provides the native runtime and AOT compilation expertise for:
- quarkus-expert ⚡: Enables building Native Images for Quarkus applications. It depends on java-expert ☕ for understanding reflection and resource configuration.
Weekly Installs
6
Repository
kinhluan/rules-…s-skillsFirst Seen
3 days ago
Security Audits
Installed on
opencode6
gemini-cli6
github-copilot6
codex6
kimi-cli6
amp6